FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
1,062 views 1 comments
by anonymous

Hi,

I have python script that listen the /dev/ttyUSB1 for GPS and when i launch it i have the following error : 

Traceback (most recent call last):                                                                      

  File "gpsParser.py", line 67, in <module>                                                             

    data = ser.readline()                                                                               

  File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 501, in read                      

    'device reports readiness to read but returned no data '                                            

serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconn

ected or multiple access on port?)      

A part of the scritp where error occurs:

print "Receiving GPS data"

ser = serial.Serial("/dev/ttyUSB1", baudrate = 115200, timeout = 0.5) 

find = False

while find == False:

  print "Waiting for GPRMC data"

  data = ser.readline()

  if data[0:6] == "$GPRMC":  

    parsingData = data.split(",")

    print(parsingData)

    if parsingData[2] == "A":

    parseGPS(data)

    find = True

the whole code available here

I think the problem is caused by a bad baudrate ? What is the correct i have to use ?

ps: I have once a time it worked without this problem but since then nothing works

1 Answer

0 votes
by

Try:

/etc/init.d/gpsd stop

gsmctl -A "AT+QGPS=1"

And close GPS window in WebUI.

Best answer
by anonymous
Thank you so much it works but instead of running continuously it stops after processing one GPRMC.