3

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

migrated from stackoverflow.com Feb 4 '14 at 0:09

This question came from our site for professional and enthusiast programmers.

  • 1
    You also need to change the init.{hardware}.rc file with correct socket name (wpa_dummy0) – vishalm Feb 3 '14 at 16:25
0

Are you sure dummy is a wifi interface? Typical wifi interface's name is wlan0.

If you're 100% sure it is right wifi interface, you might also need to change the wlan0 inside the wpa_supplicant.conf file.

If that still fails, run the wpa_supplicant command under strace and try get more info from there.

0

Run in an ADB shell:

    wpa_cli

It will open a new type of shell in which:

Command help will give you all possible commands.

Command interface will show you all your activated interfaces.

Command interface_add will add a new interface to use, with following parameters

    interface_add <ifname> <confname> <driver> <ctrl_interface> <driver_param> <bridge_name>

ifname being the single optionnal parameter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.