Hi all,
I send packets from pc ( or a stargate) to a micaz using a serial
communication.
I would like read the content of the packet sent in the micaz mote.
So, I use these statements:
---
event message_t *UARTReceive.receive[am_id_t id](message_t *msg, void
*payload, uint8_t len)
{
    message_t *ret=msg;
    char *buffer=(char*) payload;
    if (buffer[0]=='h')
       call Leds.set(7);

    return ret;
}
----
The message I sent is 'hello'. So, the first character of the payload might
be just 'h' and I might see three leds on.
But the leds are turned off.
Can you tell me where is the mistake in my source code?
Thank in advance

RG

-- 
Platform: Linux Fedora
TinyOS version: 2.x
Programmer: MIB510
Device(s): Micaz, Stargate
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to