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 > (DSWifi) Wifi lib 0.3b released by sgstair!

#103001 - Lick - Mon Sep 18, 2006 4:16 pm

I'm surprised no one posted this yet. I myself just read the news on Planet Dev-Scene and immediately implemented it in DSLiveWeather.

Direct link to Stephens blog

There is some bad news attached though. Stephen has announced that he will put DSWifi on hold, till he has time to do a rewrite. Personally, I'm a bit disappointed but I totally understand how braindead one can become, working on the same project for a long time. I hope he will really get back on it, not abondoning it. :(
_________________
http://licklick.wordpress.com

#103005 - TJ - Mon Sep 18, 2006 5:16 pm

Doesn't seem to fix the problem I am having with it, sadly.

Shame he is putting it on hold too.

#103018 - ttursas - Mon Sep 18, 2006 7:48 pm

I've been battling with dswifilib for quite some time now, and finally I got it working! :)
Made wHeapAllocInit() to use my own static buffer, and disabled all dynamic memory
allocations from sgIP_Config.h. So far I've been able to send lots of UDP packets to
my PC server without losing them all or getting my DS game freezing.

#103107 - HtheB - Tue Sep 19, 2006 7:28 am

Lick wrote:
I'm surprised no one posted this yet. I myself just read the news on Planet Dev-Scene and immediately implemented it in DSLiveWeather.

Direct link to Stephens blog

There is some bad news attached though. Stephen has announced that he will put DSWifi on hold, till he has time to do a rewrite. Personally, I'm a bit disappointed but I totally understand how braindead one can become, working on the same project for a long time. I hope he will really get back on it, not abondoning it. :(
its been posted on nintendo-ds.dcemu.co.uk so... :) old news :D :P rofl :P

#103202 - ttursas - Tue Sep 19, 2006 10:42 pm

... after another long and nice debug session. :)

* If you have a 100 byte packet in the in queue and issue recvfrom() with a say buffer of
80 bytes, you won't get anything. A buffer of 100+ bytes would give you the packet.
So use a big buffer and poll often.
* MSG_DONTWAIT doesn't work (but it's easy to add it into recvfrom())
* If you have a NATting router like this D-Link DI-524 that I have, it will change the ports
on the fly, so let the DS make the connection to your PC server, and from the connection
itself get the port that the DS seems to be using, and use that. DI-524 also sets the
IP in the packets to 0, for some reason...
* It's actually pretty interesting to add your own debugPrintS32() calls into the depths
of dswifilib. :) I learned a lot from that...

Anyway, some of these things might be trivial for some experienced netguys, but I'm not
one, and hope these notes help someone.