![]() |
Help with probing for access points programatically
I have a program that I wrote that can print out all the local access points that can be found to a file. I basically took iwlist and copied and paste what I needed.
The problem is that when I run the program, I usually only get one access point. The only way I can get more than one is to go to the wifi button on top of the N810, click it and select Change Connection..., and cancel without making a choice. This will result in my program printing out several access points instead of one. Is there a way I can programmatically get the N810 to reset the way it's collecting APs? Thank you in advance and let me know if you need me to clarify. |
Re: Help with probing for access points programatically
Not sure how to tell you to do what you want, but would love a copy of the program you wrote... :)
|
Re: Help with probing for access points programatically
You removed too much from the iwlist program. There is a section of code which initiates a scan on the device a bit before the result return, otherwise you just see the current result which is the associated AP.
I did something similar (iwlist light with hardcodes for n8x0) and it worked. |
Re: Help with probing for access points programatically
As I recall, if you use "iwlist wlan0 scan" as user, you see just your current AP, but if run as root, you see all of them. I wrote the following a couple of weeks back:
#!/usr/bin/perl $id = shift ; while (1) { open (IN,'iwlist wlan0 scan 2>/dev/null|') or die ; while (<IN>) { # chomp; unless (/SSI/) { next; } if ($id) { unless (/$id/i) { next ; }} s/^[\s]*//; print $_; while (<IN>) { unless (/Qual/) { next; } s/^[\s]*//; print $_; last; } } } There's also aircrack-ng available |
All times are GMT. The time now is 07:53. |
vBulletin® Version 3.8.8