devkitPro / libctru

Homebrew development library for Nintendo 3DS/Horizon OS user mode (Arm11)

Home Page:https://libctru.devkitpro.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Socket connections fail to work if DHCP just assigned IP this boot

TheGag96 opened this issue · comments

I'm not actually sure if this is actually a problem with libctru, Horizon OS, the 3DS Wi-Fi hardware, or my wireless router. However, given that real 3DS apps never exhibit this behavior, I'm thinking libctru is at fault or could work around some external issue.

I notice that often times, the first time I boot my (old) 3DS to do something, stuff like ftpd and 3dslink won't work - I just can't connect to my PCs. It takes a reboot of my 3DS for things to work like you'd expect. My suspicion is that this has something to do with the fact that about once a day, my router decides to assign my 3DS a new local IP, and the issues seem to coincide with getting that new one. Maybe libctru is mishandling something when this occurs?

Any ideas? My PCs run x64 Artix Linux if that makes a difference. Thanks!

Please understand, with ftpd and 3dslink, the PC connects to the 3DS.

If your router is rotating IPs then it's entirely possible that the ARP cache on your PC becomes out-of-date easily. If you see the problem, check the output of the arp command to see which MAC address your 3DS's IP maps to. I wouldn't be surprised if you see the 3DS's IP mapped to a MAC of a different device if your router is handing out addresses willy-nilly.

You can clear the ARP cache with ip -s neigh flush all.

This can't be a libctru issue. It doesn't manage that low-level of connection details.

I'd also suggest giving your 3DS a fixed IP address, most routers have the option. This has the added bonus that if you're using a pihole to filter ad domains then you can provide your consoles with names.

closing as not a libctru issue.