UART Read stopped working Esp8266 v1.11

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
Som
Posts: 2
Joined: Fri Jul 26, 2019 11:47 am

UART Read stopped working Esp8266 v1.11

Post by Som » Fri Jul 26, 2019 11:59 am

Hello,

I was using the below code on V1.9.1 and it was working fine for last one year.

buf=bytearray(15)
mv = memoryview(buf)
idx = 0
waittimer=0
co2.write(p.encode()+b'\r\n')
while idx < len(buf):
if co2.any():
bytes_read = co2.readinto(mv[idx:])
idx += bytes_read

The response for my usecase was b':010302177073\r\n' when I used bytes(buf)

But last week I migrated my code to V1.11 and bytes(buf) now returns b':\n0&\x120\n4qSL\x00\x00\x00\x00'.

Any suggestions?

Som
Posts: 2
Joined: Fri Jul 26, 2019 11:47 am

Re: UART Read stopped working Esp8266 v1.11

Post by Som » Sat Jul 27, 2019 12:14 pm

Solved it...had to change the stop bit...not sure why though.

Post Reply