[Tinyos-help] Can Stargate be connected to Telos

2006-07-31 Thread Liu Haibin
Hi,I have a question about Stargate from Crossbow. Can it be connected to Telos (either from Moteiv or Crossbow) or other motes? Thanks.Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Init all motes at the same time

2006-07-19 Thread Liu Haibin
In Tossim 2.x, it's something liket.getNode(1).bootAtTime(11);t.getNode(2).bootAtTime(88);t.getNode(3).bootAtTime(189);HaibinOn 7/19/06, 
Lorenzo Mainardi [EMAIL PROTECTED] wrote:
Hi, I'm working with routing protocols in TOSSIM/TinyViz; for my simulation I would to inizialize all the motes of my simulation at the same time.Now any mote inits at random time and in random sequence. There are some command-line options to make this?What?
Thank you very much in advanceLORENZO MAINARDI

___Tinyos-help mailing listTinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] make micaz sim for BaseStation application in TinyOS-2.x developement codes failed

2006-07-18 Thread Liu Haibin
On 7/15/06, Philip Levis [EMAIL PROTECTED] wrote:
On Jul 14, 2006, at 2:29 AM, Liu Haibin wrote: Hi, I downloaded the development Tinyos-2.x codes. I got an error when I compiled the BaseStation application. [EMAIL PROTECTED]
 BaseStation]$ make micaz sim mkdir -p build/micaz placing object files in build/micaz writing XML schema to app.xml compiling BaseStationC to object file sim.o ncc -c -shared -fPIC -o build/micaz/sim.o -g -O0 -tossim -fnesc-
 nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\ (\) -finline-limit=10 -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d - Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -
 board=micasb -I%T/oski -Wno-nesc-data-race BaseStationC.nc -fnesc- dump=components -fnesc-dump=variables -fnesc-dump=constants -fnesc- dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-
 dumpfile=app.xml In component `BaseStationC': BaseStationC.nc :79: ambiguous match make: *** [sim-exe] Error 1 But make micaz worked fine. Any idea what went wrong?Thanks.
tos/lib/tossim/SerialActiveMessageC: interface Receive[am_id_t id]; interface Receive as Snoop[am_id_t id];It looks like the TOSSIM SerialActiveMessageC has a slightlydifferent signature: it provides Snoop while the standard one (lib/
serial) does not. The wiring in BaseStationC is this: BaseStationP.RadioReceive - Radio.Receive;Therefore nesC does not know which to wire to. This is a mistake inthe TOSSIM SerialActiveMessageC, and I'll check in the fix (remove
Snoop).That being said, TOSSIM currently does not support serialcommunication; what are you using BaseStation for in simulation?PhilI think you mean BaseStationP.UartReceive
 - Serial.Receive;What is the Snoop interface for? Since the standard one doesn't have, I wonder why there is such a Snoop in Tossim?I tried TestSerial but I got the following error. Is this error somehow related to the Snoop interface? I'm using the latest TinyOS 
2.x[EMAIL PROTECTED] TestSerial]$ java TestSerial -comm tossim-serialCouldn't instantiate tossim packet sourceDid you compile tossim?Exception in thread main java.lang.NullPointerException at 
net.tinyos.message.MoteIF.init(MoteIF.java:119) at net.tinyos.message.MoteIF.init(MoteIF.java:110) at TestSerial.main(TestSerial.java:100)Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] how to run different applications on different nodes in Tossim

2006-07-18 Thread Liu Haibin
Hi,Tossim only allows to run the same application on all the nodes. Are there any tricks to play so that different nodes can run different applications in Tossim? Thanks.Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] is Mirage testbed still working?

2006-07-16 Thread Liu Haibin
Hi,I registered a new project on Mirage testbed. They asked me to send email to [EMAIL PROTECTED] (Mirage Administrator) or
[EMAIL PROTECTED] (Philip Buonadonna) to enable my new account. But both of the email accounts bounced back. Does anyone know that if Mirage is still working?Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] make micaz sim for BaseStation application in TinyOS-2.x developement codes failed

2006-07-14 Thread Liu Haibin
Hi,I downloaded the development Tinyos-2.x codes. I got an error when I compiled the BaseStation application.[EMAIL PROTECTED] BaseStation]$ make micaz simmkdir -p build/micaz placing object files in build/micaz
 writing XML schema to app.xml compiling BaseStationC to object file sim.oncc -c -shared -fPIC -o build/micaz/sim.o -g -O0 -tossim -fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\) -finline-limit=10 -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb -I%T/oski -Wno-nesc-data-race 
BaseStationC.nc -fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xmlIn component `BaseStationC':BaseStationC.nc
:79: ambiguous matchmake: *** [sim-exe] Error 1But make micaz worked fine. Any idea what went wrong? Thanks. Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] how to measure ambient noise

