Comments (10)
I used the UF2 artifact from https://github.com/OpenLightingProject/rp2040-dmxsun/actions/runs/2561833425 , and compiled master myself. the behaviour is the same.
there is no USB issue:
Aug 17 16:15:12 diode kernel: usb 1-1.3.1.2: new full-speed USB device number 84 using xhci_hcd
Aug 17 16:15:12 diode kernel: usb 1-1.3.1.2: New USB device found, idVendor=1209, idProduct=aceb, bcdDevice= 1.00
Aug 17 16:15:12 diode kernel: usb 1-1.3.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 17 16:15:12 diode kernel: usb 1-1.3.1.2: Product: rp2040-dmxsun http://169.254.59.1/
Aug 17 16:15:12 diode kernel: usb 1-1.3.1.2: Manufacturer: OpenLightingProject
Aug 17 16:15:12 diode kernel: usb 1-1.3.1.2: SerialNumber: RP2040_e6605481db933b36
Aug 17 16:15:12 diode kernel: hid-generic 0003:1209:ACEB.0015: hiddev99,hidraw3: USB HID v1.11 Device [OpenLightingProject rp2040-dmxsun http://169.254.59.1/] on usb-0000:05:00.3-1.3.1.2/input0
Aug 17 16:15:12 diode kernel: cdc_acm 1-1.3.1.2:1.1: ttyACM0: USB ACM device
Aug 17 16:15:12 diode kernel: cdc_ncm 1-1.3.1.2:1.3: MAC-Address: 02:02:84:6a:96:00
Aug 17 16:15:12 diode kernel: cdc_ncm 1-1.3.1.2:1.3 usb0: register 'cdc_ncm' at usb-0000:05:00.3-1.3.1.2, CDC NCM, 02:02:84:6a:96:00
Aug 17 16:15:12 diode dhcpcd[142366]: usb0: waiting for carrier
Aug 17 16:15:12 diode dhcpcd[142366]: usb0: carrier acquired
Aug 17 16:15:12 diode kernel: IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
Aug 17 16:15:12 diode dhcpcd[142366]: usb0: IAID 84:6a:96:00
Aug 17 16:15:14 diode dhcpcd[142366]: usb0: soliciting a DHCP lease
Aug 17 16:15:14 diode dhcpcd[142366]: usb0: offered 169.254.59.2 from 169.254.59.1
nothing further
the request is also not acked when I trigger the DHCP client manually.
I attach a PCAP for detailed view. Maybe some bit fields are different.
dmxsun_dhcp.pcapng.gz
from rp2040-dmxsun.
Okay, that's strange, works on my machine. Will do a wireshark trace this evening an compare with yours.
In the meantime, is there anything strange in the kernel logs? USB device resetting or similar?
from rp2040-dmxsun.
Just checked, I can definitely see a DHCP ACK here:
Did you build the source code yourself or did you use some UF2-file from the GitHub actions?
The DHCP server is part of the lwIP-stack, it's not written by me. I might be able to add or active some debugging options but I didn't yet dig into it.
from rp2040-dmxsun.
I had the same problem with a UF2-file from the GitHub actions (https://github.com/OpenLightingProject/rp2040-dmxsun/suites/6080805161/artifacts/210508458)
from rp2040-dmxsun.
Thanks for the pcap-file, that will help a lot. Unfortunately, I didn't yet find the time to investigate the root cause :/
from rp2040-dmxsun.
I did some investigation today. First thought: Only "a limited amount" of requests can be served. Proofed wrong.
Then I tried dhcpcd
as DHCP client and I can reproduce the failing behaviour of not getting the DHCP ACK
. However, when I use NetworkManager's internal DHCP client afterwards on the same connection (= without disconnecting the board), it serves the DHCP ACK just fine. However, still no explanation why this happens. The DHCP server code is not written by me but I will try to debug it to see where it fails.
from rp2040-dmxsun.
I think I found the root cause: tinyUSB's DHCP server expects the MESSAGETYPE option in DISCOVER or REQUEST packages to be the first option in the packet. Some clients seem to not to adhere to this expectations. The trace you attached and the "dhcpcd" I tried send the requested IP option first.
Pull-request for tinyUSB has been created, but it might take some time until the fix makes it into tinyUSB and from there into the pico-sdk. I might try to hack something together so the builds created by the GitHub actions behave correctly.
In the meantime, here's an UF2-file that includes the fix: rp2040-dmxsun.zip.
Might be a DEBUG build containing some more logging statements than required but it would be nice if you could confirm that this fixes the issue. Thanks!
from rp2040-dmxsun.
Fix has been merged upstream. I now need to check if I can update to the latest upstream master of tinyUSB or if there are incompatibilities that I need to fix. Thus, leaving this open
from rp2040-dmxsun.
Alright, I'm working on a way to fix this locally without waiting for the upstream version of tinyUSB to tickle down into the pico-sdk.
from rp2040-dmxsun.
Should be fixed with #68.
I copied the DHCP server code into the project to be able to modify it.
from rp2040-dmxsun.
Related Issues (20)
- Demo version of the website HOT 2
- Re-investigate on zeroconf / mDNS HOT 2
- Naming HOT 1
- uf2-file HOT 2
- WebUI: Update react from 17.x to 18.x
- Support Web interface, Art-Net, E1.31 and EDP via WiFi on the Pico W HOT 6
- Use libartnet for Art-Net tx/rx instead of own implementation HOT 1
- Design a "direct GPIO to XLR" board
- WebUI: Use websockets instead of http polling/API HOT 3
- slot configuration not completely implemented HOT 1
- Replace kicad-exports with KiCad CI/CD template
- rp2040-dmxsun - system compilation error HOT 12
- Web-UI compilation should be integrated properly
- pico rp2040 ethernet branch build failure (tcpecho_raw.h not found) HOT 18
- pico only blinks HOT 15
- No new .uf2 build last 5 months HOT 4
- pins for ws5500 HOT 5
- Supported protocol / WS2812 LED strings HOT 1
- Device Descriptor Request Failed (RP2040 Zero)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rp2040-dmxsun.