HypnoToad
Posts: 52
Joined: Thu Dec 11, 2014 6:00 pm

Is it possible to show wireless clients IP addresses connected to a RPI Hotspot?

Sat Jul 21, 2018 4:27 pm

I've followed the guide here:

https://www.raspberrypi.org/documentati ... s-point.md

to create a wireless access point with internet access, and it's been working well for around 2 weeks now.

I'd like to the able to see the IP addresses of the devices connected to the hotspot as I need to update the firmware on 1 of the devices using a webinterface.

Is this possible? If so how?

I can find the MAC addresses of connected devices using the following command:

Code: Select all

systemctl status hostapd
and it shows a list like this:

Jul 21 17:07:50 pixx hostapd[725]: wlan0: STA b4:xx:xx:xx:fb:65 WPA: group key handshake completed (RSN)

Is it possible to find the IP addresses somehow?

Thanks

DirkS
Posts: 9057
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Is it possible to show wireless clients IP addresses connected to a RPI Hotspot?

Sat Jul 21, 2018 4:50 pm

If you're using dnsmasq then I think you should see all the leases in /var/lib/misc/dnsmasq.leases
That does not necessarily mean they are still connected.

epoch1970
Posts: 2019
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Is it possible to show wireless clients IP addresses connected to a RPI Hotspot?

Sat Jul 21, 2018 9:44 pm

With "hostapd_cli all_sta", you can retrieve the MAC address of all connected stations.
Normally the client will be in the arp table of the AP, you can match the MAC to an IP address or name this way.
You should wrap that in a script, here is an example in bash.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 9 guests