Hi All, On Mon, Jul 14, 2008 at 7:32 PM, Stefano Kismet Lenzi <[EMAIL PROTECTED]> wrote:
> On Sat, Jul 12, 2008 at 18:36, Federico Porceddu > <[EMAIL PROTECTED]> wrote: > > Hi All, > > i'm trying to use TestSerial on Tossim (compiling with make micaz sim-sf > ) > > I modified the TestSerial.h in this way: > > ... > > typedef nx_struct test_serial_msg { > > nx_uint16_t counter; > > nx_union { > > nx_uint8_t a; > > nx_uint32_t b; > > } prova_t; > > } test_serial_msg_t; > > > > ... > > > > I've tried to send messages with the java application TestSerial.java. > > Does the original TestSerial works on TOSSIM ? Yes, it work. I just add the nx_union. I did not modified TOSH_DATA_LENGTH because it is just 6 bytes and the payload size in serial message is 12 bytes (right?) But i made another test. I don't know where is the proble, but in the original TestSerial.h typedef nx_struct test_serial_msg { nx_uint16_t counter; } test_serial_msg_t; i modify just nx_uint16_t counter; to *nx_uint32_t* counter (so 4 bytes); typedef nx_struct test_serial_msg { *nx_uint32_t *counter; } test_serial_msg_t; i make another time mig files for python and java, recompile java, run application and there is the same problem!! is there a problem with serial messages on TOSSIM and *nx_uint32_t* ?? > > > > In this case: > > DEBUG (0): Received serial message (0x191ea23c) of type 137 and length 6 > @ > > 0:0:4.367578128 //dbg from SerialActiveMessageC.nc > > receive:00 00 00 00 00 06 00 89 00 00 00 00 00 00 > > DEBUG (0): Messaggio Ricevuto : 0:0:4.367578128 //dbg from TestSerialC.nc > > > > In other case: > > DEBUG (0): Received serial message (0x191ea23c) of type 97 and length 157 > @ > > 0:0:5.390625000 > > 9d 14 61 dc 9d 14 61 00 02 00 00 00 00 d9 00 18 00 00 00 5a 01 00 00 00 > 00 > > 00 00 e8 a4 f2 7f fe ff ff ff 00 00 00 00 90 bd b8 6c 03 00 00 00 74 a5 > d9 > > 00 b0 90 f3 7f 24 38 f6 7f 5c 83 f2 7f 00 00 00 00 78 22 ee 00 00 00 00 > 00 > > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 0b d9 00 0c 00 00 00 > > c6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 > > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > > > > and it doesn't signal the Receive. Receive. (so message is not received > from > > my TestSerialC.nc). > > Does it mean that TOSSIM receive the message that you sent with the > TestSerail JAVA program, but the data received on the simulated node > on TOSSIM doesn't seem correct and it is discarded beacuse the packet > type is not the one expected by the node? Yes, randomly Packet Type and Lenght are not right, so they are discarded. > > I think that the problem may rely on either: > - The implementation of the communication channel between TOSSIM e Java > - The implementation of the serialization of Packet used for Python > and Java message > > > Randomly sometimes works like in the first case, sometimes like the > second > > case. > > is there a problem with nx_union..? or in the Tossim? > > Can i use nx_union in the message definition like i do? > > I hope that some TOSSIM and MIG expert may better clarify your doubts Yes, I hope that someone can help me :) Thanks in advance. ~~~ Federico Porceddu
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help