friedrith / node-wifi

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

linux-current-connections.js does not find connection due to incorrect regex #8

Closed starfishmod closed 5 years ago

starfishmod commented 7 years ago

The nmcli I have return the "Signal level" as "67/100" and has no dBm so it fails on this line

else if (input.match(/Signal level=(.*) dBm/)) {
                        connection.signal_level = input.match(/Signal level=(.*) dBm/)[1];
                    }

if I remove the dBm from the regex it works fine Sorry I didn't have the time to create a patch atm.

This stop it registering as a connection as the signal level is "0"

Andrew

friedrith commented 7 years ago

I am looking this today ! Sorry for the absence

friedrith commented 7 years ago

Please can you give an example, because I can't reproduce your bug. On my linux, nmcli standard output has dBm in the Signal level field.

Can you also give your version of Linux (distribution, version of nmcli) ?

friedrith commented 3 years ago

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