File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 453, in read
buf = os.read(self.fd, size-len(read))
OSError: [Errno 11] Resource temporarily unavailable
After researching and trying the solution of several sites and forums I have not been able to fix it.
This is a serial adapter that I use: https://www.itead.cc/foca.html
The code is very simple and I dont understand what is happen.
Code: Select all
ser = serial.Serial('/dev/ttyUSB0',9600)
while 1:
while (ser.inWaiting()>0):
incoming = ser.readline()
print incoming
In some places they recommend using "if (ser.inWaiting()>0)" but it fails faster.
I used python.
The idea is to receive the data in raspberry pi for unlimited time.
Thanks for help1