Linux -OpenWrt- (Unwired One) python wlan interface scan error -
the thing trying achive, want android app list of available wlan connections within range of device wlan (at point device access point). want tell device network connect. far good.
i trying access wlan module on openwert device via python. using [1] python module. when execute following example code
python iwlist.py wlan0 scanning
i error
interface not support scanning
then started dig inside of code, , real error message one:
argument list long
and error comming module (from file iwlibs.py). exact code snippet (class iwrange, update()) comming :
buff, s = iwstruct.pack_wrq(640) print "now comes error" status, result = iwstruct.iw_get_ext(self.ifname, pythonwifi.flags.siocgiwrange, data=s)
i dont know if of help, checked buff variable , says 0x00 (i guess there should other stuff bcz indicating address in memory, of course wrong , buffer being initialized there).
so, not sure problem is, seems me, maybe, reserver space (or buffer?) small stuff being returnd. know else try in order working ?
and 1 more thing, downloaded wireless_tools , can use iwlist. can scan , list of surrounding wlan networks. seems hardware working fine, not accessing python
just info, solved issue changing module have been using. using [1]. when execute code
from wifi import cell, scheme print "%s" %(cell.all('wlan0'))
i list surrounding networks. have choose 1 of them (by ssid) , make connection
Comments
Post a Comment