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



On 2009-09-01 07:42, Tomek Kruszona wrote:
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 :)

Ah. Your original post only mentioned *monitoring* the "weather machine".

--
Brawndo's got what plants crave. It's got electrolytes!


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: /dev/ttyUSB0 communication - shell script - Watchport/H
    ... From reading those links, this Python snippet *might* work: ... import sys ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: [SLE] Keyboard Layout
    ... Please do us all a big favor and just unsubscribe. ... > I do ACTUALLY start reading almost every book from the back -- the INDEX. ... >>> Dear Ken Schneider, ... Also check the archives at http://lists.suse.com ...
    (SuSE)
  • Re: [OT] C++ programming: keeping count of data items read from file
    ... No offence ... the mechanics of reading of lines from a file are concerned. ... data, btw. Seismic data. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: [OT] How to Analyze/Study Source Code?
    ... single source file and then make notes? ... I generally start by reading the documentation that comes with it, ... takes only about half the total time. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: logging a bash script using sudo and time
    ... file, and /var/log/hiMom is empty, regardless of the permissions on ... sys 0m0.016s ... differences in output past that. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)