Skip to content

fix UDP handling #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 5, 2022
Merged

fix UDP handling #59

merged 3 commits into from
Jun 5, 2022

Conversation

bablokb
Copy link
Contributor

@bablokb bablokb commented May 26, 2022

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

  • socket_connect() saves the connection type as an object attribute and fixes at_response handling
  • socket_send() does not try to read a response (there is no response with UDP), this saves some ms
  • socket_disconnect() resets saved connection-type

@dhalbert
Copy link
Contributor

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

@bablokb
Copy link
Contributor Author

bablokb commented May 28, 2022

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

@bablokb
Copy link
Contributor Author

bablokb commented May 30, 2022

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.

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dhalbert dhalbert merged commit 068fc46 into adafruit:main Jun 5, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jun 6, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol to 0.6.8 from 0.6.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP_ATcontrol#59 from bablokb/udpfix
  > Set language to "en" for documentation
  > Switch to inclusive terminology
  > Increase min lines similarity
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP_ATcontrol#57 from tekktrik/doc/fix-readme
  > Patch .pre-commit-config.yaml
  > Add support warning to README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants