Dear all,
I have a problem with unicasting packets using IRIS Zigbee Mote while the
broadcasting is working well. I am not experienced in nesC programming and
TinyOS so please if you know help me.
The main functionality is that the mote is waiting for receiving something from
serial port and then post a task for transmission over radio and vice versa.
First of all, in the configuration file:
for both sending over radio and sending through UART i use the SendMsg
interface.
.........
MyAppM.RadioDataSend -> Comm.SendMsg[0];
MyAppM.RadioDataReceive -> Comm.ReceiveMsg[0];
MyAppM.UartDataSend -> Comm2.SendMsg[0];
In the module file:
module MyAppM{
provides{
interface StdControl;
}
uses{
interface StdControl as CommControl;
interface Timer;
interface Leds;
interface Serial;
interface SendMsg as UartDataSend;
interface SendMsg as RadioDataSend;
interface ReceiveMsg as RadioDataReceive;
}
}
implementation {
........
uint16_t address;
.......
//in the task for sending over radio:
void task SendData_radio()
{
if(sending_packet1) return;
atomic sending_packet1 = TRUE;
if(address == 0){
//send message to all motes-BROADCAST
if (call RadioDataSend.send(TOS_BCAST_ADDR, sizeof(Msg_radio),
&msg_buffer_radio) != SUCCESS)
sending_packet1 = FALSE;
} else {
if (call RadioDataSend.send(address), sizeof(Msg_radio), &msg_buffer_radio)
!= SUCCESS)
sending_packet1 = FALSE;
}
return;
}
.........
I think that the problem is in the above task...I am waiting for your help.
Thanks
Best Regards,
Lena
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help