FAQ: How do I check if I'm successfully connected to a WiFi network?


  • administrators

    For the Omega2, there's a few ways to check:

    1 - iwconfig

    Running iwconfig will print several lines, but it will include a section like this:

    apcli0    RTWIFI SoftAP  ESSID:"myNetworkName"
              Mode:Managed  Channel=11  Access Point: 00:25:9C:13:9B:6B
              Bit Rate=72 Mb/s
    

    This will indicate if the Omega is successfully connected to a network and if so, the network's SSID and the router's MAC address.

    In the above example output:

    • The Omega is successfully connected
    • Network's SSID is myNetworkName
    • The router's MAC address is 00:25:9C:13:9B:6B

  • administrators

    2 - ifconfig

    Running ifconfig will also print many lines, but there will be a section for apcli0 that looks something like this:

    apcli0    Link encap:Ethernet  HWaddr 42:A3:6B:00:F0:4F
              inet addr:192.168.1.103  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::40a3:6bff:fe00:f04f/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:882 errors:0 dropped:0 overruns:0 frame:0
              TX packets:304 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:133372 (130.2 KiB)  TX bytes:24022 (23.4 KiB)
    

    You can also run ifconfig apcli0 to just get this output.

    This will output data related to the Omega's connection with the WiFi network, here you'll be able to see if an IP address is assigned or not.
    Note that the statistics displayed here are not accurate.

    • If the inet addr part is not blank, then the Omega has successfully connected to the wifi network and has been given an IP address. In the case above, that IP address is 192.168.1.103.
    • If the inet addr part is blank, the Omega has not connected to the WiFi network.

  • administrators

    3 - ap_client logs

    Running logread | grep ap_client will list the output of the WiFi driver middleware. The output will let you know if the Omega is associated, and if so, the MAC address of the AP:

    Fri Oct 19 19:58:58 2018 kern.info ap_client: 'apcli0' assoc: no, mac: 00:00:00:00:00:00
    Fri Oct 19 19:58:58 2018 kern.info ap_client: Scanning for networks...
    Fri Oct 19 19:59:00 2018 kern.info ap_client: network 0:  3 myNetwork 00:35:9d:13:9b:6d WPA2PSK (AES) -60
    Fri Oct 19 19:59:00 2018 kern.info ap_client: network 1:  6 notMyNetwork 00:26:50:9e:3e:09 WEP () -62
    Fri Oct 19 19:59:00 2018 kern.info ap_client: network 2:  9 NopeNotMe 8c:68:c8:a7:49:3c WPA2PSK (AES) -63
    Fri Oct 19 19:59:00 2018 kern.info ap_client: network 3:  3   fa:8f:ca:31:e1:64 NONE () -64
    Fri Oct 19 19:59:00 2018 kern.info ap_client: Found configured network, trying to associate (essid: myNetwork, bssid: 00:35:9d:13:9b:6d,)
    Fri Oct 19 19:59:01 2018 kern.info ap_client: 'apcli0' assoc: no, mac: 00:00:00:00:00:00
    Fri Oct 19 19:59:02 2018 kern.info ap_client: 'apcli0' assoc: no, mac: 00:00:00:00:00:00
    Fri Oct 19 19:59:03 2018 kern.info ap_client: 'apcli0' assoc: yes, mac: 00:35:9d:13:9b:6d
    Fri Oct 19 19:59:03 2018 kern.info ap_client: Interface 'apcli0' successfully associated to network (3 checks)
    Fri Oct 19 19:59:11 2018 kern.info ap_client: 'apcli0' assoc: yes, mac: 00:35:9d:13:9b:6d
    Thu Nov 22 00:21:26 2018 kern.info ap_client: 'apcli0' assoc: yes, mac: 00:35:9d:13:9b:6d
    Thu Nov 22 00:21:26 2018 kern.info ap_client: 'apcli0' assoc: yes, mac: 00:35:9d:13:9b:6d
    Thu Nov 22 00:21:26 2018 kern.info ap_client: 'apcli0' assoc: yes, mac: 00:35:9d:13:9b:6d
    Thu Nov 22 00:21:26 2018 kern.info ap_client: 'apcli0' assoc: yes, mac: 00:35:9d:13:9b:6d
    Thu Nov 22 00:21:26 2018 kern.info ap_client: 'apcli0' assoc: yes, mac: 00:35:9d:13:9b:6d
    

  • administrators


  • administrators

    5 - Asking for Help

    If you're still having issues connecting to a WiFi network and would like to ask the community for help, running

    wifisetup debug
    

    will create a log file, /tmp/wifidebug.log, with information helpful for troubleshooting the issue.

    Adding a -v flag will include a detailed scan of WiFi networks in the surrounding networking in the log file:

    wifisetup -v debug
    

    More information is always helpful when debugging issues.

    Share this file when posting on the community (of course, you can filter out sensitive information like network passwords).



  • @Lazar-Demin Outstanding update!

    --Bill



  • @Lazar-Demin sir can we come to know how many persons are connecting to this onion board through Wifi?.



  • @Nagarjuna-Reddy Off the top of my head I would say the Onion server can see client meta-info only down to the IP layer (3) whereas the media from client to it's first hop is at layer 2 (link). @Lazar-Demin can correct me if I'm wrong, but I've gotta bet there's no means to tell how clients are connected at that level.

    --Bill



  • if you do

    logread | grep dhcp
    

    you will see the associated stations getting ip addresses assigned to their MAC addresses, like:

    Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPDISCOVER(br-wlan) 84:cf:bf:xx:xx:xx
    Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPOFFER(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx
    Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPDISCOVER(br-wlan) 84:cf:bf:xx:xx:xx
    Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPOFFER(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx
    Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPREQUEST(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx
    Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPACK(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx
    

    if you are not using DHCP because you use fixed addresses or IPv6, then

    ip neigh show dev br-wlan
    

    will show know MAC addresses, like:

    192.168.3.173 lladdr 84:cf:bf:xx:xx:xx ref 1 used 0/0/0 probes 1 REACHABLE
    fe80::6:af0a:307c:37ae lladdr 84:cf:bf:xx:xx:xx used 0/0/0 probes 1 REACHABLE
    

    I'd recommend using the new iw command but, although it exists in our Omegas, the modern nl80211 seems not to be available, so it does not work. If it did, it would be very easy to dump the connected stations.



  • @victoriano Grepping logread will show you requests for an ip from your dhcpd but it doesn't tell you who is still connected. So it's informative but not definitive.



  • @crispyoz fully agreed. But you can then use the neighbour table (a.k.a. ARP in IPv4 world) to see if those you have found via grep have shown any vital signs recently. Of course, if your Omega is their router, they SHOULD (RFC 2119) show in that table if they have a minimum activity.


  • administrators



Looks like your connection to Community was lost, please wait while we try to reconnect.