friedrith / node-wifi

📶 NodeJS tool to manage wifi (connections, scans)
MIT License
395 stars 161 forks source link

Is it possible to set up event listeners for changes? #47

Closed blahsd closed 6 years ago

blahsd commented 6 years ago

So have a function triggered, for instance, when the connection is lost? Or do I have to ping it constantly to monitor if there are any changes?

friedrith commented 6 years ago

Hi, It could very useful but I suggest you to do it by your self on the top of node-wifi. Because neither linux, macOS or Windows propose simple CLI commands to get event listener. So node-wifi should have a system of very stable pooling to handle this kind of feature which is very particular for your case.

To be honest, that something I built in my company where I created this project but it was so painful so have something stable (you have a lot of wrong positive and wrong negative) that I didn't want to integrate it in node-wifi. Sadly, I didn't save the code so it couldn't help you.

It think it could be a new project built on the top of node-wifi or built using the C api of each OS maybe (it might be more efficient).

vallabhvrao commented 5 years ago

Can't nmcli monitor mode be used to watch changes in linux ? nmcli -p m It doesn't return after it goes in monitor mode, will node still be able to get the output even if the control is not returned ?

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.