Open mrdulin opened 3 years ago
Is there a .isConnected() method to check if the target wifi is connected or not?
.isConnected()
I am trying to use wifi.scan() method to get the information of the networks.
wifi.scan()
// disconnected { mac: 'd4:c8:b0:06:a1:71', bssid: 'd4:c8:b0:06:a1:71', ssid: 'ZA-Office', channel: 36, frequency: 5180, signal_level: '-69', quality: 62, security: '', security_flags: [] },
// connected { mac: '44:6a:2e:10:44:31', bssid: '44:6a:2e:10:44:31', ssid: 'ZA-Office', channel: 36, frequency: 5180, signal_level: '-92', quality: 16, security: '', security_flags: [] }
There is no field to indicate whether the network is connected.
I want to implement a function that automatically reconnects when wifi is disconnected.
"node-wifi": "^2.0.14",
You can use .getCurrentConnections() and compare the results to check if you're on the right network.
.getCurrentConnections()
Expected Behavior
Is there a
.isConnected()
method to check if the target wifi is connected or not?Current Behavior
I am trying to use
wifi.scan()
method to get the information of the networks.There is no field to indicate whether the network is connected.
Affected features
Context
I want to implement a function that automatically reconnects when wifi is disconnected.
Your Environment
"node-wifi": "^2.0.14",