I am trying to work with raw GPS data from a USB GPS receiver (Delorme LT-20) through /dev/ttyUSB0/.

My program had been working, but today I get this error:

could not open port /dev/ttyUSB0: [Errno 16] Device or resource busy: '/dev/ttyUSB0'

The program is pretty simple:

import serial
ser = serial.Serial('/dev/ttyUSB0')

How do I fix this?

  • 1
    To rule out the obvious and assuming you made no other changes did you reboot. – Steve Robillard Dec 19 '16 at 5:49
  • What does lsof say? – Bex Dec 19 '16 at 8:08
  • This never gets old. – Dmitry Grigoryev Dec 19 '16 at 10:48
  • Steve Robillard- No changes, reboot, power-down & restart, unplug & reinsert the USB device. no change. It had been working during my earlier experiments. – user3573562 Dec 19 '16 at 15:18
  • Bex- lsof output is here: dropbox.com/s/cqiw9s74n4ah832/lsof.txt?dl=0 I don't see tty or USB anywhere, but I did try gpsd a few days back- could there be a daemon running? (If yes, how do I kill it?) – user3573562 Dec 19 '16 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.