Every so often I get the error below
Code: Select all
Traceback (most recent call last):
File "keyColour.py", line 109, in <module>
selectBlue()
File "keyColour.py", line 86, in selectBlue
send_command('setpar hrange {0}...{1}'.format(95, 110))
File "keyColour.py", line 32, in send_command
out += ser.read(1)
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 490, in read
'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Here is the function that generated the error, program is based on one from the jevois website,
Code: Select all
# Send a command to JeVois and show response
def send_command(cmd):
print "HOST>> " + cmd
ser.write(cmd + '\n')
out = ''
time.sleep(0.1)
while ser.inWaiting() > 0:
out += ser.read(1)
if out != '':
print "JEVOIS>> " + out, # the final comma suppresses extra newline, since JeVois already sends one
ps -ef | grep tty to see what was running.
I get the following output,
Code: Select all
ps -ef | grep tty
root 298 1 0 17:02 tty1 00:00:00 /bin/login -f
root 315 297 7 17:02 tty7 00:00:05 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
pi 405 298 1 17:02 tty1 00:00:01 -bash
pi 686 675 0 17:03 pts/0 00:00:00 grep --color=auto tty
As no process is associated with serial0 am I correct in believing that the problem is not due to "multiple access on port" and it is something else?
Has anyone got a suggestion as to what to try next?
thanks
Steve