0

I'm working on an embedded device that I think has a bad wifi antenna.

When I start the device I run ifconfig and see the wifi interface:

...
wlan3     Link encap:Ethernet  HWaddr 08:ea:40:d7:63:27  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

I then make a wifi access point on my laptop with no password. I try to set the device to use it with iwconfig wlan3 essid philip.

Then I assign the interface an IP with dhclient wlan3 -v, the logs from verbose seem to indicate it was a success. Also I run ifconfig again and can see my interface has an IP:

...
wlan3     Link encap:Ethernet  HWaddr 08:ea:40:d7:63:27  
          inet addr:192.168.12.120  Bcast:192.168.12.255  Mask:255.255.255.0
          inet6 addr: fe80::aea:40ff:fed7:6327/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11 errors:0 dropped:34 overruns:0 frame:0
          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1846 (1.8 KB)  TX bytes:7274 (7.2 KB)

Though I know in practicality I'm not connected because running ping -I wlan3 -c 1 8.8.8.8 fails.

  1. Does the assignment of an IP confirm that my wifi did connect to the network? (with an incorrect password or ssid dhclient wlan3 seems to just hang)

  2. Can I infer anything about a potential hardware problem from the RX and TX values in the second ifconfig?

End goal is to have my software tell the difference between an incorrect ssid/password and faulty hardware.

1

1) Yes.

2) No.

iw wlan3 station dump may give you better information to detect potential hardware problems, i.e. a missing or bad antenna.

3) If the problem is to detect an incorrect SSID or Password, and assuming you are (indirectly) using wpa_supplicant (and not WEP or no encryption), have a look at wpa_cli.

  • For any future readers. I also found just running iwconfig will return the interface with info about if it is associated. – Philip Kirkbride Nov 14 '17 at 16:52
  • 1
    @PhilipKirkbride: "Associated" only means it has found an AP with this SSID, you still need wpa_supplicant to check authentication status (password). You can also use iw dev wlan3 scan to check for available SSIDs. – dirkt Nov 14 '17 at 18:40

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.