python - Create access point and monitor connected clients (Raspberry) -


i have been trying logger of connects, disconnects , times connected access point via raspberry pi. have came creating access point on raspberry pi 3 dnsmasq , hostapd , getting list of connected users (with ip/mac) via arp commands running command python read list. struggling creating listener(monitor) in python listen changes on network -> connect or disconnect , run arp command list , log change e.g. text file or console(irrelevant @ point).

i avoid looping every x ms in order arp status since not give me exact information unless runs time , delay in time of response arp command , writing console/file or whatever there in loop.

i'm wondering if knows listener implement , interrupt main program, work , go main program e.g. or other solution regarding this?

perhaps use python's subprocess.popen read /var/log/daemon.log (or wherever log file is) , grep network,connect pattern.

configure hostapd log need /etc/hostapd.conf.

or if you're willing code, looks there's api, see wpa_event_connected in wpa_ctrl.h (https://w1.fi/wpa_supplicant/devel/wpa__ctrl_8h.html)


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -