Controlling WiFi from script (bash or python)

Hi,
is it possible to

    • search for a wifi
    • connect to an open wifi
      from the Linux side of Yun?

For the first point I think I have just to call something like
iwlist scan ... right?

For the second point?
is there a way to connect to a wifi knowing the information of the access point (the ones captured from the first point)?

thanks

Hi

you can manually (or via script) create/change the configuration file for the wireless subsystem:
http://wiki.openwrt.org/doc/uci/wireless

a good starting point, XD
thanks you

You might also want to look at the lua code of the webpanel. Here is how we scan for wifis and here is where we gather the configure form data and spread it over uci config files