[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /dev/ttyUSB0 communication - shell script - Watchport/H



Ron Johnson wrote:
> I just Googled "linux listen to serial port", and got several
> interesting hits.
> 
> From reading those links, this Python snippet *might* work:
> 
> import sys
> f = open('/dev/ttyUSB0', 'r')
> try:
>     while 1:
>         l = f.readline()
>         print l
> except:
>     f.close
> 
I'll try it, but I still need to send commands to this sensors. tty port
should be also properly configured... I've found ckermit software and
picocom which looks promising. We'll see :)

Best regards,
Tomek Kruszona



Reply to: