nesc

Module does not receive data through UART, TinyOS Progeamming

偶尔善良 提交于 2019-12-12 04:56:06
问题 Module does not receive data through UART, help with TinyOS Postby Telosb » Tue Jul 15, 2014 6:47 Dear Memebers, i am new to the tinyos programming. I am working with the KMoteB from: http://www.tinyosmall.com/product_p/100-101.htm I use the YETI2 Plugin and the TinyOS compiler. The problem is, that if i send data via printf through the Serial Interface to the computer, i am able to receive it as sended. On the other hand the PC-to-Mote Communication does not work. The RX LED light up, but

Compile error when creating packet

橙三吉。 提交于 2019-12-11 16:14:20
问题 I'm studying THIS tutorial for tinyos and I wanted to try it out. I try to create the packet but it gives me the following error. I don't know what's wrong. It is probably something simple but I can't figure out what it is. #include "TestMsg.h" ... event void AMControl.startDone(error_t error) { if (error == SUCCESS) { call Leds.led0On(); //create packet TestMsg_t* msg = call Packet.getPayload(&packet, sizeof(TestMsg_t)); msg->NodeID = TOS_NODE_ID; // // //TODO in the meantime this can change

how to parse customer message?

筅森魡賤 提交于 2019-12-11 02:57:59
问题 i use customer message and send it broadcast over radio channel, i use example 6 ( CounterSend ) from this link . when i build this project as micAz on mote 1, after this i use Xsniffer (TOSBase) on the mote that i will use it on the serial usb board (520). after that i open Xsniffer program to see the radio packet and they appeared as following : on other hand, to use Xserver i use XMeshBase then type on cygwin terminal : xserve -device=com4 i got this!! but i can't understand what it

xserver didn't show result from Xsensor

这一生的挚爱 提交于 2019-12-07 23:14:11
问题 i have build the example Xsensor for 420cc then i plug it and put the sensor board on it, on other side for the serial board i build Xsniffer (TOSBase) to the mote that i need to put it on the 520MiP serial USB. To see the message send form mote 1 to the mote 2, i try to open cygwin terminal and type xserve -device=com4 then it open serial device but there is nothing display !! i have try to change the (TOSBase) by (XMeshBase) to see if this will be useful, but this mote with (XMeshBase) use

xserver didn't show result from Xsensor

余生颓废 提交于 2019-12-06 06:58:11
i have build the example Xsensor for 420cc then i plug it and put the sensor board on it, on other side for the serial board i build Xsniffer (TOSBase) to the mote that i need to put it on the 520MiP serial USB. To see the message send form mote 1 to the mote 2, i try to open cygwin terminal and type xserve -device=com4 then it open serial device but there is nothing display !! i have try to change the (TOSBase) by (XMeshBase) to see if this will be useful, but this mote with (XMeshBase) use it on serial USB, but still there is no output on xserve. note: when i try to open MoteVeiw the output

Is it OK to use a code block as an argument for a C macro?

核能气质少年 提交于 2019-12-04 15:58:51
问题 I have a pattern that is basically some boilerplate code with a part that varies in the middle if(condition){ struct Foo m = start_stuff(); { m.foo = bar(1,2); m.baz = 17; } //this part varies end_stuff(); } Is it OK to make a macro taht takes that intermediate code block as an argument? The rules for macro expansion in C seem awfully complicated so I am not sure if there aren't any corner cases that could come and bite me in the future (in particular, I don't understand how the macro