adafruit / Adafruit_CircuitPython_ESP_ATcontrol

Use the ESP AT command sent to communicate with the Interwebs
MIT License
20 stars 17 forks source link

fix UDP handling #59

Closed bablokb closed 2 years ago

bablokb commented 2 years ago

This PR is a fix for #58. Tested with an ESP01S and a Pico against netcat -u -l <portnr>:

dhalbert commented 2 years ago

This looks good to me. One question: did you also re-test TCP after these changes?

bablokb commented 2 years ago

I retested after the first commit, but not after the other two. I will do that on Monday.

bablokb commented 2 years ago

I retested with TCP (e.g. localtime example) and can confirm it works.

BTW: you can find my UDP test-program here: https://github.com/bablokb/circuitpython-examples/ (subdirectory esp01-udplogger). Switching to TCP is simply done by changing TYPE_UDP to TYPE_TCP in the connect-method.