gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Anybody actually got UDP + dswifilib to work?

#100303 - ttursas - Sun Aug 27, 2006 8:41 am

I'm having trouble with dswifilib and connectionless (well, connected or TCP doesn't work
either) UDP. The thing is that I can send exactly 12 UDP packets and after them sendto()
returns -1 and DS doesn't send a thing after that.

I got this after moving my UDP code to wifi_example1 that comes with the dswifilib. When I
tried to use dswifilib in my own, bigger project I rarely managed to get a single UDP packet
out of it. wifi_example1 should work better as a basis for my test than my own project,
because in my own project I don't use libnds.

The interesting thing is that wifi_example1's TCP connection to outside world works just fine.
But my UDP code connects to my local 64bit X2 4400+ Linux PC via D-Link DI-524 wireless
router. Relevant ports are open, etc., there should be nothing on the D-Link side that
prevents the packets from moving, and it's the DS side that stops sending the stuff.

Any ideas? Similar experiences? Is my local configuration somehow just killing dswifilib?

#100304 - ttursas - Sun Aug 27, 2006 8:46 am

I'm using DevKitARM 19b plus dswifilib 0.3a under Linux. With DevKitARM 18 the behaviour
was a bit different (could send more packets, but the DS app got stuck sooner or later).

I wrote my own memory manager to get free of libc, but the result was the same. Under
Linux my UDP code works just fine. I don't touch the ARM9 cache settings, and don't use
dynamic memory manager (so I just have big static arrays in bss).

M3 Perfect SD and mini-SD, old DS and DS Lite (white), but the result is the same.