ap_search example problems

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

ap_search example problems

Post by sverx » Fri Mar 16, 2012 12:17 pm

I correctly compiled the ap_search dswifi lib example, TTBOMK, but it doesn't seem to work on my DS (Lite) :|
If I understand correctly, the function

Code: Select all

Wifi_InitDefault(false);
should turn on the wi-fi hardware, and the green led should start blinking, right?

Well, I get no blinking on my DS, upper screen turns white and lower one black, nothing written on it. Of course wi-fi is working fine on my DS, and dkA is updated to ver. 36, dswifi is 0.3.13.

Any idea? :?:

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: ap_search example problems

Post by sverx » Tue Mar 20, 2012 9:22 am

I tried updating dkA & libnds & everything... no luck.
Then completely disinstalled and reinstalled everything from scratch... again, nothing changed. :x

Is that example supposed to work, actually? Somebody can confirm it works on his setup? Sorry to bother, but I'd really like to start experimenting with dswifi lib...

User avatar
vuurrobin
Posts: 219
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands
Contact:

Re: ap_search example problems

Post by vuurrobin » Tue Mar 20, 2012 6:52 pm

Are you sure that there are AP close by that aren't locked? I'm not sure if they should show up, but any AP that has security higher than WEP won't be able to connect with the DS anyway.

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: ap_search example problems

Post by elhobbs » Wed Mar 21, 2012 1:36 am

The ap also needs to be 802.11b compatible - b/g will usually work but I am not sure if n aps will work.

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: ap_search example problems

Post by sverx » Wed Mar 21, 2012 10:18 am

vuurrobin & elhobbs: Thanks! :)

There are lots of unprotected/WEP/WPA/etc. networks around, I can see them with DSOrganize for instance. But I'm really not even trying to connect to them, just 'discover' them would be ok for this test. Looks like the DS doesn't even turn wifi on... for instance, as I said, the led doesn't even start blinking.

Did you tried compiling and testing the ap_search example? Does it work on your DS?

Anyway I am running some tests, hopefully I'll find what's going wrong...

orp
Posts: 1
Joined: Wed Mar 21, 2012 9:09 pm

Re: ap_search example problems

Post by orp » Wed Mar 21, 2012 9:15 pm

Well, pls. have a look at template.c,
be sure that the first while loop does not look like this:

Code: Select all

 while(1);
{ 
This is a non terminating loop!
You have to remove the ";". Rebuild the .nds file and the AP search should work ...

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: ap_search example problems

Post by sverx » Wed Mar 21, 2012 11:44 pm

It really looks like the arm9 code is working correctly, but seems that the arm7 doesn't, or maybe the two CPUs aren't communicating properly. :x I thought maybe the arm9 code did start using the FIFO system too early, when the arm7 program wasn't yet ready to receive, so i added a huge delay (3 sec.s) before the wifi init function... well, nothing changed.
Any idea on how to check what's going wrong there? I wonder if I'm really the only one that cannot run this example :x

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: ap_search example problems

Post by elhobbs » Thu Mar 22, 2012 2:44 am

the while loop in main has a semicolon after it (on line 100) like so

Code: Select all

while(1);
this causes it to loop forever on that line. it needs to be removed like this

Code: Select all

while(1)

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: ap_search example problems

Post by sverx » Thu Mar 22, 2012 10:17 am

elhobbs wrote:the while loop in main has a semicolon after it (on line 100) like so

Code: Select all

while(1);
:oops: :oops: didn't really notice that! I'm going to remove it and see if everything works correctly...

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: ap_search example problems

Post by elhobbs » Thu Mar 22, 2012 11:44 am

It worked on my ds. I did not notice for a while either. I started chopping out all the wifi code in the sample and it still wasn't working. I started putting prints everywhere and looking to see where it stopped. I looked at the diff on the svn and it looks like it was added when the keyboard event handler was commented out - I am not sure why.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 5 guests