Re: [Tinyos-help] Timer precision problem during proting to platform
Hi Vlado, thanks for the mail it helped a lot. I implemented this the following way like described but the TimerMilli was doing random periodes. For example I tried to get a fire every 1ms and I got it for every 700us. I think my HPL works fine, because if I use the HPL component as separate I can get correct fire events. But when I go through all the transformation it behaves strange. For sure I am doing something wrong. Just to make sure I underestand you right, could you please confirm my steps? Steps: - I create a HPL for the timer where 1 tick has 1/16=0,0625us - I provide an alarm, counter interface in HPL following way provides interface Counter TMicro, uint16_t as Counter provides interface Alarm TMicro, uint16_t as Alarm[ uint8_t id ]; - the counter signalises overflow in 4.096ms = (65536 ticks) - the alarm is implemented using the compare register, and the fire event is the compare match with the counter - I transform the counter to 32bit 1ms counter following way, 2^14 ticks = 16384 * 0.0625 = 1024 which is aprox. 1ms CounterMilli32C.nc: components CounterMicro16C as CounterFrom; components new TransformCounterC(TMilli,uint32_t,TMicro,uint16_t,14,uint32_t) as Transform; Counter = Transform.Counter; Transform.CounterFrom - CounterFrom; - I transform the alarm to 32bit 1ms counter following way, 14: 2^14 ticks = 16384 * 0.0625 = 1024 which is aprox. 1ms AlarmMilli32C.nc: components new AlarmMicro16C() as AlarmFrom; components CounterMilli32C as Counter; components new TransformAlarmC(TMilli,uint32_t,TMicro,uint16_t,14) as Transform; Init = AlarmFrom; Alarm = Transform; Transform.AlarmFrom - AlarmFrom; Transform.Counter - Counter; - I provide both AlarmMilli32C and CounterMilli32C to HilTimerMilliC.nc so I can use the TimerMilli interface for timing: HilTimerMilliC.nc: components new AlarmMilli32C(); components new AlarmToTimerC(TMilli); components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI)); Init = AlarmMilli32C; TimerMilli = VirtualizeTimerC; VirtualizeTimerC.TimerFrom - AlarmToTimerC; AlarmToTimerC.Alarm - AlarmMilli32C; Thank you very much for the help, greetings Attila From: Vlado Handziski handz...@tkn.tu-berlin.de To: Attila Strba st...@yahoo.com Cc: tinyos-help@millennium.berkeley.edu Sent: Tue, March 16, 2010 3:46:07 AM Subject: Re: [Tinyos-help] Timer precision problem during proting to platform On Sun, Mar 14, 2010 at 23:50, Attila Strba st...@yahoo.com wrote: Hi Guys, I am trying to port the TinyOS to the Dolphin EO3000I chip from EnOcean and I have a poblem with the Timer precission. As I read from the TEP 102, it is written that the HLP timer interface should provide either 32kHz or 1ms or 1us tick precision. The Dolphin runs on 16MHz clock. The Timer0 I am trying to use is 16bit, uses the same clock source and it has the possibility to use either 2,4,8 prescaler. But that's all, so in best case using prescaler 8 I would get 0.5us pro 1 tick. The TEP 102 is only specifying how the HIL _must_ look, and provides examples how the lib/timer components can be used to build a flexible HAL layer. The HPL component interfaces are fully driven by the hardware characteristics, so you can do whatever you like there. My question is what to do with this? I am far away from the values TEP102 considers. The transformation components are only for the width adjustment right? (i.e. TransformAlarmC). Or should I manually adjust the values I get through the HPL interface using constants (multiplication of the input values by 2) such way that I get 1us interface? My suggestion is to expose the maximal precision on HPL and as Counters/Alarms on HAL level and then use TransformAlarmC which also transforms precision (to a lower one) to provide the HIL. Vlado Any help is highly apritiated, greetings Attila ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Porting C code to NesC
Hello, I have C code for Low Density Parity Check codes and i have to port it on nesC. Can anybody give me idea how to do it?? Thanks a lot in advance -- Umay Kulsoom NUST Islamabad, Pakistan ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Porting C code to NesC
Hi, I think your question is very abstract. What do you want to with it later? Do you want to encode your messages using LDPC? If so, IMHO - it's not possible, since in TinyOS you are dealing with information that was already (successfully) decoded. The FEC should be performed on a lower level. Arik On Tue, Mar 16, 2010 at 12:46, Umay Kulsoom umay.kuls...@gmail.com wrote: Hello, I have C code for Low Density Parity Check codes and i have to port it on nesC. Can anybody give me idea how to do it?? Thanks a lot in advance -- Umay Kulsoom NUST Islamabad, Pakistan ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Best Regards, Arik Sapojnik ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Porting C code to NesC
Hi, Why to convert it in NesC? You can call C code from NesC. Hence write new code in NesC that calls the specific C function(s). regards, -- Faisal Aslam Umay Kulsoom wrote: Hello, I have C code for Low Density Parity Check codes and i have to port it on nesC. Can anybody give me idea how to do it?? Thanks a lot in advance -- Umay Kulsoom NUST Islamabad, Pakistan ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Paging for the webmaster of http://www.tinyos.net/
Hi, This might be totally irrelevant, but I am wondering if the website ( http://www.tinyos.net/) will be fixed soon, so that I can create a user account and post a job ad on the site? Right now, the site says The requested URL /scoop/newuser was not found on this server. whenever I try to create an account. Best regards, Yee Wei ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] about ack with rf230
Hello, I need help regarding ack with rf230 transceiver. I checked that hardware ack work for me with the TestAcks application. But as I've seen in a post, i can't use hardware ack in a single hop network with base station sink. So how should i proceed to use ack in a single hop network with base station and platforms running rf230? I didn't manage to make software ack work with rf230 using the TestAcks application in the T2 tree. Any help would be very much appreciated. Thanks -- Cyril ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] 'make micaz sim' errors
Hii I am facing this error with make micaz sim : mkdir -p simbuild/micaz placing object files in simbuild/micaz writing XML schema to app.xml compiling MultihopOscilloscopeAppC to object file sim.o ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim -fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\) -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=simbuild/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10 -I/opt/tinyos-2.1.0/tos/lib/net/ -I/opt/tinyos-2.1.0/tos/lib/net/lqi -I/opt/tinyos-2.1.0/tos/chips/cc2420/interfaces -DIDENT_APPNAME=\MultihopOscillo\ -DIDENT_USERNAME=\ashish\ -DIDENT_HOSTNAME=\ashish-laptop\ -DIDENT_USERHASH=0x6d771dbbL -DIDENT_TIMESTAMP=0x4b9fa48fL -DIDENT_UIDHASH=0x3baa3460L -Wno-nesc-data-race MultihopOscilloscopeAppC.nc -fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xml MultihopOscilloscopeC.nc:20:34: error: MultihopOscilloscope.h: No such file or directory In file included from MultihopOscilloscopeAppC.nc:21: In component `MultihopOscilloscopeC': MultihopOscilloscopeC.nc:64: syntax error before `local' MultihopOscilloscopeC.nc: In function `Boot.booted': MultihopOscilloscopeC.nc:80: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc:80: (Each undeclared identifier is reported only once MultihopOscilloscopeC.nc:80: for each function it appears in.) MultihopOscilloscopeC.nc:80: `DEFAULT_INTERVAL' undeclared (first use in this function) MultihopOscilloscopeC.nc: In function `RadioControl.startDone': MultihopOscilloscopeC.nc:99: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc: In function `SerialControl.startDone': MultihopOscilloscopeC.nc:114: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc: In function `startTimer': MultihopOscilloscopeC.nc:134: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc: In function `Receive.receive': MultihopOscilloscopeC.nc:152: `oscilloscope_t' undeclared (first use in this function) MultihopOscilloscopeC.nc:152: `in' undeclared (first use in this function) MultihopOscilloscopeC.nc:152: syntax error before `)' MultihopOscilloscopeC.nc:153: `out' undeclared (first use in this function) MultihopOscilloscopeC.nc:155: syntax error before `)' MultihopOscilloscopeC.nc:176: syntax error before `)' MultihopOscilloscopeC.nc: In function `Snoop.receive': MultihopOscilloscopeC.nc:228: `oscilloscope_t' undeclared (first use in this function) MultihopOscilloscopeC.nc:228: `omsg' undeclared (first use in this function) MultihopOscilloscopeC.nc:233: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc: In function `Timer.fired': MultihopOscilloscopeC.nc:254: `NREADINGS' undeclared (first use in this function) MultihopOscilloscopeC.nc:256: `oscilloscope_t' undeclared (first use in this function) MultihopOscilloscopeC.nc:256: `o' undeclared (first use in this function) MultihopOscilloscopeC.nc:256: syntax error before `)' MultihopOscilloscopeC.nc:261: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc:276: wrong type argument to increment MultihopOscilloscopeC.nc: In function `Read.readDone': MultihopOscilloscopeC.nc:299: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc:299: subscripted value is neither array nor pointer In component `MultihopOscilloscopeAppC': MultihopOscilloscopeAppC.nc: At top level: MultihopOscilloscopeAppC.nc:37: `AM_OSCILLOSCOPE' undeclared here (not in a function) MultihopOscilloscopeAppC.nc:39: `AM_OSCILLOSCOPE' undeclared here (not in a function) MultihopOscilloscopeAppC.nc:48: `AM_OSCILLOSCOPE' undeclared here (not in a function) MultihopOscilloscopeAppC.nc:49: `AM_OSCILLOSCOPE' undeclared here (not in a function) make: *** [sim-exe] Error 1 How do I solve it -- View this message in context: http://old.nabble.com/%27make-micaz-sim%27-errors-tp24645741p27920126.html Sent from the TinyOS - Help mailing list archive at Nabble.com. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Porting C code to NesC
Hi, * Please send the e-mails to the entire list. TinyOS provides only down to the second layer (MAC) services. Where the FEC is the 1st layer (Physical) functionality. Let's say you want to send a message M = 0xABCD (2 bytes). The MAC layer will add some header and footer: --- | Header | Data | Footer | | (Addr.) | (0xABCD) | (CRC) | --- Lets say it adds 24 bytes. And *then *the physical layer will add all the FEC So, if you use a FEC code with rate 1/2, instead of 24 + 2 = 26 bytes, your will actually transmit 52 bytes. On the receiver side you do exactly the opposite: decode, see if the CRC is OK, remove MAC header and footer and then you get your data. In case you will encode the initial data - 0xABCD, to 0xAABBCCDD, MAC and the physical layer will still think this is regular payload and will NOT use the properties of LDPC to correct the flipped bits. This means you will be able to detect\correct only those packets, where the bits were flipped but the CRC check was OK. Since in TinyOS CRC is 16 bits, this will happen with probability of 1/2^16 = 1/65536. *BUT* You should check the ability to disable the CRC feature (depends on your RF HW) in CC2420 register MODEMCTRL0.AUTOCRC is responsible for that. If you do disable it, I think it will be possible. Best, Arik On Tue, Mar 16, 2010 at 16:22, Umay Kulsoom umay.kuls...@gmail.com wrote: Hello, Thanks a lot for your reply on tinyos-help mailing list regarding my query for porting C code into NesC. Actually i have to encode the packets at the source code using LDPC coding. As per your reply it seems that its not possible!! Can you please guide me how it is not possible. I am very new to tinyos so dont have much idea about it. I have to simulate it using TOSSIM. Thanks in advance. Looking forward -- Umay Kulsoom MS Thesis Student School of Electrical Engineering and Computer Science National University of Sciences and Technology Islamabad, Pakistan -- Best Regards, Arik Sapojnik On Tue, Mar 16, 2010 at 13:41, Faisal Aslam as...@informatik.uni-freiburg.de wrote: Hi, Why to convert it in NesC? You can call C code from NesC. Hence write new code in NesC that calls the specific C function(s). regards, -- Faisal Aslam Umay Kulsoom wrote: Hello, I have C code for Low Density Parity Check codes and i have to port it on nesC. Can anybody give me idea how to do it?? Thanks a lot in advance -- Umay Kulsoom NUST Islamabad, Pakistan ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Best Regards, Arik Sapojnik ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] make micaz sim error
mkdir -p simbuild/micaz placing object files in simbuild/micaz writing XML schema to app.xml compiling MultihopOscilloscopeAppC to object file sim.o ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim -fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\) -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=simbuild/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10 -I/opt/tinyos-2.1.0/tos/lib/net/ -I/opt/tinyos-2.1.0/tos/lib/net/lqi -I/opt/tinyos-2.1.0/tos/chips/cc2420/interfaces -DIDENT_APPNAME=\MultihopOscillo\ -DIDENT_USERNAME=\ashish\ -DIDENT_HOSTNAME=\ashish-laptop\ -DIDENT_USERHASH=0x6d771dbbL -DIDENT_TIMESTAMP=0x4b9fa48fL -DIDENT_UIDHASH=0x3baa3460L -Wno-nesc-data-race MultihopOscilloscopeAppC.nc -fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xml MultihopOscilloscopeC.nc:20:34: error: MultihopOscilloscope.h: No such file or directory In file included from MultihopOscilloscopeAppC.nc:21: In component `MultihopOscilloscopeC': MultihopOscilloscopeC.nc:64: syntax error before `local' MultihopOscilloscopeC.nc: In function `Boot.booted': MultihopOscilloscopeC.nc:80: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc:80: (Each undeclared identifier is reported only once MultihopOscilloscopeC.nc:80: for each function it appears in.) MultihopOscilloscopeC.nc:80: `DEFAULT_INTERVAL' undeclared (first use in this function) MultihopOscilloscopeC.nc: In function `RadioControl.startDone': MultihopOscilloscopeC.nc:99: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc: In function `SerialControl.startDone': MultihopOscilloscopeC.nc:114: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc: In function `startTimer': MultihopOscilloscopeC.nc:134: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc: In function `Receive.receive': MultihopOscilloscopeC.nc:152: `oscilloscope_t' undeclared (first use in this function) MultihopOscilloscopeC.nc:152: `in' undeclared (first use in this function) MultihopOscilloscopeC.nc:152: syntax error before `)' MultihopOscilloscopeC.nc:153: `out' undeclared (first use in this function) MultihopOscilloscopeC.nc:155: syntax error before `)' MultihopOscilloscopeC.nc:176: syntax error before `)' MultihopOscilloscopeC.nc: In function `Snoop.receive': MultihopOscilloscopeC.nc:228: `oscilloscope_t' undeclared (first use in this function) MultihopOscilloscopeC.nc:228: `omsg' undeclared (first use in this function) MultihopOscilloscopeC.nc:233: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc: In function `Timer.fired': MultihopOscilloscopeC.nc:254: `NREADINGS' undeclared (first use in this function) MultihopOscilloscopeC.nc:256: `oscilloscope_t' undeclared (first use in this function) MultihopOscilloscopeC.nc:256: `o' undeclared (first use in this function) MultihopOscilloscopeC.nc:256: syntax error before `)' MultihopOscilloscopeC.nc:261: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc:276: wrong type argument to increment MultihopOscilloscopeC.nc: In function `Read.readDone': MultihopOscilloscopeC.nc:299: `local' undeclared (first use in this function) MultihopOscilloscopeC.nc:299: subscripted value is neither array nor pointer In component `MultihopOscilloscopeAppC': MultihopOscilloscopeAppC.nc: At top level: MultihopOscilloscopeAppC.nc:37: `AM_OSCILLOSCOPE' undeclared here (not in a function) MultihopOscilloscopeAppC.nc:39: `AM_OSCILLOSCOPE' undeclared here (not in a function) MultihopOscilloscopeAppC.nc:48: `AM_OSCILLOSCOPE' undeclared here (not in a function) MultihopOscilloscopeAppC.nc:49: `AM_OSCILLOSCOPE' undeclared here (not in a function) make: *** [sim-exe] Error 1 What shall I do to solve this error..Please if somebody has this problem I will be thakfull to give me the solution. -- View this message in context: http://old.nabble.com/make-micaz-sim-error-tp23035711p27920094.html Sent from the TinyOS - Help mailing list archive at Nabble.com. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Timer precision problem during proting to platform
If you like to export a 16MHz timer, the TMicro precision tag is not appropriate. You can use T16mhz (just like we have T32khz) for this particular prescaler, or TOne, etc. like in the atm128 when the prescaler is not fixed. Is this a binary 16MHz clock source or metric? TinyOS is always using binary units. The transforms with the 14 bit-shift look correct to me. Vlado On Tue, Mar 16, 2010 at 08:26, Attila Strba st...@yahoo.com wrote: Hi Vlado, thanks for the mail it helped a lot. I implemented this the following way like described but the TimerMilli was doing random periodes. For example I tried to get a fire every 1ms and I got it for every 700us. I think my HPL works fine, because if I use the HPL component as separate I can get correct fire events. But when I go through all the transformation it behaves strange. For sure I am doing something wrong. Just to make sure I underestand you right, could you please confirm my steps? *Steps:* - I create a HPL for the timer where 1 tick has 1/16=0,0625us - I provide an alarm, counter interface in HPL following way provides interface Counter TMicro, uint16_t as Counter provides interface Alarm TMicro, uint16_t as Alarm[ uint8_t id ]; - the counter signalises overflow in 4.096ms = (65536 ticks) - the alarm is implemented using the compare register, and the fire event is the compare match with the counter - I transform the counter to 32bit 1ms counter following way, 2^14 ticks = 16384 * 0.0625 = 1024 which is aprox. 1ms *CounterMilli32C.nc:* components CounterMicro16C as CounterFrom; components new TransformCounterC(TMilli,uint32_t,TMicro,uint16_t,14,uint32_t) as Transform; Counter = Transform.Counter; Transform.CounterFrom - CounterFrom; - I transform the alarm to 32bit 1ms counter following way, 14: 2^14 ticks = 16384 * 0.0625 = 1024 which is aprox. 1ms *AlarmMilli32C.nc:* components new AlarmMicro16C() as AlarmFrom; components CounterMilli32C as Counter; components new TransformAlarmC(TMilli,uint32_t,TMicro,uint16_t,14) as Transform; Init = AlarmFrom; Alarm = Transform; Transform.AlarmFrom - AlarmFrom; Transform.Counter - Counter; - I provide both AlarmMilli32C and CounterMilli32C to HilTimerMilliC.nc so I can use the TimerMilli interface for timing: *HilTimerMilliC.nc:* components new AlarmMilli32C(); components new AlarmToTimerC(TMilli); components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI)); Init = AlarmMilli32C; TimerMilli = VirtualizeTimerC; VirtualizeTimerC.TimerFrom - AlarmToTimerC; AlarmToTimerC.Alarm - AlarmMilli32C; Thank you very much for the help, greetings Attila -- *From:* Vlado Handziski handz...@tkn.tu-berlin.de *To:* Attila Strba st...@yahoo.com *Cc:* tinyos-help@millennium.berkeley.edu *Sent:* Tue, March 16, 2010 3:46:07 AM *Subject:* Re: [Tinyos-help] Timer precision problem during proting to platform On Sun, Mar 14, 2010 at 23:50, Attila Strba st...@yahoo.com wrote: Hi Guys, I am trying to port the TinyOS to the Dolphin EO3000I chip from EnOcean and I have a poblem with the Timer precission. As I read from the TEP 102, it is written that the HLP timer interface should provide either 32kHz or 1ms or 1us tick precision. The Dolphin runs on 16MHz clock. The Timer0 I am trying to use is 16bit, uses the same clock source and it has the possibility to use either 2,4,8 prescaler. But that's all, so in best case using prescaler 8 I would get 0.5us pro 1 tick. The TEP 102 is only specifying how the HIL _must_ look, and provides examples how the lib/timer components can be used to build a flexible HAL layer. The HPL component interfaces are fully driven by the hardware characteristics, so you can do whatever you like there. My question is what to do with this? I am far away from the values TEP102 considers. The transformation components are only for the width adjustment right? (i.e. TransformAlarmC). Or should I manually adjust the values I get through the HPL interface using constants (multiplication of the input values by 2) such way that I get 1us interface? My suggestion is to expose the maximal precision on HPL and as Counters/Alarms on HAL level and then use TransformAlarmC which also transforms precision (to a lower one) to provide the HIL. Vlado Any help is highly apritiated, greetings Attila ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Log getting erased after power reset
Hi All, I am using tinyos-2.x and telosb motes. I am using log to store some data but the problem is the log is not surviving a power cycle. As soon as am cutting off the power supply am log is getting erased. Please help. Thanks in advance, Kartik ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Redundant statements in 4bitle
2010/3/11 Islam Hegazy isl...@gmail.com: Hi all, In 4bitle implementation in updateNeighborEntryIdx() in LinkEstimatorP.nc has some redundant statements. STATEMENT 1 can be removed because 'lastseq' is always set to 'seq' in STATEMENT 2 The order of STATEMENTS 3 and 4 means that we update a neighbour entry then init if packetGap MAX_PKT_GAP. I think the order should be STATEMENT 4 then STATEMENT 3 with a 'return' at the end of SATEMENT 4. void updateNeighborEntryIdx(uint8_t idx, uint8_t seq) { uint8_t packetGap; if (NeighborTable[idx].flags INIT_ENTRY) { dbg(LI, Init entry update\n); NeighborTable[idx].lastseq = seq;//STATEMENT 1 NeighborTable[idx].flags = ~INIT_ENTRY; } packetGap = seq - NeighborTable[idx].lastseq; dbg(LI, updateNeighborEntryIdx: prevseq %d, curseq %d, gap %d\n, NeighborTable[idx].lastseq, seq, packetGap); NeighborTable[idx].lastseq = seq;//STATEMENT 2 NeighborTable[idx].rcvcnt++; if (packetGap 0) NeighborTable[idx].failcnt += packetGap - 1; // The or with packetGap = BLQ_PKT_WINDOW is needed in case failcnt gets reset above if (//STATEMENT 3 ((NeighborTable[idx].rcvcnt + NeighborTable[idx].failcnt) = BLQ_PKT_WINDOW) || (packetGap = BLQ_PKT_WINDOW) ) updateNeighborTableEst(NeighborTable[idx].ll_addr); if (packetGap MAX_PKT_GAP) //STATEMENT 4 { initNeighborIdx(idx, NeighborTable[idx].ll_addr); NeighborTable[idx].lastseq = seq; NeighborTable[idx].rcvcnt = 1; } } Yes about removing statement 1. Isn't it better to make statement 4 / statement 3 an if - else if statement? - om_p ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] update inquality in 4bitle
On Thu, Mar 11, 2010 at 11:25 AM, Xiaohui Liu whu...@gmail.com wrote: Hi everyone, I was trying to understand the following snippet in 4bitle: void updateNeighborTableEst(am_addr_t n) { minPkt = BLQ_PKT_WINDOW; ... totalPkt = ne-rcvcnt + ne-failcnt; if (totalPkt minPkt) { totalPkt = minPkt; } if (totalPkt == 0) { ne-inquality = (ALPHA * ne-inquality) / 10; } ... updateNeighborTableEst() is only called when at least BLQ_PKT_WINDOW of packets are received, meaning totalPkt is equal to or larger than BLQ_PKT_WINDOW. Why is it necessary to compare totalPkt with minPkt and consider the case totalPkt is zero? Thank you for clarification. This is dead code as Islam Hegazy mentioned in his emails. - om_p ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Snoop and Intercept in CTP
2010/3/11 Islam Hegazy isl...@gmail.com: Hi all, 1) Regarding the snoop function in CtpForwardingEngineP.nc message_t* SubSnoop.Receive(message_t* msg, void *payload, uint8_t len) { am_addr_t proximalSrc = call AMPacket.source(msg); // Check for the pull bit (P) [TEP123] and act accordingly. This // check is made for all packets, not just ones addressed to us. if (call CtpPacket.option(msg, CTP_OPT_PULL)) call CtpInfo.triggerRouteUpdate(); call CtpInfo.setNeighborCongested(proximalSrc, call CtpPacket.option(msg, CTP_OPT_ECN)); return signal Snoop.receive[call CtpPacket.getType(msg)](msg, payload + sizeof(ctp_data_header_t), len - sizeof(ctp_data_header_t)); } I don't understand the logic of this function and why does set the congestion bit when it overhears a message? It should not. The current implementation only sets it, does not use ECN bit, which is why this was not a problem in terms of protocol performance or correctness. 2) Regarding the Intercept function in CtpForwardingEngineP.nc In the function SubReceive.receive() when a message is received it is checked to see if it reached the root or reached a node on the routing path. But the following code in the function is confusing me: if (duplicate) { call CollectionDebug.logEvent(NET_C_FE_DUPLICATE_QUEUE); return msg; } // If I'm the root, signal receive. else if (call RootControl.isRoot()) return signal Receive.receive[collectid](msg, call Packet.getPayload(msg, call Packet.payloadLength(msg)), call Packet.payloadLength(msg)); // I'm on the routing path and Intercept indicates that I should not forward the packet. else if (!signal Intercept.forward[collectid](msg, call Packet.getPayload(msg, call Packet.payloadLength(msg)), call Packet.payloadLength(msg))) return msg; else { dbg(Route, Forwarding packet from %hu.\n, getHeader(msg)-origin); return forward(msg); } What does the third if statement mean? Intercept forward does nothing except returning true. default event bool Intercept.forward[collection_id_t collectid](message_t* msg, void* payload, uint8_t len) { return TRUE; } Basically, I understand that snoop and intercept in CTP do not modify any entries in the tables. Am I right? That is the default implementation of Intercept. It can be redefined by a collection application that wants to modify the packets that are being forwarded in which case the user-defined Intercept.forward function will decide to return TRUE or FALSE. Snoop.receive allows an applications to receive packets that were being forwarded on paths not traversing the current node. To use Intercept or Snoop, you need to wire these interfaces to your application. CollectionC exports these interfaces. - om_p ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] calrification of the steps of CTP
2010/3/14 Islam Hegazy isl...@gmail.com: Hi all, After reading the CTP paper and understanding the implementation in TinyOS, I conducted a numerical example to understand the behaviour of ETX. I had the following observations: 1) Beacon-driven link quality (BLQ) tends to increase the value of ETX, while data-driven link quality (DLQ) tends to decrease the value of ETX. How did you conclude this? 2) BLQ is unidirectional from the incoming beacons, while DLQ is bidirectional from data packets and ACKs. Yes, about the 4bitle implementation. You can look at le for something that uses beacons. 3) BLQ is calculated for all neighbours, while DLQ is calculated for my the next hop neighbour only. Yes. 4) ACK is on 1-to-1 basis, which means that a node sends a single data packet and waits for the ACK before sending a new data packet. Yes. 5) ACK does not include the seq. number of the data packet since it is a 1-to-1 scheme. Yes. 6) Snoop and intercept do not update the neighbour entries in the routing tables. Yes. They are meant to be used by applications. - om_p ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] about ack with rf230
Hi Cyril, Software ACK should work just fine with the RF230! What platform do you use? On the IRIS it works flawlessly, although I did not try the TestAcks application. (The intended use of hardware ACK is that you program your basestation with software ack and all other nodes with hardware ack, or you do not use the sniffing part of basestation). Miklos On Tue, Mar 16, 2010 at 4:00 PM, Cyril Nguyen Van Phu cyril.nguyen-van-...@lcpc.fr wrote: Hello, I need help regarding ack with rf230 transceiver. I checked that hardware ack work for me with the TestAcks application. But as I've seen in a post, i can't use hardware ack in a single hop network with base station sink. So how should i proceed to use ack in a single hop network with base station and platforms running rf230? I didn't manage to make software ack work with rf230 using the TestAcks application in the T2 tree. Any help would be very much appreciated. Thanks -- Cyril ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] SuRF Developer's Kit / OSHAN Announcements
People Power Company (http://www.peoplepowerco.com) announced its SuRF Developer Kit (http://www.peoplepowerco.com/developers/) yesterday. This really is the next generation of open source wireless sensor networks, using an MSP430XV2 core combined with a radio in a single 7x7 mm system-on-a-chip (http://focus.ti.com/docs/prod/folders/print/cc430f5137.html). These chips are not even in production yet, but we got our hands on a bunch, and we're making them available to other wireless sensor network developers. And... they're running TinyOS. Check out the specs sheet on this SuRF developer platform: http://www.peoplepowerco.com/developers/SuRFQuickSpec.pdf. Since the core of the platform is so small, we made the developer board nice and large so you can get your hands in there to prototype new wireless devices. The CC430F5137 SoC featured on the SuRF platform contains all kinds of goodies: * MSPGCC4 support (available now on https://sourceforge.net/projects/mspgcc4/http://sourceforge.net/projects/oshan/ ) * RF1A Radio (300 - 900 MHz with SuRF's matching network configured for 900 MHz, up to +10 dBm, 2-FSK / GFSK / MSK / OOK / ASK modulation, data rates up to 500 kbps, and 255+ byte packets). * The radio gives you at least 2-3x the range of older 2.4 GHz platforms. This kind of range is critical for making consumer home wireless electronics work reliably. * AES-128 and CRC coprocessor * USCI (UART, SPI, IrDA- and I2C-capable) * FLL so you can operate it without an external crystal * Real-time-clock * 12-bit ADC's * 96-segment LCD support is available on the CC430F6137 version of the chip, which is not included on SuRF. We've produced a Linux Live DVD with Ubuntu 9.10 and the next release of TinyOS for the community, and links to the ISO will be posted later this month. The Live DVD will also contain an early version of OSHAN, which stands for Open Source Home Area Network. OSHAN, which is also covered by a BSD license, sits side-by-side with the TinyOS baseline to extend it and provide functionality developers need to commercialize home consumer wireless devices. The SuRF developer kit is a tool to get started with OSHAN. The development process for OSHAN is based on the practices used by Linus Torvalds to guide Linux, with Dr. Peter Bigot as the gatekeeper for OSHAN and its git repository. SuRF and OSHAN received a lot of press during its announcement yesterday. Here are a few articles: http://venturebeat.com/2010/03/15/people-power-releases-sdk-for-wireless-home-energy-sensors/ http://www.techthefuture.com/technology/surf-sdk-diy-smart-grid/ http://www.networkworld.com/news/2010/031510-people-power-pushes-green-wireless.html http://www.infoworld.com/d/developer-world/people-power-pushes-green-wireless-apps-664 http://www.earthtechling.com/2010/03/surf-smart-grid-kit-lets-you-develop-own-smart-grid-device/ http://earth2tech.com/2010/03/15/get-your-open-source-home-energy-developer-kit-courtesy-of-people-power/ http://blogs.zdnet.com/green/?p=10659 http://green.tmcnet.com/topics/green/articles/78637-people-power-intros-wireless-apps-potential-green-apps.htm Of course, leave it to the press to muddle a few facts: TinyOS has thousands of developers, OSHAN is getting ramped up. If you're interested in getting involved with the development of OSHAN, which will remain freely available and strong enough to use in real commercial devices, please contact me. Finally, People Power will be hosting SuRF Competition ( http://www.peoplepowerco.com/contest/). We're giving developers and researchers several months to produce something cool with SuRF, and the winner(s) will be selected by our technical advisory board. The winner will receive 5,000 shares of People Power stock options (someday worth millions), $5,000 USD, and a free SuRF Developer's Kit. You can pre-order your SuRF developer kit here: http://www.peoplepowerco.com/store/surf-developer-s-kit.html. We'll keep you updated as more open source developments are available. Enjoy, -David ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Timer precision problem during proting to platform
Hi Vlado, as far as I read the source and underestood the TEP's right the tag has no influence on the transofrmation calculation right? It just makes sure the timer conversion types does not get mixed ? The clock source is the 16MHz XTAL oscillator driving the miccrocontroller so I guess metric. After 65535 tackts wraps around and 1 tick takes 1/16us. To be honest I don't underestand how could be a microcontroller clock source be binary. Any more idea where I could look for problems? thanx a lot for the help Vlado, greetings Attila From: Vlado Handziski handz...@tkn.tu-berlin.de To: Attila Strba st...@yahoo.com Cc: tinyos-help@millennium.berkeley.edu Sent: Tue, March 16, 2010 5:23:56 PM Subject: Re: [Tinyos-help] Timer precision problem during proting to platform If you like to export a 16MHz timer, the TMicro precision tag is not appropriate. You can use T16mhz (just like we have T32khz) for this particular prescaler, or TOne, etc. like in the atm128 when the prescaler is not fixed. Is this a binary 16MHz clock source or metric? TinyOS is always using binary units. The transforms with the 14 bit-shift look correct to me. Vlado On Tue, Mar 16, 2010 at 08:26, Attila Strba st...@yahoo.com wrote: Hi Vlado, thanks for the mail it helped a lot. I implemented this the following way like described but the TimerMilli was doing random periodes. For example I tried to get a fire every 1ms and I got it for every 700us. I think my HPL works fine, because if I use the HPL component as separate I can get correct fire events. But when I go through all the transformation it behaves strange. For sure I am doing something wrong. Just to make sure I underestand you right, could you please confirm my steps? Steps: - I create a HPL for the timer where 1 tick has 1/16=0,0625us - I provide an alarm, counter interface in HPL following way provides interface Counter TMicro, uint16_t as Counter provides interface Alarm TMicro, uint16_t as Alarm[ uint8_t id ]; - the counter signalises overflow in 4.096ms = (65536 ticks) - the alarm is implemented using the compare register, and the fire event is the compare match with the counter - I transform the counter to 32bit 1ms counter following way, 2^14 ticks = 16384 * 0.0625 = 1024 which is aprox. 1ms CounterMilli32C.nc: components CounterMicro16C as CounterFrom; components new TransformCounterC(TMilli,uint32_t,TMicro,uint16_t,14,uint32_t) as Transform; Counter = Transform.Counter; Transform.CounterFrom - CounterFrom; - I transform the alarm to 32bit 1ms counter following way, 14: 2^14 ticks = 16384 * 0.0625 = 1024 which is aprox. 1ms AlarmMilli32C.nc: components new AlarmMicro16C() as AlarmFrom; components CounterMilli32C as Counter; components new TransformAlarmC(TMilli,uint32_t,TMicro,uint16_t,14) as Transform; Init = AlarmFrom; Alarm = Transform; Transform.AlarmFrom - AlarmFrom; Transform.Counter - Counter; - I provide both AlarmMilli32C and CounterMilli32C to HilTimerMilliC.nc so I can use the TimerMilli interface for timing: HilTimerMilliC.nc: components new AlarmMilli32C(); components new AlarmToTimerC(TMilli); components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI)); Init = AlarmMilli32C; TimerMilli = VirtualizeTimerC; VirtualizeTimerC.TimerFrom - AlarmToTimerC; AlarmToTimerC.Alarm - AlarmMilli32C; Thank you very much for the help, greetings Attila From: Vlado Handziski handz...@tkn.tu-berlin.de To: Attila Strba st...@yahoo.com Cc: tinyos-help@millennium.berkeley.edu Sent: Tue, March 16, 2010 3:46:07 AM Subject: Re: [Tinyos-help] Timer precision problem during proting to platform On Sun, Mar 14, 2010 at 23:50, Attila Strba st...@yahoo.com wrote: Hi Guys, I am trying to port the TinyOS to the Dolphin EO3000I chip from EnOcean and I have a poblem with the Timer precission. As I read from the TEP 102, it is written that the HLP timer interface should provide either 32kHz or 1ms or 1us tick precision. The Dolphin runs on 16MHz clock. The Timer0 I am trying to use is 16bit, uses the same clock source and it has the possibility to use either 2,4,8 prescaler. But that's all, so in best case using prescaler 8 I would get 0.5us pro 1 tick. The TEP 102 is only specifying how the HIL _must_ look, and provides examples how the lib/timer components can be used to build a flexible HAL layer. The HPL component interfaces are fully driven by the hardware characteristics, so you can do whatever you like there. My question is what to do with this? I am far away from the values TEP102 considers. The transformation components are only for the width adjustment right? (i.e. TransformAlarmC). Or should I manually adjust the values I get through the HPL interface using constants (multiplication of the input values by 2) such way that I get 1us interface?
[Tinyos-help] How to use the random value generated by the rand function to start a timer?
Hi All, It may seem to be a silly question but am rather confused as I want to generate a random number between 1 and 50 and then start a timerOneshot with the random value. How can I do that? Thanks in advance, Kartik ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Redundant statements in 4bitle
Yes, if Statement 4 {} else if Statement 3 {} works as well. Regards Islam Hegazy From: Omprakash Gnawali Sent: Tuesday, March 16, 2010 12:45 PM To: Islam Hegazy Cc: TinyOS help Subject: Re: [Tinyos-help] Redundant statements in 4bitle 2010/3/11 Islam Hegazy isl...@gmail.com: Hi all, In 4bitle implementation in updateNeighborEntryIdx() in LinkEstimatorP.nc has some redundant statements. STATEMENT 1 can be removed because 'lastseq' is always set to 'seq' in STATEMENT 2 The order of STATEMENTS 3 and 4 means that we update a neighbour entry then init if packetGap MAX_PKT_GAP. I think the order should be STATEMENT 4 then STATEMENT 3 with a 'return' at the end of SATEMENT 4. void updateNeighborEntryIdx(uint8_t idx, uint8_t seq) { uint8_t packetGap; if (NeighborTable[idx].flags INIT_ENTRY) { dbg(LI, Init entry update\n); NeighborTable[idx].lastseq = seq;//STATEMENT 1 NeighborTable[idx].flags = ~INIT_ENTRY; } packetGap = seq - NeighborTable[idx].lastseq; dbg(LI, updateNeighborEntryIdx: prevseq %d, curseq %d, gap %d\n, NeighborTable[idx].lastseq, seq, packetGap); NeighborTable[idx].lastseq = seq;//STATEMENT 2 NeighborTable[idx].rcvcnt++; if (packetGap 0) NeighborTable[idx].failcnt += packetGap - 1; // The or with packetGap = BLQ_PKT_WINDOW is needed in case failcnt gets reset above if (//STATEMENT 3 ((NeighborTable[idx].rcvcnt + NeighborTable[idx].failcnt) = BLQ_PKT_WINDOW) || (packetGap = BLQ_PKT_WINDOW) ) updateNeighborTableEst(NeighborTable[idx].ll_addr); if (packetGap MAX_PKT_GAP) //STATEMENT 4 { initNeighborIdx(idx, NeighborTable[idx].ll_addr); NeighborTable[idx].lastseq = seq; NeighborTable[idx].rcvcnt = 1; } } Yes about removing statement 1. Isn't it better to make statement 4 / statement 3 an if - else if statement? - om_p___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] TOSSIM
Hai all I installed Moteworks, MoteView softwares of Crossbow, next I want to use TOSSIM. how to install this? and how to use this? please give me the instructions ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] About how to using GenericComm HPLUARTC simultaneously
HI~ I'm facing a problem about how to using GenericComm HPLUARTC simultaneously. The problem is about I have to receive UART's data from my PC so I using HPLUART.get() to receive the data which I transmitted from PC. I also need to using wireless receive and transmit to another mote, so I using GenericComm which including call SendMsg.send(...) and ReceiveMsg.receive(...). Strangely, After I using GenericComm, the function of HPLUART won't work. plz help me to solving this problem. thank you!! Ting-Shuo Chen ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] How does preempted interrupt handlers resume?
Hi all, is it true that a current executing interrupt handler can be preempted by a new interrupt handler? If yes, -- how does the old interrupt handler resume once the new interrupt handler completes its execution? -- does TinyOS maintain sth like the queue of the scheduler to store the preempted interrupt handlers? -- (assume that A, B, C are all some interrupt handlers) A is preempted by B, and B is preempted by C, then after C completes its execution, is the order of executing A , B restricted as B then followed by A? -- Thanks Best Regards, Manchun ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help