> Hi everybody,
> I use telosb motes in my network.
> I want to read from the serial port by using a python script, but it
> doesn't read well.

Do you really need to read from the serial port from the python script?

How about using the C serial forwarder and attaching to the serial forwarder 
from a Python script? Possibly by using MoteIF.py?

One example for using C-SF/MoteIF to use with printf statements is in:
http://www.comnets.uni-bremen.de/gitweb/?p=mab-tinyos-2.x-contrib.git;a=tree;f=uob/apps/PrintfPyClient

Markus

> Is 115200 the correct baud rate?
> Here is the code:
> 
> #!/usr/bin/python
> 
> import serial
> import time
> 
> def main():
>      var = 0
>      ser = serial.Serial(port='/dev/ttyUSB0', baudrate=115200,
> bytesize=8, parity='N', stopbits=1, timeout=60, xonxoff=0, rtscts=0)
>      while 1 :
>          line = ser.readline(200)
>          print line
> 
> if __name__=='__main__':
>      main()
> 
> Someone help me!
> Thanks
> _______________________________________________
> 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