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

[1] https://pypi.python.org/pypi/python-wifi/0.6.1

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

[1]https://wifi.readthedocs.io/en/latest/


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -