I have been able to receive 28 bytes of data using 'Listen' tool so Try
using:

$ java net.tinyos.tools.Listen -comm serial@/dev/ttyS0:micaz

Note: Replace the platform with your platform and port with your
relevant port that is if you are using Windows/Cygwin, then probably
COM1 instead of /dev/ttyS0....


Cheers,
Varun


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dima
Kogan
Sent: Tuesday, June 24, 2008 9:43 AM
To: [email protected]
Subject: Re: [Tinyos-help] Packet size limit for serial communication

The listening program I'm using is seriallisten. This exists in the
standard TinyOS distribution in support/sdk/c in TinyOS 2.0.2 and in
support/sdk/c/sf in the newest CVS. Debug-enabled means replacing
"#undef DEBUG" with "#define DEBUG" in support/sdk/c/sf/serialsource.c
when building the seriallisten app. Further, the results I reported
below are 100% consistent with what I see when I directly cat the
serial device. I.e. the data physically coming across the wire IS what
is being reported by seriallisten. Sorry if anything wasn't clear.

Can I get a confirmation that this is working for anyone? Is anybody
able to successfully transmit packets with larger payloads from an
MSP430-based mote to a computer?

Thanks

Dima

On Mon, 23 Jun 2008 17:24:08 -0600
Michael Schippling <[EMAIL PROTECTED]> wrote:

> I'm sorry but I don't know what "DEBUG-enabled seriallisten output"
> is... What program are you using to receive the data that is printing
> this? It appears that the receiver is using a hard coded 4 byte
> payload to calculate where things should go. Do you get the same
> result with the standard ListenRaw and Listen programs?
> 
> MS
> 
> 
> Dima Kogan wrote:
> > Hi all.
> > 
> > I am having an odd problem with basic serial communication in
> > TinyOS 2 using my MSP430-based motes. It seems that somewhere there
> > exists a limit on the number of bytes in a serial packet (headers
> > and all), and if a packet breaches this limit, the data at the end
> > is cut off. It also seems like this limit corresponds to only 4
> > bytes of payload! For example, here's the DEBUG-enabled
> > seriallisten output when I repeatedly send a serial packet with a
> > 4-byte payload ASCII "1234":
> > 
> > 
> > /opt/tinyos-2.x/support/sdk/c/sf$ ./seriallisten /dev/ttyS0 9600
> > raw 7e 45 00 ff ff 00 00 04 00 0a 30 31 32 33 c2 f2
> > Note: sync
> > raw 7e 45 00 ff ff 00 00 04 00 0a 30 31 32 33 c2 f2
> > received 45 00 ff ff 00 00 04 00 0a 30 31 32 33 c2 f2
> >   crc f2c2 comp f2c2
> > 00 ff ff 00 00 04 00 0a 30 31 32 33 
> > raw 7e 45 00 ff ff 00 00 04 00 0a 30 31 32 33 c2 f2
> > received 45 00 ff ff 00 00 04 00 0a 30 31 32 33 c2 f2
> >   crc f2c2 comp f2c2
> > ...
> > 
> > 
> > This works as it's supposed to. The payload "30 31 32 33" is
> > received along with the crc value "c2 f2". But here's the output
> > when I increase the payload to a 5-byte value ASCII "12345":
> > 
> > raw 7e 45 00 ff ff 00 00 05 00 0a 30 31 32 33 34 59
> > received 45 00 ff ff 00 00 05 00 0a 30 31 32 33 34 59
> >   crc 5934 comp 4aa3
> > Note: bad_crc
> > raw 7e 45 00 ff ff 00 00 05 00 0a 30 31 32 33 34 59
> > received 45 00 ff ff 00 00 05 00 0a 30 31 32 33 34 59
> >   crc 5934 comp 4aa3
> > Note: bad_crc
> > ...
> > 
> > All of the data is received: "30 31 32 33 34", but only one of the
> > crc bytes come through: 59. Naturally, the crc is incorrect.
> > Similar results for larger payloads. Here's what happens with the
> > 10-byte "0123456789":
> > 
> > raw 7e 45 00 ff ff 00 00 0a 00 0a 30 31 32 33 34 35
> > received 45 00 ff ff 00 00 0a 00 0a 30 31 32 33 34 35
> >   crc 3534 comp c04a
> > Note: bad_crc
> > raw 7e 45 00 ff ff 00 00 0a 00 0a 30 31 32 33 34 35
> > received 45 00 ff ff 00 00 0a 00 0a 30 31 32 33 34 35
> >   crc 3534 comp c04a
> > Note: bad_crc
> > raw 7e 45 00 ff ff 00 00 0a 00 0a 30 31 32 33 34 35
> > received 45 00 ff ff 00 00 0a 00 0a 30 31 32 33 34 35
> >   crc 3534 comp c04a
> > Note: bad_crc
> > ...
> > 
> > 
> > My TinyOS code is very simple, essentially calling
> > SerialAMSender.send in a loop. I'm observing this behavior with
> > both the 2.0.2 release of TinyOS and with the newest code from the
> > CVS repo. Has anybody else seen this? Ideas? Thanks in advance
> > 
> > Dima
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> >
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to