1 Reply Latest reply on Feb 19, 2016 7:51 AM by Intel_Peter

    Get connected clients hostapd


      I've created a access point on the Edison (from holding down the button for 4 seconds like described here, or with commands as described here)


      Now I want to get a list of all the clients connected to that AP, a few searches revealed these Q&As on StackExchange:

      linux - How do I get a list of the connected wifi clients in OpenWrt 10.03? - Super User

      wireless - Listing DEVICES connected in HOTSPOT through Terminal - Ask Ubuntu



      The only command I have available out of the box on the Edison from those links is arp, so I tried using "arp -an" to list the connected devices, and it showed my laptop which was connected to the AP!


      Now here is my issue, I disconnected my laptop from the AP on the Edison, and ran the command again, and it still listed my laptop as connected, weird. I ran the command several more times, and sometime it showed the ip that my laptop was assigned by the Edison in the list, and other times it showed no devices connected.


      Any ideas on why I'm not getting a consistent behavior with arp?  

        • 1. Re: Get connected clients hostapd

          Hello Keith.M,


          The reason why you continue to see the hosts in arp's output is because of how arp works. The command arp manipulates or displays the kernel's IPv4 network neighbor cache. It can add entries to the table, delete one, or display the current content. If you choose arp or arp -a, it will print the current content of the table. In order for you to check if the host is still connected you will have to delete it from the table and then run the command again.


          You can find more information about arp in Linux and UNIX arp command help and examples.