![]() | 1 | initial version |
Well i got this type of problem too, and after some time, i have already tryed all those hacks and nothing worked.
I think this problem is caused by some type of problem with arduinos which use bad usb_serial converter chips. The solution that i worked out is puting those lines in the beginning of the client.py:
self.port = Serial()
self.port.port = self.portAdress
self.port.baudrate = self.baudrate
self.port.timeout = self.timeout
self.port.dsrdtr = False
self.port.open()
self.port.setParity(PARITY_NONE)
self.port.setParity(PARITY_ODD)
self.port.setParity(PARITY_NONE)
#with the port open reset the arduino
self.port.setDTR(True)
time.sleep(0.5)
self.port.flushInput()
self.port.setDTR(False)
time.sleep(0.5)
I dont know why, but the parity change did the trick, dont remove it..