[Tinyos-help] [Tinyos-devel] DelugeT2 and MIB600, serialforwarder
Razvan Musaloiu-E.
razvanm at cs.jhu.edu
Thu Sep 4 06:53:47 PDT 2008
Hi!
Thanks for the patch! There is one thing I would like to warn about: the
serial upload protocol for Deluge T2 doesn't use any user level acks and
the SF TCP protocol doesn't indicate the failure of a failure of a serial
write. I argue for adding support for this as part of this thread:
https://www.millennium.berkeley.edu/pipermail/tinyos-devel/2008-June/thread.html#3052
Because of this limitation I stop trying to made Deluge T2 work using
the SF protocol.
Note: a good news is that MIG600 is using a serial speed of 57600 which
should make serial writer failure very infrequent. :-)
--
Razvan ME
On Thu, 21 Aug 2008, Vincent Borrel wrote:
> Hi,
>
> I have been trying to get Deluge T2 to work with an MIB600 programming board.
>
> I finally managed to get it to work using a serialforwarder (on default port
> 9002), and adding two modifications:
>
> in $TOSROOT/tinyos-2.x/support/sdk/python/tos.py, I added the timeout
> parameter to SFClient.write()
> @line 713
> def write(self, payload, timeout):
> instead of
> def write(self, payload):
> (hoping it doesn't break havoc, which normally shouldn't)
>
>
> the python script tos-deluge has also been modified. Here is the diff:
>
> 402,403c402,403
> < if sys.argv[2] == 'sf':
> < baudrate = 0
> ---
>> if sys.argv[2] in BAUDRATES:
>> baudrate = BAUDRATES[sys.argv[2]]
> 405,428c405,417
> < if sys.argv[2] in BAUDRATES:
> < baudrate = BAUDRATES[sys.argv[2]]
> < else:
> < try:
> < baudrate = int(sys.argv[2])
> < except:
> < print "ERROR: Wrong baudrate"
> < sys.exit(-1)
> <
> < # Initializes serial or serialforwarder port communication
> < if baudrate == 0:
> < try:
> < s = tos.SFClient(sys.argv[1], 9002)
> < am = tos.AM(s)
> < except:
> < print "ERROR: Unable to initialize network port connection to", sys.argv[1]
> < sys.exit(-1)
> < else:
> < try:
> < s = tos.Serial(sys.argv[1], baudrate, flush=True, debug=False)
> < am = tos.AM(s)
> < except:
> < print "ERROR: Unable to initialize serial port connection to", sys.argv[1]
> < sys.exit(-1)
> ---
>> try:
>> baudrate = int(sys.argv[2])
>> except:
>> print "ERROR: Wrong baudrate"
>> sys.exit(-1)
>>
>> # Initializes serial port communication
>> try:
>> s = tos.Serial(sys.argv[1], baudrate, flush=True, debug=False)
>> am = tos.AM(s)
>> except:
>> print "ERROR: Unable to initialize serial port connection to", sys.argv[1]
>> sys.exit(-1)
>
> I hope this can be useful to the community.
>
> Vincent.
>
More information about the Tinyos-help
mailing list