-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ESP32-S2: Add UDP with recvfrom_into and sendto #3708
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
Conversation
@hierophect, I was able to build and test this on a UMFeatherS2. Along with the changes to the NTP library, I also had to comment out the check for the Epoch on line 61 in the NTP library. I could also set the RTC to ntp.datetime. r = rtc.RTC()
r.datetime = ntp.datetime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The esp_idf submodule has been mistakenly updated to an old ref, please correct it.
@hierophect There is a translation conflict still. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This PR implements the
sendto
andrecvfrom_into
functions in socketpool/Socket, enabling datagram send and receive. Tested on Saola 1 Wrover with Scott's modification to the Adafruit NTP library:https://github.com/tannewt/Adafruit_CircuitPython_NTP/blob/raw_ntp/adafruit_ntp.py
Note that I had to replace instances of
time.gmtime
withtime.localtime
to get this to work, since gmtime is not implemented in Circuitpython.code.py
sketch is as follows: