views:

195

answers:

3

I'm starting to learn Ubuntu 9.10. How can I retrieve all available Wifi networks programmatically? Can someone give an example?

A: 

check if you have iwconfig

ghostdog74
**programmatically**
Ricket
+1  A: 
sudo iwlist wlan0 scan

if wlan0 is your wifi-interface

renton
**programmatically**
Ricket
in which language? you can use this code-snippet in a shell-script, and parse the output. most languages have something like system.exec(),...
renton
A: 

This is definitely a duplicate of "How can I get a list of available wireless networks on Linux?" unless you are asking for a higher-level language than C.

Ricket