Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I am developing a wifi scanner app. Recently I realised that my wifi scan method is not working. So when I go to wifi settings of the phone and enable the wifi, there is no visible hotspots in the list, only saved ones. (I am writing this question via wifi - so there is at least 1 visible hotspot). Even when I click on refresh. My app is not running, so it does not affect on wifi at all. here is a logcat about wifi verbose messages when phone was trying to find hotspot by clicking on refresh:

03-01 11:20:16.189: V/WifiStateTracker(1825): Changing supplicant state: ASSOCIATING ==> DISCONNECTED
03-01 11:20:16.199: D/wpa_supplicant(7389): wpa_driver_tista_set_operstate: operstate 0 (DORMANT)
03-01 11:20:16.209: D/wpa_supplicant(7389): wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
03-01 11:20:16.209: D/wpa_supplicant(7389): WEXT: Operstate: linkmode=-1, operstate=5
03-01 11:20:16.219: D/wpa_supplicant(7389): EAPOL: External notification - portEnabled=0
03-01 11:20:16.229: D/wpa_supplicant(7389): EAPOL: External notification - portValid=0
03-01 11:20:16.229: D/wpa_supplicant(7389): EAPOL: External notification - EAP success=0
03-01 11:20:16.239: D/wpa_supplicant(7389): Setting scan request: 0 sec 0 usec
03-01 11:20:16.239: D/wpa_supplicant(7389): wpa_supplicant_scan: scan_req = 0, ap_scan = 2
03-01 11:20:16.239: D/wpa_supplicant(7389): State: DISCONNECTED -> SCANNING
03-01 11:20:16.239: I/wpa_supplicant(7389): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00
03-01 11:20:16.239: V/WifiStateTracker(1825): Changing supplicant state: DISCONNECTED ==> SCANNING
03-01 11:20:16.249: I/wpa_supplicant(7389): Trying to associate with SSID 'Duna_Plaza_WIFI'
03-01 11:20:16.249: D/wpa_supplicant(7389): Cancelling scan request
03-01 11:20:16.249: D/wpa_supplicant(7389): WPA: clearing own WPA/RSN IE
03-01 11:20:16.249: D/wpa_supplicant(7389): wpa_driver_tista_set_mode
03-01 11:20:16.259: D/wpa_supplicant(7389): Automatic auth_alg selection: 0x1
03-01 11:20:16.259: D/wpa_supplicant(7389): WPA: clearing AP WPA IE
03-01 11:20:16.259: D/wpa_supplicant(7389): WPA: clearing AP RSN IE
03-01 11:20:16.259: D/wpa_supplicant(7389): WPA: clearing own WPA/RSN IE
03-01 11:20:16.259: D/wpa_supplicant(7389): No keys have been configured - skip key clearing
03-01 11:20:16.259: D/wpa_supplicant(7389): wpa_driver_tista_set_drop_unencrypted
03-01 11:20:16.259: D/wpa_supplicant(7389): State: SCANNING -> ASSOCIATING
03-01 11:20:16.259: I/wpa_supplicant(7389): CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:00:00:00:00:00
03-01 11:20:16.269: D/wpa_supplicant(7389): wpa_driver_tista_set_operstate: operstate 0 (DORMANT)
03-01 11:20:16.269: D/wpa_supplicant(7389): wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
03-01 11:20:16.269: D/wpa_supplicant(7389): WEXT: Operstate: linkmode=-1, operstate=5
03-01 11:20:16.269: D/wpa_supplicant(7389): wpa_driver_tista_associate
03-01 11:20:16.269: D/wpa_supplicant(7389): Setting authentication timeout: 60 sec 0 usec
03-01 11:20:16.269: D/wpa_supplicant(7389): EAPOL: External notification - EAP success=0
03-01 11:20:16.269: D/wpa_supplicant(7389): EAPOL: External notification - EAP fail=0
03-01 11:20:16.269: D/wpa_supplicant(7389): EAPOL: External notification - portControl=ForceAuthorized
03-01 11:20:16.269: D/wpa_supplicant(7389): CMD: STATUS
03-01 11:20:16.289: D/wpa_supplicant(7389): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
03-01 11:20:16.289: D/wpa_supplicant(7389): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
03-01 11:20:16.289: D/wpa_supplicant(7389): Wireless event: cmd=0x8b06 len=8
03-01 11:20:16.289: D/wpa_supplicant(7389): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
03-01 11:20:16.289: D/wpa_supplicant(7389): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
03-01 11:20:16.289: D/wpa_supplicant(7389): Wireless event: cmd=0x8c02 len=164
03-01 11:20:16.289: D/wpa_supplicant(7389): CMD: DRIVER RSSI-APPROX
03-01 11:20:16.289: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd RSSI-APPROX
03-01 11:20:16.289: D/wpa_supplicant(7389): rssi-approx command
03-01 11:20:16.289: D/wpa_supplicant(7389): CMD: DRIVER LINKSPEED
03-01 11:20:16.289: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd LINKSPEED
03-01 11:20:16.289: D/wpa_supplicant(7389): Link Speed command
03-01 11:20:16.289: D/wpa_supplicant(7389): buf LinkSpeed 0
03-01 11:20:16.299: V/WifiStateTracker(1825): Changing supplicant state: SCANNING ==> ASSOCIATING
03-01 11:20:16.309: D/wpa_supplicant(7389): CMD: STATUS
03-01 11:20:16.309: D/wpa_supplicant(7389): CMD: DRIVER RSSI-APPROX
03-01 11:20:16.309: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd RSSI-APPROX
03-01 11:20:16.309: D/wpa_supplicant(7389): rssi-approx command
03-01 11:20:16.309: D/wpa_supplicant(7389): CMD: DRIVER LINKSPEED
03-01 11:20:16.309: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd LINKSPEED
03-01 11:20:16.309: D/wpa_supplicant(7389): Link Speed command
03-01 11:20:16.309: D/wpa_supplicant(7389): buf LinkSpeed 0
03-01 11:20:16.319: D/wpa_supplicant(7389): CMD: STATUS
03-01 11:20:16.319: D/wpa_supplicant(7389): CMD: DRIVER RSSI-APPROX
03-01 11:20:16.319: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd RSSI-APPROX
03-01 11:20:16.319: D/wpa_supplicant(7389): rssi-approx command
03-01 11:20:16.329: D/wpa_supplicant(7389): CMD: DRIVER LINKSPEED
03-01 11:20:16.329: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd LINKSPEED
03-01 11:20:16.329: D/wpa_supplicant(7389): Link Speed command
03-01 11:20:16.329: D/wpa_supplicant(7389): buf LinkSpeed 0
03-01 11:20:16.849: D/wpa_supplicant(7389): CMD: STATUS
03-01 11:20:16.849: D/wpa_supplicant(7389): CMD: DRIVER RSSI-APPROX
03-01 11:20:16.849: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd RSSI-APPROX
03-01 11:20:16.849: D/wpa_supplicant(7389): rssi-approx command
03-01 11:20:16.849: D/wpa_supplicant(7389): CMD: DRIVER LINKSPEED
03-01 11:20:16.849: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd LINKSPEED
03-01 11:20:16.849: D/wpa_supplicant(7389): Link Speed command
03-01 11:20:16.849: D/wpa_supplicant(7389): buf LinkSpeed 0
03-01 11:20:20.079: D/wpa_supplicant(7389): CMD: AP_SCAN 2
03-01 11:20:20.079: D/wpa_supplicant(7389): ap_scan = 2
03-01 11:20:20.079: D/wpa_supplicant(7389): CMD: DRIVER SCAN-ACTIVE
03-01 11:20:20.079: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd SCAN-ACTIVE
03-01 11:20:20.079: D/wpa_supplicant(7389): Scan Active command
03-01 11:20:20.079: D/wpa_supplicant(7389): CMD: SCAN
03-01 11:20:20.079: E/wpa_supplicant(7389): Ongoing Scan action...
03-01 11:20:20.079: D/wpa_supplicant(7389): CMD: DRIVER SCAN-PASSIVE
03-01 11:20:20.079: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd SCAN-PASSIVE
03-01 11:20:20.079: D/wpa_supplicant(7389): Scan Passive command
03-01 11:20:21.209: D/WifiStateTracker(1825): Reset connections and stopping DHCP
03-01 11:20:22.219: D/WifiStateTracker(1825): Disabling interface
03-01 11:20:22.229: D/wpa_supplicant(7389): RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
03-01 11:20:22.229: D/wpa_supplicant(7389): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
03-01 11:20:22.289: D/wpa_supplicant(7389): CMD: STATUS
03-01 11:20:22.289: D/wpa_supplicant(7389): CMD: DRIVER RSSI-APPROX
03-01 11:20:22.289: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd RSSI-APPROX
03-01 11:20:22.289: D/wpa_supplicant(7389): rssi-approx command
03-01 11:20:22.299: D/wpa_supplicant(7389): CMD: DRIVER LINKSPEED
03-01 11:20:22.299: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd LINKSPEED
03-01 11:20:22.299: D/wpa_supplicant(7389): Link Speed command
03-01 11:20:22.299: D/wpa_supplicant(7389): buf LinkSpeed 0
03-01 11:20:22.309: D/wpa_supplicant(7389): CMD: STATUS
03-01 11:20:22.309: D/wpa_supplicant(7389): CMD: DRIVER RSSI-APPROX
03-01 11:20:22.309: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd RSSI-APPROX
03-01 11:20:22.309: D/wpa_supplicant(7389): rssi-approx command
03-01 11:20:22.309: D/wpa_supplicant(7389): CMD: DRIVER LINKSPEED
03-01 11:20:22.309: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd LINKSPEED
03-01 11:20:22.309: D/wpa_supplicant(7389): Link Speed command
03-01 11:20:22.309: D/wpa_supplicant(7389): buf LinkSpeed 0
03-01 11:20:26.239: D/wpa_supplicant(7389): CMD: AP_SCAN 2
03-01 11:20:26.239: D/wpa_supplicant(7389): ap_scan = 2
03-01 11:20:26.239: D/wpa_supplicant(7389): CMD: DRIVER SCAN-ACTIVE
03-01 11:20:26.239: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd SCAN-ACTIVE
03-01 11:20:26.239: D/wpa_supplicant(7389): Scan Active command
03-01 11:20:26.239: D/wpa_supplicant(7389): CMD: SCAN
03-01 11:20:26.239: E/wpa_supplicant(7389): Ongoing Scan action...
03-01 11:20:26.239: D/wpa_supplicant(7389): CMD: DRIVER SCAN-PASSIVE
03-01 11:20:26.239: D/wpa_supplicant(7389): wpa_driver_tista_driver_cmd SCAN-PASSIVE
03-01 11:20:26.239: D/wpa_supplicant(7389): Scan Passive command

