-
Notifications
You must be signed in to change notification settings - Fork 75
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
Arduino RP2040 connect wifi UDP - Multicast group not working #139
Comments
not surprising as we dont know anyone who has used UDP - the library has strong TCP/SSL support which is what most people use. if you find a fix for the bug please submit a PR! |
I'm trying to work out if I can implement a discovery protocol like mDNS, DNS-SD or SSDP so I'm interested too. UDPMULTI_MODE = const(3)
s_in.connect(socketaddr_udp_in, conntype=UDPMULTI_MODE) Hope to find out whether that actually works soon. |
What version of ESP32SPI library are you using? Static IP was added last month in 4.1.0 https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/releases/tag/4.1.0 |
I'm still super early in the whole project, only downloaded the libraries this week so I assume I'm recent enough to have that. I can also set a static DHCP lease if I need to. I'm hoping to get this thing working in SmartThings and haven't worked out the flow that expects to pick up a device yet & the few examples I've found so far have a discovery stage, so first stab was to look at the plausibility of that. |
Oops I guess I was logged in with my work account in the iOS app for the previous comment. It didn't work, and I can see why. In self.socket_open(socket_num, dest, port, conn_mode=conn_mode)
if conn_mode == self.UDP_MODE:
# UDP doesn't actually establish a connection
# but the socket for writing is created via start_server
self.start_server(port, socket_num, conn_mode)
return True It looks like The nina-fw doesn't appear to offer any way to set socket options directly so I think the only way to get multicast UDP working would be to tweak |
CircuitPython version
Code/REPL
Behavior
ESP32 found and in idle mode
Firmware vers. bytearray(b'1.4.8\x00')
MAC addr: ['0xd0', '0xb1', '0x78', '0xa8', '0xcc', '0x84']
Connecting to AP...
Connected to zone RSSI: -47
ip: bytearray(b'\xc0\xa8\x02\x93')
My IP address is 192.168.2.147
udp in addr: 224.1.1.1 5500
connected local UDP
-->>> NO PACKETS recieved
ESP32 found and in idle mode
Firmware vers. bytearray(b'1.4.8\x00')
MAC addr: ['0xd0', '0xb1', '0x78', '0xa8', '0xcc', '0x84']
Connecting to AP...
Connected to zone RSSI: -47
ip: bytearray(b'\xc0\xa8\x02\x93')
My IP address is 192.168.2.147
udp in addr: 192.168.2.147 5500
connected local UDP
56 from multicast_send.py: group: 192.168.2.147, port: 5500
56 from multicast_send.py: group: 192.168.2.147, port: 5500
56 from multicast_send.py: group: 192.168.2.147, port: 5500
56 from multicast_send.py: group: 192.168.2.147, port: 5500
Description
So Ive been testing the wifi part of the circuitpython on the Arduino rp2040 connect.
The circuitpython esp32 wifi integration doesnt allow to set a static IP (Im gonna make a separate bug report on this), and I want to be able to communicate with the rp2040 chip through wifi and send datapackets, but since I dont know the IP adress, I figured I could send a multicast IP instead. On my ubuntu, I do recieve these packages on same multicast IP and port. so the router is out of the question.(As I made a multicast data logger from my rp2040 chip to get debug data from it).
The UDP reciever works with the IP adress of the wifi chip eg. 192.168.2.147:5500, but NOT the multicast adress 224.1.1.1:5500.
I hope you guys can fix this.. and the dhcp=True/False issue aswell.
Additional information
No response
The text was updated successfully, but these errors were encountered: