I am trying to up wifi on broadcom BCM4334 chip .
I tried to connect with an open wifi network with following steps
ifconfig wlan0 up
iwconfig wlan0 essid beast_test
After this I get following error
udhcpc: SIOCGIFINDEX: No such device
I also tried to assign static IP
ifconfig wlan0 192.168.2.125
Then when I ping my router
There is no response from it and ping fails.
Can you suggest me what may be the cause and how can I further debug it ?
I'd like to share experience on porting BCM4329 /BCM4330/BCM43362, these 3 chips can use the same driver, I think they should be suitable for your chip. please refer to the following steps:
1. Compiling WIFI souce code
(1)Copy WIFI driver got from Broadcomm to linux/drivers/net/wirless/bcmdhd/
(2)Copy WIFI firmware to linux/firmware/
Generally speaking, for BCM chip, we should at least need 2 firmware files : sdio-bcmxxx-dhd.bin / nvram.txt, for example , for BCM4329, these 2 files are :sdio-bcm4329-dhd.bin & nvram.txt.
(3)Compiling linux kernel & WIFI driver
---using 'make menuconfig' command to configure kernel, and select wifi driver as [M], not [*].
---Selecting corresponding protocol module
---using 'make uImage' to compile kernel
---using 'make modules' to compile modules you configured as [M]
Then, you can find dhd.ko file at path linux/drivers/net/wireless/bcmdhd, the file is WIFI driver.
2. Using insmod command to load WIFI driver
As an example, Let us show you load BCM4329 driver:
#/system/bin/insmod /system/lib/modules/dhd.ko "firmware_path=/system/etc/wifi/sdio-bcm4329-dhd.bin nvram_path=/system/etc/wifi/nvram.txt"
if it is successfull, continue ...
[Note: using your own firmware path]
3.Debugging WIFI with wireless-tools
(1)downloading wireless-tools source from internet, I used wireless_tools.29.tar.gz , maybe you can get it's new version.
(2)compiling the tool, and get 7 binary files : iwconfig iwevent iwgetid iwlist iwpriv iwspy
[Note: don't forget to use ARM Compiler to compile the tool, not x86]
if command can normally run, please refter to the following files link:
(3)using iwconfig to check eth1
(4)using iwconfig command to configure AP
#iwconfig eth1 mode Managed（Note: before doing this, don't forget to configure Router(AP) as Managed）
#iwconfig eth1 key 1234567890
#iwconfig eth1 key open
#iwconfig eth1 essid TP-LINK_432F1A
(5)Getting dynamic ip address by using dhcpcd command
(6)Seaching AP by using iwlist command
#iwlist eth1 scan
4.Using wpa_supplicant & wpa_cli tool to test WIFI
As we know, wpa_supplicant is server, wpa_cli is a client dependent on wap_supplicant, so we should at first run wpa_supplicant.
Before test, we should adjust file wpa_supplicant.conf like following:
#/system/bin/wpa_supplicant -B -Dwext -ieth1 -c/data/misc/wifi/wpa_supplicant.conf (Note: using your own path of wpa_supplicant.conf)
(2)Running wpa_cli command
# wpa_cli –i eth1
(3)Using wpa_cli to connect AP
# wpa_cli –i eth1
> set_network 0 ssid "TP-LINK_432F1A"
> set_network 0 wep_key2 "1234567890"
> enable_network 0
[Note] We aslo don't need to use wpa_cli here, but need to add some description in wpa_supplicant.conf like following:
Hope above steps can help you !