Closed Stan92 closed 7 years ago
You are right about the current SSID it is a good idea but if I remember it i's no simple on all os. I am gonna to check it.
About your issue: what is your os ? What kind of wifi card do you use ?
I'm using your package with a Mac as well as a Raspberry PI (Raspbian). Je pense que tu dois comprendre le franglais :-)
Do you have the same behavior on the two platforms ?
Yes it's the same behavior.. Probably there's a way to check if the connection has been successfully up, if you could get the current connected SSID. The solution would be to compare with the callback the "active" SSID (or an empty string if the system is not yet connected) with the SSID you want to connect to... Of course the best of the best should be to compare the Mac Address instead of the SSID (knowing you could have several same SSID).
Do you an idea to do this in macOS ?
On linux iwconfig
wlan0 IEEE 802.11bgn ESSID:"Elqui"
Mode:Managed Frequency:2.412 GHz Access Point: C8:3A:35:35:DD:28
Bit Rate=300 Mb/s Tx-Power=22 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=44/70 Signal level=-66 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:56 Missed beacon:0
So I should be able to get:
but there is no security information.
There is a branch called #dev with everything you need (linux and os x), tell me if it is enough for you and I will merge it if it is the case. I will try the next weekend for the raspbian.
For mac, this is the command : ifconfig
and I get
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 10:40:f3:7b:4d:0e
inet6 fe80::bb:ee88:8865:62fa%en0 prefixlen 64 secured scopeid 0x4
inet 192.168.0.22 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether b2:00:1a:fc:99:a0
media: autoselect
Thanks.. I'll make a try during the week, and let your know.
The problem with the command ifconfig
is that it doesn't give the ssid of the wifi network, the frequency nor the signal level.
Also interested in this feature! Thx!
Do not hesitate to propose a PL
Sorry for the late, but this feature has been added in the last version 1.2.4 available on npm now.
Please look the new function getCurrentConnections
. For now, it is only available for linux and macOS.
Thank you!
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.
Hi, A quick question (not really an issue). Is it possible to know on which current SSID the user is connected if she is?
And this should be an issue. When I try to connect to SSID with a wrong password, I can't get back an error saying the password is wrong but I get connected to the last known SSID.