1. Download our Official Android App: Forums for Android!

[Q] Android Wifi : How to change network interface used by android

Discussion in 'Android Devices' started by g4ur4v, Feb 1, 2014.

  1. g4ur4v

    g4ur4v Lurker
    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    3
    Joined:
    Apr 11, 2012

    Apr 11, 2012
    3
    2
    6
    When I boot up my Android Device and go to Wifi settings,the status of wifi remains "Turning Wi-Fi on" forever.I looked up in logcat logs,below is the error that I see.

    E/wpa_supplicant( 1713): nl80211: Could not set interface 'wlan0' UP
    E/wpa_supplicant( 1713): wlan0: Failed to initialize driver interface
    E/wpa_supplicant( 1713): Could not read interface wlan0 flags: No such device


    Below is some useful information.
    root@android:/ # netcfg
    netcfg
    lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
    gannet0 DOWN 0.0.0.0/0 0x00001082 1e:e9:6e:bf:45:f7
    dummy0 DOWN 0.0.0.0/0 0x00000082 ba:ad:f6:ae:6a:09
    rmnet0 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
    rmnet1 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
    rmnet2 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
    rmnet3 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
    rmnet4 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
    rmnet5 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
    rmnet6 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
    rmnet7 DOWN 0.0.0.0/0 0x00000001 00:00:00:00:00:00
    sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
    ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00

    Contents of /system/etc/wifi/wpa_supplicant.conf:
    update_config=1
    ctrl_interface=wlan0
    eapol_version=1
    ap_scan=1
    fast_reauth=1


    Question: How can I enable android to use some other interface other than wlan0 ?


    Things tried:
    1)I tried to edit ctrl_interface parameter in /system/etc/wifi/wpa_supplicant.conf usiny adb pull and push to other interfaces shown by netcfg but android still tries to use wlan0.
    2)I also tried to start wpa_supplicant daemon using below command.
    /system/bin/wpa_supplicant -Dnl80211 -idummy0 -c/system/etc/wifi/wpa_supplicant.conf

    but this gives error.
    E/wpa_supplicant( 5390): dummy0: Failed to initialize driver interface
     

    Advertisement

  2. codesplice

    codesplice Elite Recognized Moderator
    Moderator
    Rank:
     #27
    Points:
    1,063
    Posts:
    8,623
    Joined:
    Oct 29, 2013

    Oct 29, 2013
    8,623
    9,947
    1,063
    Male
    SysAdmin
    Huntsville, AL
    What device and Android version or ROM are you using? When did the problem start? Are you using a custom kernel by any chance?
     
    scotty85 likes this.
  3. g4ur4v

    g4ur4v Lurker
    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    3
    Joined:
    Apr 11, 2012

    Apr 11, 2012
    3
    2
    6
    Hi,
    I got this phone from a friend,so I dont know when/why the problem started.
    I recently flashed CM 9.1.0 stable version compatible with this device.
    Device Info:
    Model: HTC Sensation
    Android Version:4.0.4
    Baseband version: 11.76A.3504.00P_11.24A.3504.31_M
    Kernel Version:3.0.36-g7290c7f
    CyanogenMod Version: 9.1.0-pyramid
    Build Number:cm_pyramid-userdebug 4.0.4 IMM76L eng.20120828.171900 test-keys
     
    scotty85 and codesplice like this.
  4. Crashdamage

    Crashdamage Android Expert
    Rank:
    None
    Points:
    643
    Posts:
    4,446
    Joined:
    Feb 25, 2011

    Feb 25, 2011
    4,446
    2,752
    643
    Mostly retired
    Kansas City, Mo.
    IMHO your problem is not a 'wlan0' thing. It's a driver or hardware problem. The driver must load and communicate with the WiFi radio before it can connect via wlan0 but the driver fails to initialize. So there is no chance of the radio establishing communication with wlan0, wlan1 or any other.

    You might try a different ROM, making certain it is compatible with your hardware. And there's always a slight chance you have a hardware failure. Loading the stock OEM ROM might be a quick test.
     
    scotty85 and codesplice like this.
  5. codesplice

    codesplice Elite Recognized Moderator
    Moderator
    Rank:
     #27
    Points:
    1,063
    Posts:
    8,623
    Joined:
    Oct 29, 2013

    Oct 29, 2013
    8,623
    9,947
    1,063
    Male
    SysAdmin
    Huntsville, AL
    I've moved your thread to the root-related subforum specific for your device, where it should gain a bit more visibility from folks who can assist with this particular problem.
     
    scotty85 likes this.
  6. g4ur4v

    g4ur4v Lurker
    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    3
    Joined:
    Apr 11, 2012

    Apr 11, 2012
    3
    2
    6
    Thanks a lot!!
     
  7. scotty85

    scotty85 Android Expert
    Rank:
    None
    Points:
    1,413
    Posts:
    11,139
    Joined:
    Jul 25, 2010

    Jul 25, 2010
    11,139
    7,418
    1,413
    This is what I would recomend. Run a stock ruu,then select factory reset from the hboot menu,while the stock recovery is still in place.

    Hopefully your issue is fixed,and you can reroot and possibly try some other roms :)

    Is the device s on,or s off?
     
    Crashdamage likes this.

Share This Page

Loading...