2006-07-14 Thread Liu Haibin
Hi,I want to measure the ambient noise. I think ambient noise is equal to the RSSI when there's no transmission. But according to the chipcon data sheet, the RSSI is appended to the frame. No transmission means no frame, then how can I measure the RSSI. I must have missed something. Could someone help me? Thanks.
Regards,haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] make micaz sim for BaseStation application in TinyOS-2.x developement codes failed

2006-07-14 Thread Liu Haibin
I want to run in simulation some application like Surge in TinyOS 1.x. But 2.x doesn't have Surge, so I guess BaseStation in 2.x is the closest.Does it take a lot of time and effort to port 1.x applications to 2.x? Is there anyone who is already doing it?
Regards,HaibinOn 7/15/06, Philip Levis [EMAIL PROTECTED] wrote:
On Jul 14, 2006, at 2:29 AM, Liu Haibin wrote: Hi, I downloaded the development 
Tinyos-2.x codes. I got an error when I compiled the BaseStation application. [EMAIL PROTECTED] BaseStation]$ make micaz sim mkdir -p build/micaz placing object files in build/micaz
 writing XML schema to app.xml compiling BaseStationC to object file sim.o ncc -c -shared -fPIC -o build/micaz/sim.o -g -O0 -tossim -fnesc- nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\
 (\) -finline-limit=10 -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d - Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c - board=micasb -I%T/oski -Wno-nesc-data-race BaseStationC.nc -fnesc-
 dump=components -fnesc-dump=variables -fnesc-dump=constants -fnesc- dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc- dumpfile=app.xml In component `BaseStationC': BaseStationC.nc
 :79: ambiguous match make: *** [sim-exe] Error 1 But make micaz worked fine. Any idea what went wrong?Thanks.tos/lib/tossim/SerialActiveMessageC: interface Receive[am_id_t id];
 interface Receive as Snoop[am_id_t id];It looks like the TOSSIM SerialActiveMessageC has a slightlydifferent signature: it provides Snoop while the standard one (lib/serial) does not. The wiring in BaseStationC is this:
 BaseStationP.RadioReceive - Radio.Receive;Therefore nesC does not know which to wire to. This is a mistake inthe TOSSIM SerialActiveMessageC, and I'll check in the fix (removeSnoop).
That being said, TOSSIM currently does not support serialcommunication; what are you using BaseStation for in simulation?Phil
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] clearThreshold = -95 cannot be found in cc2420 data sheet

2006-07-13 Thread Liu Haibin
Hi,The clearThreshold in UscGainInterferenceModelC.nc is set to -95. It says that the value comes from cc2420 data sheet. But I searched the data sheet but didn't find it. So how does this value come out? Thanks.
Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] where to find the developer's kit worth $600

2006-07-13 Thread Liu Haibin
Hi Phil,I remember that you mentioned a developer's kit at $600. Where can I find it? Is there any link? I only found that xbow has a kit at $3000. Thanks a lot.Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] T2

2006-07-12 Thread Liu Haibin
On 7/12/06, Terence Joseph [EMAIL PROTECTED] wrote:
Hello,I have seen a number of references to the operating system T2 and was justwondering if this is an early reference to TinyOS 2.0 or a completely newoperating system?It's the same.
Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] question on enqueue_receive_event from UscGainInterfaerenceModelC.nc

2006-07-12 Thread Liu Haibin
On 7/6/06, Philip Levis [EMAIL PROTECTED] wrote:
On Jul 5, 2006, at 8:08 PM, Liu Haibin wrote: Hi, I'm confused with the following code from enqueue_receive_event from UscGainInterfaerenceModelC.nc. The condition at label 1 is
 understandable. It checks if the power is large enough against the destination noise plus all the other transmissions to the destination. What I don't understand is the condition label 2. Why does it need to compare the power with the max destination noise?
 What is the variable receiving used for? I have very limited knowledge in the area of radio transmission. I guess I missed some very basic concepts here. Could someone help me
 out with it? Regards, Haibin // If I'm off, I never receive the packet, but I need to keep track of // it in case I turn on and someone else starts sending me a
 weaker // packet. So I don't set receiving to 1, but I keep track of // the signal strength. if (!sim_mote_is_on(sim_node())) { dbg(Gain, Lost packet from %i due to %i being off\n,
 source, sim_node()); rcv-lost = 1; } else { 1if ((sigStr + sim_gain_sensitivity()) = power) {dbg(Gain, Lost packet from %i due to power being too
 low (%f = %f)\n, source, sigStr, power);rcv-lost = 1; } else if (receiving) {dbg(Gain, Lost packet from %i due to being in the midst
 of a reception.\n, source);rcv-lost = 1; } 2if (power = sim_gain_noise_mean(sim_node()) + sim_gain_noise_range(sim_node())) {receiving = 1;
 } }The receiving variable keeps track of whether the node thinks it isreceiving a packet or whether it is searching for packet preambles.You can only start receiving a packet if you are in the latter state
(unless you can recover preambles during packets, which no existingradio stack besides Kamin's prototype mica2 stack can do).The second case is for when the packet is strong enough to hear. Ifthe signal strength is not above noise, then you do not detect the
preamble.Actually, this looks like a very optimistic approach. The logicshould be more like:if (signal is below noise + threshold) { lose packet}else if (already receiving) { lose packet
}else { receive packet;}Note that the current approach resamples the noise but does notconsider the signal threshold. In the end, the difference between thetwo is pretty small (the number of preambles you detect of packets
that might be lost), but still, I should look at it carefully.PhilIn a real situation, the mote can capture a stronger transmission while
it's detecting the preamble of a weaker transmission (when it passes
the preamble and starts to receive the weaker transmission, it cannot
capture the stronger one. But Kamin's prototype can).

But I went through the Tossim 2.x UscGainInterferenceModelC.nc.
I found that even during the detection of a preamble of a weaker
transmission, a stronger transmission cannot be accepted. Because the
weaker transmission will set the receiving = 1 even during its
detection of preamble. However, the stronger will still corrupt the
weaker transmission so in the end, neither of the two transmissions
passes through.

Am I right on it? Or did I miss something?



Regards,
Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] question on enqueue_receive_event from UscGainInterfaerenceModelC.nc

2006-07-05 Thread Liu Haibin
Hi,I'm confused with the following code from enqueue_receive_event from UscGainInterfaerenceModelC.nc. The condition at label 1 is understandable. It checks if the power is large enough against the destination noise plus all the other transmissions to the destination. What I don't understand is the condition label 2. Why does it need to compare the power with the max destination noise? What is the variable receiving used for?
I have very limited knowledge in the area of radio transmission. I guess I missed some very basic concepts here. Could someone help me out with it?Regards,Haibin // If I'm off, I never receive the packet, but I need to keep track of
 // it in case I turn on and someone else starts sending me a weaker // packet. So I don't set receiving to 1, but I keep track of // the signal strength. if (!sim_mote_is_on(sim_node())) { 
 dbg(Gain, Lost packet from %i due to %i being off\n, source, sim_node()); rcv-lost = 1; } else {1 if ((sigStr + sim_gain_sensitivity()) = power) {  dbg(Gain, Lost packet from %i due to power being too low (%f = %f)\n, source, sigStr, power);
  rcv-lost = 1; } else if (receiving) {  dbg(Gain, Lost packet from %i due to being in the midst of a reception.\n, source);  rcv-lost = 1;
 }2 if (power = sim_gain_noise_mean(sim_node()) + sim_gain_noise_range(sim_node())) {  receiving = 1; } }
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] question on setNoise(node, mean, variance)

2006-07-04 Thread Liu Haibin
Hi,I have a question about the setNoise(node, mean, variance) in TOSSIM 2.x. I found that the larger the mean is, the more noisy it is. For example, setNoise(1, -100, 5.0) can make nodes receive packets, but setNoise(1, -10, 
5.0) cannot. I was expecting to see that -100 would mean more noisy that -10. Did I get the concept wrong? So what does the noise here mean? Many Thanks.Regards,Haibin

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] no implementation in /platforms/micaz/chips/cc2420/sim/SimCC2420C.nc in Tinyos-2.x

2006-07-03 Thread Liu Haibin
Hi,According to the document for TOSSIM in Tinyos-2.x, it only supports micaz now and their implementation is under the sim directory.[EMAIL PROTECTED] tos]$ find . -name sim./platforms/micaz/sim
./platforms/micaz/chips/cc2420/sim./platforms/mica/sim./chips/atm128/sim./chips/atm128/pins/sim./chips/atm128/spi/sim./chips/atm128/timer/simI thought ./platforms/micaz/chips/cc2420/sim is the implementation for cc2420, but the file 
SimCC2420C.nc under ./platforms/micaz/chips/cc2420/sim is without implemenation (see the following).Any idea why it is so? Where can I find the Tossim implementation for cc2420 in Tinyos-2.x? Many thanks.
Regards,Haibin/*** Simulated implementation of the CC2420 radio chip. It is an* SPI end point, and also signals some interrupts/GPIO pins.\* This is a pretty complicated component, so be aware that it
* may be very helpful to have the CC2420 data sheet nearby.** @author Philip Levis* @date November 22 2005*/module SimCC2420C { provides { interface Init; interface Resource[uint8_t] as SpiResource;
 interface SPIByte; interface SPIPacket; interface GeneralIO as CCA; interface GeneralIO as CSN; interface GeneralIO as FIFO; interface GeneralIO as FIFOP; interface GeneralIO as RSTN;
 interface GeneralIO as SFD; interface GeneralIO as VREN; interface GpioCapture as CaptureSFD; interface GpioInterrupt as InterruptFIFOP; }  uses { interface Resource[uint8_t] as SubSpiResource;
 interface ArbiterInfo as SpiUser; interface McuPowerState; } }implementation {  }
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] why both AMPacket and Packet interfaces are used in tinyos-2.x/apps/tutorials/BlinkToRadio/BlinkToRadioC.nc

2006-06-29 Thread Liu Haibin
Hi,The following is tinyos-2.x/apps/tutorials/BlinkToRadio/BlinkToRadioC.nc from tinyos-2_0_devel-BRANCH. I found that it declares to use both AMPacket and Packet interfaces and actually it uses only Packet in the implementation. So is AMPacket redundant there?
Regards,Haibin// $Id: BlinkToRadioC.nc,v 1.1.2.2 2006/02/09 17:17:48 idgay Exp $/** Copyright (c) 2000-2006 The Regents of the University of California. 
* All rights reserved.** Permission to use, copy, modify, and distribute this software and its* documentation for any purpose, without fee, and without written agreement is* hereby granted, provided that the above copyright notice, the following
* two paragraphs and the author appear in all copies of this software.* * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF* CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.* * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS* ON AN AS IS BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.**//*** Implementation of the BlinkToRadio application. A counter is* incremented and a radio message is sent whenever a timer fires.
* Whenever a radio message is received, the three least significant* bits of the counter in the message payload are displayed on the* LEDs. Program two motes with this application. As long as they* are both within range of each other, the LEDs on both will keep
* changing. If the LEDs on one (or both) of the nodes stops changing* and hold steady, then that node is no longer receiving any messages* from the other node.** @author Prabal Dutta* @date Feb 1, 2006
*/#include Timer.h#include BlinkToRadio.hmodule BlinkToRadioC { uses interface Boot; uses interface Leds; uses interface TimerTMilli as Timer0; uses interface Packet;
 uses interface AMPacket; uses interface AMSend; uses interface Receive; uses interface SplitControl as AMControl;}implementation { uint16_t counter; message_t pkt; bool busy = FALSE;
 void setLeds(uint16_t val) { if (val  0x01) call Leds.led0On(); else  call Leds.led0Off(); if (val  0x02) call Leds.led1On(); else call Leds.led1Off
(); if (val  0x04) call Leds.led2On(); else call Leds.led2Off(); } event void Boot.booted() { call AMControl.start(); } event void AMControl.startDone
(error_t err) { if (err == SUCCESS) { call Timer0.startPeriodic(TIMER_PERIOD_MILLI); } else { call AMControl.start(); } } event void AMControl.stopDone(error_t err) {
 } event void Timer0.fired() { counter++; if (!busy) { BlinkToRadioMsg* btrpkt =  (BlinkToRadioMsg*)(call Packet.getPayload(pkt, NULL)); btrpkt-nodeid = TOS_NODE_ID;
 btrpkt-counter = counter; if (call AMSend.send(AM_BROADCAST_ADDR,  pkt, sizeof(BlinkToRadioMsg)) == SUCCESS) { busy = TRUE; } } } event void 
AMSend.sendDone(message_t* msg, error_t err) { if (pkt == msg) { busy = FALSE; } } event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){ if (len == sizeof(BlinkToRadioMsg)) {
 BlinkToRadioMsg* btrpkt = (BlinkToRadioMsg*)payload; setLeds(btrpkt-counter); } return msg; }}
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] where to find TEP104 and TEP105 for tinyos-2.x

2006-06-28 Thread Liu Haibin
Hi,Any idea where I can find TEP104 and TEP105 for tinyos-2.x? They're refered to in other TEP's but are nowhere to be found.Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] problem compiling Blink on tinyos-2.x

2006-06-22 Thread Liu Haibin
Hi,I installed the tinyos-2_0_devel-BRANCH code on Linux and followed the instructions from Upgrading from TinyOS 1.x to TinyOS 2.x. But I got an error when I compiled the Blink application.
$ make micazmkdir -p build/micaz compiling BlinkAppC to a micaz binaryncc -o build/micaz/main.exe -Os -finline-limit=10 -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs, components)' -fnesc-dumpfile=build/micaz/wiring-
check.xml BlinkAppC.nc -lm Unknown target micazKnown targets for TinyOS directory /home/liuhb/tinyos-2.x/tosand the specified include directories are:none.make: *** [exe0] Error 2I tried make telsob and I got the same error. I set the environment variables accordingly
$ set | grep TOSROOT\|TOSDIR\|CLASSPATH\|MAKERULESCLASSPATH=/home/liuhb/tinyos-2.x/support/sdk/java/tinyos.jar:.MAKERULES=/home/liuhb/tinyos-2.x/support/make/MakerulesTOSDIR=/home/liuhb/tinyos-
2.x/tosTOSROOT=/home/liuhb/tinyos-2.xCould someone give some idea what went wrong? Thanks.Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] inttypes.h: No such file or directory when compiling Blink on tinyos-2.x

2006-06-22 Thread Liu Haibin
I found the answer at the tutorial lesson 1 under tinyos-2_0_devel-BRANCH.Now I can compile telos but still cannot compile micaz. When I typed make micaz, it gave a bunch of errors. /usr/lib/ncc/nesc_nx.h:4:22: 
inttypes.h: No such file or directorycommandline: failed to preprocess /usr/lib/ncc/nesc_nx.h/home/liuhb/tinyos-2.x/tos/system/tos.h:5:22: inttypes.h: No such file or directory/home/liuhb/tinyos-2.x/tos/system/tos.h:13:20: 
string.h: No such file or directory/home/liuhb/tinyos-2.x/tos/system/tos.h:14:20: stdlib.h: No such file or directory/home/liuhb/tinyos-2.x/tos/system/tos.h:15:18: math.h: No such file or directory/home/liuhb/tinyos-
2.x/tos/system/tos.h:17:19: ctype.h: No such file or directorycommandline: failed to preprocess /home/liuhb/tinyos-2.x/tos/system/tos.hIn file included from /home/liuhb/tinyos-2.x/tos/system/TinySchedulerC.nc:36:
In interface `Scheduler':/home/liuhb/tinyos-2.x/tos/interfaces/Scheduler.nc:54: only commands and events can be defined in interfaces/home/liuhb/tinyos-2.x/tos/interfaces/Scheduler.nc:54: warning: return-type defaults to `int'
/home/liuhb/tinyos-2.x/tos/interfaces/Scheduler.nc:54: syntax error before `runNextTask'In component `TinySchedulerC':..The first line says no inttypes.h is found. But I did install avr-libc and I can find it at /usr/avr/include/inttypes.h
Regards,HaibinOn 6/22/06, Liu Haibin [EMAIL PROTECTED] wrote:
Hi,I installed the tinyos-2_0_devel-BRANCH code on Linux and followed the instructions from Upgrading from TinyOS 1.x to TinyOS 2.x. But I got an error when I compiled the Blink application.
$ make micazmkdir -p build/micaz compiling BlinkAppC to a micaz binaryncc -o build/micaz/main.exe -Os -finline-limit=10 -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs, components)' -fnesc-dumpfile=build/micaz/wiring-
check.xml BlinkAppC.nc -lm Unknown target micazKnown targets for TinyOS directory /home/liuhb/tinyos-2.x/tosand the specified include directories are:none.make: *** [exe0] Error 2I tried make telsob and I got the same error. I set the environment variables accordingly
$ set | grep TOSROOT\|TOSDIR\|CLASSPATH\|MAKERULESCLASSPATH=/home/liuhb/tinyos-2.x/support/sdk/java/tinyos.jar:.MAKERULES=/home/liuhb/tinyos-2.x/support/make/MakerulesTOSDIR=/home/liuhb/tinyos-
2.x/tosTOSROOT=/home/liuhb/tinyos-2.xCould someone give some idea what went wrong? Thanks.Regards,Haibin


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] inttypes.h: No such file or directory when compiling Blink on tinyos-2.x

