pycom / pycom-modbus

44 stars 42 forks source link

'UART' object has no attribute 'readall' with the latest firmware #6

Open Wooopz opened 4 years ago

Wooopz commented 4 years ago

Hello, I just upgrade the firmware of my wipy 3 to Pycom MicroPython 1.20.2.rc6 and now i have the error : 'UART' object has no attribute 'readall'

Wipy3 with most recent firmware. uart.readall() returns AttributeError: 'UART' object has no attribute 'readall'

This is pretty crazy, since it is a documented function that has always been supported: https://docs.pycom.io/firmwareapi/pycom/machine/uart.html

readall is used into serial.py . what can i do to bypass this error please ? thanks.

Andi-Ro commented 4 years ago

Hello, While facing the same error, i downgraded the firmware of my WiPy to version 1.18.1 and this seems to work. BUT...this is only a temporary solution as the problem resides in the serial library. This workaround comes from this post : https://forum.pycom.io/topic/3127/clearing-uart-buffers/7 Using the latest stable firmware, i can confirm that using uart.read() instead of uart.readall(), does not work. It would be very nice if someone with experience in these matters would fix this.

CesarChavezRico commented 3 years ago

Hi, I can confirm that using uart.read() instead of uart.readall() DOES work. Tested on FiPy version 1.20.2.r1

The workaround suggested in this post in the pycom forum