As you can see there is no such line which would be about scan result: wpa_supplicant - New scan results available
I did a factory reset by cleaning the settings app data, but that did not help. Any suggestion? the phone has a custom ROM, but I had no problems with wifi before, even during the development period. This problem came unexpectedly. additionaly my app can scan in every 10 sec as well, and after 5-6 trial it finds some hotspot. but before that, no scan result at all when startscan() was called. Any suggestion how to repair the scanning feature of the phone?
Edit: here is a logcat which is containing scan results

share|improve this question
    
Please note that development questions are off topic here. For details, please consult our FAQ. –  Izzy Mar 1 '13 at 13:04
    
sure, but this is not a development question - just I also shared the background story for the case –  laplasz Mar 1 '13 at 13:21
    
Quote: I am developing a wifi scanner app. Recently I realised that my wifi scan mathod is not working. So the continuing words are not related to this introduction? Then why that introduction? –  Izzy Mar 1 '13 at 13:32
    
this is the background of my problem, shall I put this info into the middle of the description? I thought the question is enough to be exact –  laplasz Mar 1 '13 at 13:37
    
I still don't get the non-development related part, even after reading it a third time now. Maybe the intro is a little confusing that I don't get the point (which could be my fault): Are you talking about the general availability of Wifi, so your device not being able to find/connect to any WiFi network? To me it reads as being about your wifi scan method is not working. Besides, it seems to find at least one hotspot, named "Duna_Plaza_WIFI", according to the log... –  Izzy Mar 1 '13 at 13:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.