2006-06-22 Thread Liu Haibin
Yes. Thanks. I found that I had two avr-gcc, avr-gcc-3.3tinyos-1 and avr-gcc-3.4.2-1. So i deleted the former. Now it worked.Regards,HaibinOn 6/23/06, 
Philip Levis [EMAIL PROTECTED] wrote:
On Jun 22, 2006, at 1:07 AM, Liu Haibin wrote: I found the answer at the tutorial lesson 1 under tinyos-2_0_devel- BRANCH. Now I can compile telos but still cannot compile micaz. When I
 typed make micaz, it gave a bunch of errors. /usr/lib/ncc/nesc_nx.h:4:22: inttypes.h: No such file or directory commandline: failed to preprocess /usr/lib/ncc/nesc_nx.h
 /home/liuhb/tinyos-2.x/tos/system/tos.h:5:22: inttypes.h: No such file or directory /home/liuhb/tinyos-2.x/tos/system/tos.h:13:20: string.h: No such file or directory /home/liuhb/tinyos-
2.x/tos/system/tos.h:14:20: stdlib.h: No such file or directory /home/liuhb/tinyos-2.x/tos/system/tos.h:15:18: math.h: No such file or directory /home/liuhb/tinyos- 2.x/tos/system/tos.h:17:19: 
ctype.h: No such file or directory commandline: failed to preprocess /home/liuhb/tinyos-2.x/tos/ system/tos.h In file included from /home/liuhb/tinyos-2.x/tos/system/ TinySchedulerC.nc
:36: In interface `Scheduler': /home/liuhb/tinyos-2.x/tos/interfaces/Scheduler.nc:54: only commands and events can be defined in interfaces /home/liuhb/tinyos-2.x/tos/interfaces/Scheduler.nc:54: warning:
 return-type defaults to `int' /home/liuhb/tinyos-2.x/tos/interfaces/Scheduler.nc:54: syntax error before `runNextTask' In component `TinySchedulerC': .. The first line says no 
inttypes.h is found. But I did install avr- libc and I can find it at /usr/avr/include/inttypes.hThe first line says inttypes.h isn't found. It sounds like your avr-gcc is looking at the wrong avr-libc.
Phil
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] tossim in tinyos-2.x

2006-06-15 Thread Liu Haibin
Thanks. But I installed rpm for tinyos-2.x and could not find the
TOSSIM code. Any idea where I can find it? And any doc for the new
TOSSIM?Regards,HaibinOn 6/15/06, Philip Levis [EMAIL PROTECTED]
 wrote:On Jun 14, 2006, at 2:41 AM, Liu Haibin wrote: Hi,
 According to tossim manual, tossim in tinyos-1.x only implemented mica platform. How about the tossim in tinyos-2.x? Any newer platforms are implemented in the simulator? I realized that there's
 no directory tos/platforms/pc in tinyos-2.x, then where can I find the tossim implementation in tinyos-2.x?TOSSIM in 2.x is designed to be able to simulate multiple platforms.Currently, it only supports the micaz platform. It simulates atm128
timers at the hardware level, and simulates the radio at a packetlevel. It does not simulate the ADC. The goal is to be able tosimulate each chip, and then when you compile for a platform youcompile the simulation version of each of its chips.
Phil
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] tinyos-2.x TOSSIM with gdb?

2006-06-15 Thread Liu Haibin
If you download the latest code from the dev branch of tinyos-2.x. You should find a 
Where can I find the latest code? Is the rpm the latest code, or any code on cvs. I found no tinyos-2.x code on the sourceforge cvs server.
tutorial under tinyos-2.x/docs/html/tutorial/lesson-t.html. Not sure if this tutorial is I installed the rpm but could not find any relevant doc. However I found some tinyos-2.x doc at 
http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson[1-5].html but none of them talks about tossim. Any idea where I can find the doc you referred to?Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] tossim in tinyos-2.x

2006-06-14 Thread Liu Haibin
Hi,According to tossim manual, tossim in tinyos-1.x only implemented mica platform. How about the tossim in tinyos-2.x? Any newer platforms are implemented in the simulator? I realized that there's no directory tos/platforms/pc in 
tinyos-2.x, then where can I find the tossim implementation in tinyos-2.x?Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Re: question on mica sense carrier

2006-06-10 Thread Liu Haibin
Hi,I think I've got the answer. If you look at the following code from ChannelMonC.nc 1 TOSH_SIGNAL(SIG_OUTPUT_COMPARE2) {2  uint8_t bit = TOSH_READ_RFM_RXD_PIN();3 atomic { // Unnecessary, but nesC doesn't understand SIGNAL
4 //fire the bit arrived event and send up the value.5 if (CM_state == IDLE_STATE) {6 CM_search[0] = 1;7 CM_search[0] = CM_search[0] | (bit  0x1);
8 if(CM_waiting != -1){9  CM_waiting --;10   if(CM_waiting == 1){11   if ((CM_search[0]  0xfff) == 0) { // see if it's 12 consecutive 0's
12   CM_waiting = -1;13   signal ChannelMon.idleDetect();14   }else{15   CM_waiting = (call Random.rand()  0x1f) + 30;16   } 17   }18  }19  if ((



CM_search[0]  0x777) == 0x707){ // preamble20   CM_state = START_SYMBOL_SEARCH;21   CM_search[0] = CM_search[1] = 0;22   CM_startSymBits = 30;23  }24  }else if(
CM_state == START_SYMBOL_SEARCH){25  unsigned int current = CM_search[CM_lastBit];26  CM_startSymBits--;27  if (CM_startSymBits == 0){28   CM_state = IDLE_STATE;
29  }30  if (CM_state != IDLE_STATE) {31   current = 1;32   current = 0x1ff; // start symbol is 9 bits33   if(bit) current |= 0x1; // start symbol is 9 bits34   if (current == 0x135) {
35   cbi(TIMSK, OCIE2); 36   CM_state = IDLE_STATE;37   signal ChannelMon.startSymDetect();38   }39   if (CM_state != IDLE_STATE) {40   CM_search[CM_lastBit] = current;



41   CM_lastBit ^= 1;42   }43  }44  }45  }46  return;47 }The
test of 12 consecutive 0's (line 11) is in the state of IDLE_STATE
(line 5), but when it's really starting to receive data, it should be
in the state of START_SYMBOL_SEARCH (line 24). So even when someone is sending a lot of 0's, the receiving node is in the state of 

START_SYMBOL_SEARCH, so the test of 12 consecutive 0's (line 11) will never be executed.Cheers,
HaibinOn 6/7/06, Liu Haibin [EMAIL PROTECTED] wrote:
Hi,I have a question on mica/ChannelMonC.nc, the implementation of the CSMA/CA on mica. The code below shows that uint8_t bit = TOSH_READ_RFM_RXD_PIN(); CM_search[0] = 1; CM_search[0] = CM_search[0] | (bit  0x1);
  if ((CM_search[0]  0xfff) == 0) { // 12 clock ticks  CM_waiting = -1;  signal ChannelMon.idleDetect();  }after a random delay, it checks if during the past 12 clock ticks a single 1 bit is received. If not, then it signals that channel is idle. But my question is if some node is transmitting a long sequence of 0s, then the idleness is falsely detected. Why is it so?
Regards,Haibin 


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] question on mica sense carrier

2006-06-07 Thread Liu Haibin
Hi,I have a question on mica/ChannelMonC.nc, the implementation of the CSMA/CA on mica. The code below shows that uint8_t bit = TOSH_READ_RFM_RXD_PIN(); CM_search[0] = 1; CM_search[0] = CM_search[0] | (bit  0x1);
  if ((CM_search[0]  0xfff) == 0) { // 12 clock ticks  CM_waiting = -1;  signal ChannelMon.idleDetect();  }after a random delay, it checks if during the past 12 clock ticks a single 1 bit is received. If not, then it signals that channel is idle. But my question is if some node is transmitting a long sequence of 0s, then the idleness is falsely detected. Why is it so?
Regards,Haibin 
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Re: question on simple_transmit from Rfm_model.c

2006-06-06 Thread Liu Haibin
But according to tossim document, the simple radio model places all nodes in a single cell and every bit transmitted is received without error. So it should not have any hidden station problem.The thing is every time node is transmitting 0s, it is considered not transmitting. That's the part that I don't understand. I'm afraid that it has nothing to do with hidden station problem.
Regards,HaibinOn 6/5/06, Aditya Bhave [EMAIL PROTECTED] wrote:

Any wireless xommunication has two problems associated with it
1. HIdden Station problem
2. Exposed Station problem.
You may want to google these terms to see what they mean. Essentially it means that it is not always possible to detect whether a channel is really idle or not. Thats why CSMA (used by tinyos)will not always work correctly. Newer versions of tinyos implemet the B-MAC and S-MAC protocol which supposedly solves these problems. If youre using older versionsof tinyos ( 
2.0), you will have to figure out how to tackle these problems on your own at the application level. In my project, i used redundancy i.e every packet was sent 3 times at 500 ms intervals with the hope that at least one of these packet reaches the destination correctly. It worked for me.

regards,
Aditya Bhave







From:Liu Haibin 
[EMAIL PROTECTED]To:tinyos-help@Millennium.Berkeley.EDUSubject:
[Tinyos-help] Re: question on simple_transmit from Rfm_model.cDate:Mon, 5 Jun 2006 18:04:10 +0800

For example, let's say we have 2 motes. Mote 0 is transmitting 0s all the time, so transmitting[5] = 0, radio_active[0] = 0, and radio_active[1] = 0.
While mote 0 is transmitting 0s, the TOSH_rfm_rx_bit() in TOS_SIGNAL_HANDLER(SIG_OUTPUT_COMPARE2B, ()) of mote 1 is called. And because radio_active[1] == 0, TOSH_rfm_rx_bit() returns 0. After 12 bits, it signal
ChannelMon.idleDetect() to show the channel is free. But actually mote 0 is using the channel and transmitting 0s.Why is it so? Any help is appreciated.
Regards,Haibin
On 6/2/06, Liu Haibin 
[EMAIL PROTECTED] wrote:


Hi,I have a question about the following code from Rfm_model.c. The parameter bit can be 1 or 0. When simple_trasmit is transmitting bit 1, transmitting[modeID] is set to 1, meaning it's transmitting. However, when simple_transmit is transmitting bit 0, transmitting[modeID] is set to 0, meaning it's not transmitting (actually it's transmitting bit 0). Why is it so? I must have the concept wrong. Could any help me on this? 
void simple_transmit(int moteID, char bit) { int i;  transmitting[moteID] = bit; for (i = 0; i  tos_state.num_nodes; i++) {
 radio_active[i] += bit; }}Regards,


Haibin






___Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Re: question on simple_transmit from Rfm_model.c

2006-06-05 Thread Liu Haibin
For example, let's say we have 2 motes. Mote 0 is transmitting 0s all the time, so transmitting[5] = 0, radio_active[0] = 0, and radio_active[1] = 0.While mote 0 is transmitting 0s, the TOSH_rfm_rx_bit() in TOS_SIGNAL_HANDLER(SIG_OUTPUT_COMPARE2B, ()) of mote 1 is called. And because radio_active[1] == 0, TOSH_rfm_rx_bit() returns 0. After 12 bits, it signal 
ChannelMon.idleDetect() to show the channel is free. But actually mote 0 is using the channel and transmitting 0s.Why is it so? Any help is appreciated.Regards,Haibin
On 6/2/06, Liu Haibin [EMAIL PROTECTED] wrote:
Hi,I have a question about the following code from Rfm_model.c. The parameter bit can be 1 or 0. When simple_trasmit is transmitting bit 1, transmitting[modeID] is set to 1, meaning it's transmitting. However, when simple_transmit is transmitting bit 0, transmitting[modeID] is set to 0, meaning it's not transmitting (actually it's transmitting bit 0). Why is it so? I must have the concept wrong. Could any help me on this?
void simple_transmit(int moteID, char bit) { int i;  transmitting[moteID] = bit; for (i = 0; i  tos_state.num_nodes; i++) { radio_active[i] += bit; }}Regards,

Haibin


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] question on simple_transmit from Rfm_model.c

2006-06-02 Thread Liu Haibin
Hi,I have a question about the following code from Rfm_model.c. The parameter bit can be 1 or 0. When simple_trasmit is transmitting bit 1, transmitting[modeID] is set to 1, meaning it's transmitting. However, when simple_transmit is transmitting bit 0, transmitting[modeID] is set to 0, meaning it's not transmitting (actually it's transmitting bit 0). Why is it so? I must have the concept wrong. Could any help me on this?
void simple_transmit(int moteID, char bit) { int i;  transmitting[moteID] = bit; for (i = 0; i  tos_state.num_nodes; i++) { radio_active[i] += bit; }}Regards,
Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] atomic use in tutorial lesson 4

2006-05-25 Thread Liu Haibin
Hi,I found that in tutorial lesson 4, atomic is used as followsmessage-val = value;atomic { message-src = "">}Since we don't have any async interface used here, why do we need atomic to protect this assignment here? And why this assignment alone, how about the assignment one line above?
Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] fan-in in Sense application in tutorial lesson 2

2006-05-24 Thread Liu Haibin
Hi,I have a question on the Sense application in tutorial lesson 2. Why does SenseM want to use StdControl interface which is connected to DemoSensorC, since Main's StdControl is already connected to DemoSensorC's StdControl. I went through the code and couldn't understand this fan-in. The StdControl doesn't have any event and SenseM doesn't use its StdControl interface, then why is there such a fan-in? Can anyone give some explanation on this one? Thanks.
Regards,Haibin
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] problem on installing moteiv tinyos on linux fedora 3

2006-05-04 Thread Liu Haibin

Hi,

I got a problem when I was installing the moteiv tinyos on Linux
Fedora 3. I followed the instruction at
http://www.moteiv.com/community/Tmote_Linux_install. But when I tried
to install TinyOS Java Tools with the command

cd $TOSROOT/tools/java; make;

I got some following errors.

/usr/local/bin/ncg: line 13: /usr/local/bin/nescc-ncg: No such file or directory
/usr/local/bin/ncg: line 13: exec: /usr/local/bin/nescc-ncg: cannot
execute: No such file or directory
make[3]: *** [DripConsts.java] Error 126
/usr/local/bin/mig: line 13: /usr/local/bin/nescc-mig: No such file or directory
/usr/local/bin/mig: line 13: exec: /usr/local/bin/nescc-mig: cannot
execute: No such file or directory
make[3]: *** [IdentMsg.java] Error 126
/usr/local/bin/mig: line 13: /usr/local/bin/nescc-mig: No such file or directory
/usr/local/bin/mig: line 13: exec: /usr/local/bin/nescc-mig: cannot
execute: No such file or directory
make[3]: *** [FSOpMsg.java] Error 126
/usr/local/bin/mig: line 13: /usr/local/bin/nescc-mig: No such file or directory
/usr/local/bin/mig: line 13: exec: /usr/local/bin/nescc-mig: cannot
execute: No such file or directory
make[3]: *** [XnpMsg.java] Error 126
/usr/local/bin/mig: line 13: /usr/local/bin/nescc-mig: No such file or directory
/usr/local/bin/mig: line 13: exec: /usr/local/bin/nescc-mig: cannot
execute: No such file or directory

Could any one help on this?


Regards,
Haibin

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help