Jump to content

Cannot connect to Access Point


phlip

Recommended Posts

OK, the down-and-dirty details:

 

My mother's computer connects to the Internet, WinXP home, ICS enabled.

It's connected to the LAN - 10.0.0.3/24

Also connected to the LAN is a D-Link DWL-G700AP access point.

The setup works with official WFC games and such, but doesn't work with homebrew.

 

I'm using a DS Lite, and an R4DS. I haven't done FlashMe or anything like that yet... I'm still kinda new to this, and I don't want to break anything...

 

I've tried using DHCP and I've tried using a static IP (10.0.0.7).

I've tried turning WEP on and off, I've tried turning SSID broadcast on and off, I've tried setting Open key and Shared key...

I've tried disabling every security feature... SSID broadcasting on, WEP off, Open key, turned off the MAC address filters...

I even tried changing the SSID in case the space in it was messing with something, and changing the channel just in case.

Nothing seems to help.

 

wifi_lib_test usually just says "Cannot connect to Access Point"... the only thing in the top screen console thing is "SetIP0700000A 0300000A 00FFFFFF", which is the DS's static IP, the gateway, and the subnet mask.

Sometimes it just sits there with "ASSOCSTATUS_SEARCHING" forever, but most of the time it just immediately comes back with "Cannot connect to Access Point".

 

Now, I could probably survive without any homebrew wifi stuff, but I'd rather not... I would rather like to get DSFTP working... the card reader that came with the R4 sucks, by my calculations it only writes at around 16KB/s (I put on a ~50MB .dpg file to test that in Moonshell, and it took a bit under an hour to write)... FTP over WiFi has to be faster than that.

 

[edit]

I just saw that the wifi_lib_test is using version 0.3a of dswifi... but there's an 0.3d out there, which I read has some DS Lite fixes in it...

Does anyone know where I can get a test thingy for that version? There's nothing in the 0.3d download that I can see, and I don't particularly feel like writing my own...

[edit again]

I found this and built it with dswifi 0.3d, and I still get the same errors as before, so no luck there.

[edit yet again]

If I put the wifi_lib_test thing in Wardriving mode, it tags the access point with the cryptic "C?"... looking at the source, this means that dswifi is setting the flag WFLAG_APDATA_EXTCOMPATIBLE, but I can't for the life of me find out what that means...

[hopefully last edit]

Looking at the dswifi source, it seems it's because the AP's running at 5.5/11MBit, and it'll have to compensate, since the DS can't handle more than 2MBit. I tried pulling the TX rate on the AP down to 2MBit, and then to 1MBit, but it still shows "C?" (rather than the "C+" I was hoping for), and it still won't connect.

I'm rather out of ideas, now.

 

[about a week later edit]

I was bored today, so I downloaded the dswifi source (while I was at it, I saw that 0.3.1 was out, but upgrading didn't help) and started hacking away at it, putting in more debug messages... it seems that the AP is responding to the association requests with a status code of 18, as opposed to the 0 that indicates success... brief googling suggests that the AP doesn't support the speed the DS is asking for, or some such problem...

 

I'm downloading the full 802.11 spec, so I can find out more, but I'd much rather have someone come in and tell me something that'll just work, or at least give me a hint, rather than me having to learn all this pointless low-level stuff...

[this post has too many edits]

OK, so now I look through the 802.11 spec, and a status code of 18 means:

Association denied due to requesting station not supporting all of the data rates in the BSSBasicRateSet parameter

I look at the beacon with the packet sniffer option in wifi_lib_test, at the "Supported rates" field, and from looking at other parts of the spec it says the AP supports the standard 1MBit, 2MBit, 5.5MBit and 11MBit, and also 6MBit, 9MBit, 12MBit and 18MBit. Since the DS should only be asking for 1MBit or 2MBit, that should be fine... so I'll dig deeper, at what the DS actually asks for...

[final edit]

Haha! I tweaked the Assoc request a little... it was asking for 1MBit, 2MBit, 5.5MBit and 11MBit, all of which the router allowed... but it sent them as "0x82 0x04 0x0B 0x16" when the router was saying it accepted "0x82 0x84 0x8B 0x96" - that high bit is actually irrelevant with respect to the speed, but the router was picky about it (perhaps with good reason, perhaps not... I haven't read the entire 528-page spec). I changed it to set the high bit on all the requested speeds, and now it works!

 

Now I just have to rebuild all the wifi stuff I want with this new library... DSFTP doesn't have the source code, but I can whip up something simple there.

 

Thanks for all your help, guys... :D

Edited by phlip
Link to comment
Share on other sites

  • 2 weeks later...
Haha! I tweaked the Assoc request a little... it was asking for 1MBit, 2MBit, 5.5MBit and 11MBit, all of which the router allowed... but it sent them as "0x82 0x04 0x0B 0x16" when the router was saying it accepted "0x82 0x84 0x8B 0x96" - that high bit is actually irrelevant with respect to the speed, but the router was picky about it (perhaps with good reason, perhaps not... I haven't read the entire 528-page spec). I changed it to set the high bit on all the requested speeds, and now it works!

 

Now I just have to rebuild all the wifi stuff I want with this new library... DSFTP doesn't have the source code, but I can whip up something simple there.

 

Thanks for all your help, guys... :P

 

Nice work! You should submit a patch at the devkitPRO SF page.

Link to comment
Share on other sites

  • 9 months later...

There's DSFTP, though it uses the older gba_nds_fat system, which is a bit buggier than libfat (for instance, don't delete files from within DSFTP to prevent corruption). There's also this Lilou FTP program thingy that I got working, but even though it uses libfat I'm suspecting it of being the root cause of my recent card corruption.

 

I'd suggest trying DSFTP first. Transfer speeds are rather slow, about 30 kb/s max, but it's useful if you only have a few small files to transfer.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...