Go to advanced search

by tomas_evatech
Tue Feb 25, 2020 5:49 pm
Forum: Python
Topic: termios.error and IOError when reading UART device
Replies: 4
Views: 453

Re: termios.error and IOError when reading UART device

If you go back to trapping the exception and retrying (without closing the port), does it start to return data again, or fail every time from then on? I tried that. Once It throws a serial exception, it keeps doing so until I restart the program. I notice you are using "Serial: 8250/16550 driver", ...
by tomas_evatech
Mon Feb 24, 2020 10:48 pm
Forum: Python
Topic: termios.error and IOError when reading UART device
Replies: 4
Views: 453

Re: termios.error and IOError when reading UART device

OK. I disabled all instances of "ser.open()" and "ser.close()" as well as the try/except clause. After the 453rd iteration, I get the following error: Traceback (most recent call last): File "204.py", line 14, in <module> line = ser.readline() File "/usr/lib/python2.7/dist-packages/serial/serialposi...
by tomas_evatech
Mon Feb 24, 2020 6:04 pm
Forum: Python
Topic: termios.error and IOError when reading UART device
Replies: 4
Views: 453

termios.error and IOError when reading UART device

I wrote a python program for continuously reading serial data from a GPS receiver (http://navspark.mybigcommerce.com/ns-hp-gl-gps-glonass-rtk-receiver/). The data is in NMEA format. Here is my code: from time import sleep import serial from os import system count = 0 DELAY = 2 ser = serial.Serial('/...

Go to advanced search