Hi

I need some help regarding tinyOS, I am running PppRouter app on my telosb
which is receiving packets from tmote with only one field [difference=0x1]
Now i want to access/check this field's value with an if condition, in this
piece of code below on telosb node

event error_t PppIpv6.receive(const uint8_t data,
unsigned int len) {
struct ip6_hdr iph = (struct ip6_hdr )data;
void payload = (iph + 1);
call Leds.led0Toggle();
signal IPForward.recv(iph, payload, NULL);
*****************
this is where i have a question, how can i check the data packet received
value in the if else condition
If (){ make Pin 26(GP IO) pin as output:}
Else { pin 26 toggles}

whatever i write in else works when i start receiving packets but does not
when i listen through python listener, any idea what would be the field
access in payload or data or how to access the content of packet.

Thanks in advance for your help.


-- 
--------------------------------------------------------------------------------------------------------
Bellamy
Specialist  - iWYZE
https://www.iwyze.co.za/products/car-insurance
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to