[Tinyos-help] problem with short packet in tmote ...
Pablo Gil Montaño
pgilmon at yahoo.es
Thu Dec 14 05:31:05 PST 2006
Well, I think there is a very little chance that what I'm going to tell you is causing the problem. But since I'm not able to find some reference to it by using google, I'll post it.
When you change a struct, you must take care of word alignment. The problem is that compilers for som mote's CPUs add extra bytes when structs are not aligned to platform's word size. If you interact with another platform (such as a PC), problems related to different paddings in different platforms might appear.
In order to prevent this problem, you can build all the structs with the following rules:
- Start with the wider data types (uint32_t and uint16_t).
- Finish with uint8_t's, but add them by pairs. If there is an odd number of uint8_t's, just add a dummy one at the end of the struct.
They key is that some CPU cannot access odd addresses, so the struct must be mapped in word (16 bit) blocks.
I repeat, this probably isn't your problem, since you say you have changed a unit32_t for a unit16_t, but just in case...
Regards,
Pablo Gil
----- Mensaje original ----
De: José Ulloa Suárez <julloas at gmail.com>
Para: Lista Tinyos <tinyos-help at Millennium.Berkeley.EDU>
CC: Hemanth H <hemanth at cse.iitk.ac.in>
Enviado: lunes, 11 de diciembre, 2006 15:02:41
Asunto: Re: [Tinyos-help] problem with short packet in tmote ...
Hi, i found your question posted in the TinyOS Mail List. Nowaday
we've been experiencing the same problem with a short packet.
Can you help me if you have found the answer?, or guide us with your
experience in with this problem.
In this link somebody have the same problem:
http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2006-January/014213.html
My tinyos version is 1.1.11-3is
Thank you very much.
__
Jose Ulloa S
Hemanth H escribió:
> Hi
>
> I am using SurgeTelos application to sample an sensor at 100 samples
> per second. I am sending the sampled data through the multihop to the
> base node.(the base node is also sampling data and sending thru UART
> to the comp). I am using about 3 hops max currently and only 4 nodes .
> I have made the following changes to the SurgeMsg packet format. First
> have changed the seqno from 32 bit to 16 bit. Then I have increased
> the no of readings from 1 to 6 in a packet.
>
> I have also made changes to the MultiHopLQI library. First I have
> increased MHOP_QUEUE_SIZE from 2 to 20 and MHOP_HISTORY_SIZE from 4 to
> 40. I did get significant performance improvement with this change. I
> have not changed the MAC and retained it as it is.
>
> I am using the oscilloscope application to display tha data. I have
> used MIG to modify the oscilloscope app. and I am also displaying the
> debug information .
>
> Now with this configuration I run all the nodes at RF power 1 so that
> the testing is easier.
>
> I am facing the following problem
>
> 1 I am having high error rates, How can I improve performance without
> changing the MAC for now.
> 2 When I run the setup and the oscilloscope application the setup runs
> for several seconds properly and then I get an error as follows.
> The packets of the base node are not having any problems but all other
> packets through the radio are having problems. i.e I am only getting
> the header but the body is missing.
>
> Can anybody tell me what I am doing wrong.
>
>
>
> 726
> receive error for net.tinyos.oscil.OscopeMsg (AM type 17): invalid
> length messag
> e received (too short)
> receive error for net.tinyos.oscil.OscopeMsg (AM type 17): invalid
> length messag
> e received (too short)
> message recieved
>
> Oscope message recieved
> Message <OscopeMsg>
> [sourceaddr=0x0]
> [originaddr=0x0]
> [seqno=0x0]
> [originseqno=0x1]
> [hopcount=0x0]
> [type=0x0]
> [data=0x53 0x3f 0x50 0x44 0x59 0x3b ]
> [parentaddr=0x7e]
> [seq_no=0x2d7]
>
> Output from the Listen application
>
> 00 21 08 EF FF FF 7E 00 11 7D
> 1C 00 00 00 00 00 7E 00 11 7D 00 00 00 00 00 00 04 00 00 00 00 00 3B
> 08 48 08 42
> 08 4B 08 3D 08 52 08 7E 00 9D 08
> 00 21 08 23 FF FF 7E 00 11 7D
> 00 21 08 F0 FF FF 7E 00 11 7D
> 00 21 08 25 FF FF 7E 00 11 7D
> 1C 00 00 00 00 00 7E 00 11 7D 00 00 00 00 00 00 04 00 00 00 00 00 33
> 08 4F 08 3F
> 08 52 08 3E 08 52 08 7E 00 9F 08
> 00 21 08 26 FF FF 7E 00 11 7D
> 00 21 08 F2 FF FF 7E 00 11 7D
> 1C 00 00 00 00 00 7E 00 11 7D 00 00 00 00 00 00 04 00 00 00 00 00 7E
> 08 2C 08 4A
> 08 47 08 4F 08 4A 08 7E 00 A0 08
> 00 21 08 F3 FF FF 7E 00 11 7D
> 1C 00 00 00 00 00 7E 00 11 7D 00 00 00 00 00 00 04 00 00 00 00 00 42
> 08 4E 08 4A
> 08 4F 08 43 08 4D 08 7E 00 A1 08
> 00 21 08 28 FF FF 7E 00 11 7D
> 00 21 08 F5 FF FF 7E 00 11 7D
> 1C 00 00 00 00 00 7E 00 11 7D 00 00 00 00 00 00 04 00 00 00 00 00 46
> 08 57 08 40
> 08 58 08 3F 08 50 08 7E 00 A2 08
>
> regards
> hemanth
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help at Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20061214/77cd8c81/attachment.html
More information about the Tinyos-help
mailing list