The thing I am trying to achive, I want my android app to get a list of all available wlan connections within the range of a device with a wlan (at that point the device is an access point). Then I want to tell that device to which network to connect. So far so good.
I am trying to access the wlan module on my openwert device via python. I am using this  python module. When I execute the following example code
python iwlist.py wlan0 scanning
Interface does not support scanning
Argument list too long
buff, s = iwstruct.pack_wrq(640)
print "Now comes the error"
status, result = iwstruct.iw_get_ext(self.ifname,
Just as an info, i solved my issue by changing the module I have been using. Now I am using . When I execute this code
from wifi import Cell, Scheme print "%s" %(Cell.all('wlan0'))
I get a list with all surrounding networks. Then I have just to choose one of them (by the SSID) and make my connection