Wifi connection of a target device not connecting in linux through terminal?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wifi connection of a target device not connecting in linux through terminal?

2,330 Views
abdullahmateen
Contributor I

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

udhcpc wlan0

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

ping 192.168.2.1

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  ?

Tags (2)
0 Kudos
1 Reply

1,109 Views
weidong_sun
NXP TechSupport
NXP TechSupport

wifi-select.png

#/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

#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

iwconfig-AP.png

(5)Getting dynamic ip address by using dhcpcd command

#/system/bin/dhcpcd eth1

get-ipaddr.png

(6)Seaching AP by using iwlist command

#iwlist eth1 scan

searching-ap.png

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:

......

ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi

ap_scan=1

update_config=1

.....

(1)Running wpa_supplicant

#/system/bin/wpa_supplicant -B -Dwext -ieth1 -c/data/misc/wifi/wpa_supplicant.conf (Note: using your own path of wpa_supplicant.conf)

supplicant.png

(2)Running wpa_cli command

# wpa_cli –i eth1

>scan

>OK

>scan_results

wpa_cli.png

(3)Using wpa_cli to connect AP

# wpa_cli –i eth1

>add_network

0

> set_network 0 ssid "TP-LINK_432F1A"

OK

> set_network 0 wep_key2 "1234567890"

OK

> enable_network 0

OK

wpa_cli_connect-ap.png

[Note] We aslo don't need to use wpa_cli here, but need to add some description in wpa_supplicant.conf like following:

#WEP Networing

network={

ssid="TP-LINK_432F1A"

key_mgmt=NONE

wep_key2="1234567890"

wep_tx_keyidx=0

priority=5

auth_alg=SHARED

}

Hope above steps can help you !

Regards,

Weidong

0 Kudos