NL80211 Wireless Driver & DHCP Issues

388 views
Skip to first unread message

Kiran Karra

unread,
Nov 1, 2011, 10:18:44 AM11/1/11
to android-...@googlegroups.com
Hi All,
I am attempting to use the NL80211 driver to connect to a WiFi network with the Beagleboard.  The Beagleboard is running Gingerbread OS with the 2.6.37 Linux Kernel. 

Before using the NL80211 driver, I used the WEXT driver to successfully connect to the AP and access the internet.  I need to use NL80211 because I want to use the IW tool to create a mesh network, which requires NL80211.  It seems that the NL80211 driver is working fine with Android because I have been able to scan for AP's.  However, I can't obtain an IP address through DHCP.  Here is the relevant output of logcat: (I've bolded the DHCP stuff)

E/dhcpcd  (13412): dhcpcd 4.0.15 starting
F/dhcpcd  (13412): hardware address = 00:13:f7:19:dd:10
F/dhcpcd  (13412): executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason PREINIT
I/WifiHW  ( 1155): wifi_command called, cmd:STATUS
I/WifiHW  ( 1155): wifi_send_command, cmd = STATUS
D/wpa_supplicant( 2087): CMD: STATUS
I/WifiHW  ( 1155): returning reply bssid=00:26:62:ee:62:50
I/WifiHW  ( 1155): ssid=IOIW1
I/WifiHW  ( 1155): id=1
I/WifiHW  ( 1155): pairwise_cipher=WEP-40
I/WifiHW  ( 1155): group_cipher=WEP-40
I/WifiHW  ( 1155): key_mgmt=NONE
I/WifiHW  ( 1155): wpa_state=COMPLETED
I/WifiHW  ( 1155):  for cmd STATUS
I/WifiHW  ( 1155): wifi_command called, cmd:DRIVER RSSI-APPROX
I/WifiHW  ( 1155): wifi_send_command, cmd = DRIVER RSSI-APPROX
D/wpa_supplicant( 2087): CMD: DRIVER RSSI-APPROX
D/wpa_supplicant( 2087): wpa_driver_nl80211_driver_cmd RSSI-APPROX
D/wpa_supplicant( 2087): rssi-approx command
I/WifiHW  ( 1155): returning reply OK
I/WifiHW  ( 1155):  for cmd DRIVER RSSI-APPROX
I/WifiHW  ( 1155): wifi_command called, cmd:DRIVER LINKSPEED
I/WifiHW  ( 1155): wifi_send_command, cmd = DRIVER LINKSPEED
D/wpa_supplicant( 2087): CMD: DRIVER LINKSPEED
D/wpa_supplicant( 2087): wpa_driver_nl80211_driver_cmd LINKSPEED
D/wpa_supplicant( 2087): Link Speed command
I/WifiHW  ( 1155): returning reply OK
I/WifiHW  ( 1155):  for cmd DRIVER LINKSPEED
I/WifiHW  ( 1155): wifi_command called, cmd:STATUS
I/WifiHW  ( 1155): wifi_send_command, cmd = STATUS
D/wpa_supplicant( 2087): CMD: STATUS
I/WifiHW  ( 1155): returning reply bssid=00:26:62:ee:62:50
I/WifiHW  ( 1155): ssid=IOIW1
I/WifiHW  ( 1155): id=1
I/WifiHW  ( 1155): pairwise_cipher=WEP-40
I/WifiHW  ( 1155): group_cipher=WEP-40
I/WifiHW  ( 1155): key_mgmt=NONE
I/WifiHW  ( 1155): wpa_state=COMPLETED
I/WifiHW  ( 1155):  for cmd STATUS
I/WifiHW  ( 1155): wifi_command called, cmd:DRIVER RSSI-APPROX
I/WifiHW  ( 1155): wifi_send_command, cmd = DRIVER RSSI-APPROX
D/wpa_supplicant( 2087): CMD: DRIVER RSSI-APPROX
D/wpa_supplicant( 2087): wpa_driver_nl80211_driver_cmd RSSI-APPROX
D/wpa_supplicant( 2087): rssi-approx command
I/WifiHW  ( 1155): returning reply OK
I/WifiHW  ( 1155):  for cmd DRIVER RSSI-APPROX
...
I/dhcpcd  (13412): host does not support a monotonic clock - timing can skew
E/dhcpcd  (13412): broadcasting for a lease
F/dhcpcd  (13412): sending DHCP_DISCOVER with xid 0xd879d6fe, next in 3.91 seconds

... **SOME MORE COMMANDS SENT BY WifiHW**
F/dhcpcd  (13412): sending DHCP_DISCOVER with xid 0xd879d6fe, next in 8.05 seconds
... **SOME MORE COMMANDS SENT BY WifiHW**
F/dhcpcd  (13412): sending DHCP_DISCOVER with xid 0xd879d6fe, next in 16.55 seconds
... **SOME MORE COMMANDS SENT BY WifiHW**
F/dhcpcd  (13412): sending DHCP_DISCOVER with xid 0xd879d6fe, next in 32.96 seconds
... **SOME MORE COMMANDS SENT BY WifiHW**
D/dhcpcd  (13412): timed out
F/dhcpcd  (13412): executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason FAIL

My init.rc file starts up wpa_supplicant and dhcp as follows:
service wpa_supplicant /system/bin/wpa_supplicant -dd -Dnl80211 -iwlan0 -c /system/etc/wifi/wpa_supplicant.conf
    socket wpa_wlan0 dgram 660 wifi wifi
    group system wifi inet
    disabled
    oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -dABKL wlan0
    group system dhcp
    disabled
    oneshot


I'm wondering if anybody has an idea of what the issue could be here?  According to the logcat anyway, it seems that the DHCP discover packets are being sent out, but I am not getting a response from the AP.  This is puzzling because I have been able to obtain an IP address successfully using DHCP with the WEXT driver. 

Any help is greatly appreciated!

Thanks

Vitaly Wool

unread,
Nov 1, 2011, 12:02:07 PM11/1/11
to android-...@googlegroups.com
Hi Kiran,

On Tue, Nov 1, 2011 at 3:18 PM, Kiran Karra <kiran...@gmail.com> wrote:
> Hi All,
> I am attempting to use the NL80211 driver to connect to a WiFi network with
> the Beagleboard.  The Beagleboard is running Gingerbread OS with the 2.6.37
> Linux Kernel.

I strongly suggest that you grab air log and see what's going on there.

~Vitaly

Reply all
Reply to author
Forward
0 new messages