question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Return the network after connecting

See original GitHub issue

Hii there,

node-wifi has the wifi.connect() method but this only returns anything if it there is an error.
When I manually tried connecting using the following command, however, I can get some more information (most notably, the interface used).

$ nmcli -w 10 device wifi connect REDACTED password REDACTED Device ‘wlp2s0’ successfully activated with ‘REDACTED’.

Would it be an option to return the connection (things like ssid, bssid, iface etc. etc.) so we can extract some information that might be handy?
Right now what I do is wifi.connect(), wait for the connection to be finished then run wifi.getCurrentConnections(), wait for that to finish then do some additional checks so I can get the exact interface used.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
FinlayDaG33kcommented, Jan 8, 2020

I haven’t worked on it lately (mainly because I’ve forgotten about it since the app that I built using this hasn’t been of much use for me since I don’t travel by public transit a lot anymore)…

I do agree that having a separate call might be a better thing as well.

1reaction
FinlayDaG33kcommented, Nov 2, 2019

That would indeed be a suiting alternative yes 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Wi-Fi connection issues in Windows - Microsoft Support
When you forget a network connection, it removes the Wi-Fi network profile from your PC. ... Select Start > Settings > Network &...
Read more >
How to get back online after a Windows 10 update breaks ...
Open Start. Search for Command Prompt, right-click the top result, and select the Run as administrator option. Type the following command to ...
Read more >
How to get Wifi Back in Network and Settings Windows 10
Do you not have a wifi option in Network and Setting Center? Here is the fix.Codes (or files as I call them in...
Read more >
If your iPhone or iPad won't connect to a Wi-Fi network
Restart your router and cable or DSL modem by unplugging the device and then plugging it back in. After you restart each device,...
Read more >
Fix Wi-Fi connection problems - Google Fi Help
Internet & network · Unplug the router and modem's power cords from the power outlet for 15 seconds. · Plug the power cords...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found