Python serial quit working after installing linux-image-3.13.0-65-generic

Asked by Chris L8

Today after updating to the linux-image-3.13.0-65-generic 3.13.0-65 Kernel on Lubuntu 14.04.3 LTS two different programs that rely on PySerial quit working. miniterm.py and my ROS (Robot Operating System) based Python node quit working.

The failure is pretty obvious, PySerial says that the port said it was ready but had no data and crashes.

When rebooted and selected 3.13.0-63-generic via GRUB everything worked again.

Is this an issue with the -65 kernel?
Should I report a bug somewhere?
Is there a planned fix?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

If this is not just a one-off error but reproducible, then you should create a bug report about this problem.

Revision history for this message
Dave Hylands (dhylands) said :
#2

I'm helping my brother, who ran into the same problem (using 3.13.0-65 fails with the same exception, going back to 3.13.0-63 works)

Revision history for this message
Dave Hylands (dhylands) said :
#3

We were able to reproduce with this small pythong program:

#!/usr/bin/python
# -*- coding: utf-8 -*-

import os,sys
import serial
import time
import platform
import struct

print 'Mozilla Ammeter Serial Number'

if platform.system() == "Linux":
 serialPort = serial.Serial(port='/dev/ttyACM0', baudrate=1000000, timeout=1)
else:
 serialPort = serial.Serial(port='COM7', baudrate=1000000, timeout=1)

commandBytes = bytearray.fromhex("ff ff 01 02 0E EE") #GET_SERIAL

serialPort.flushInput()

serialPort.write(commandBytes)
serialPort.flush()

bytes = serialPort.read(8)
serialPort.close()

serialNumber = ord(bytes[5]) + (256 * ord(bytes[6]))

print 'Serial Number: ', serialNumber

Under 3.13.0-65 we get the following error when running the above program:

Mozilla Ammeter Serial Number
Traceback (most recent call last):
  File "serialNumber.py", line 24, in <module>
    bytes = serialPort.read(8)
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 460, in read
    raise SerialException('device reports readiness to read but returned no data (device disconnected?)')
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected?)

Can you help with this problem?

Provide an answer of your own, or ask Chris L8 for more information if necessary.

To post a message you must log in.