termux-api icon indicating copy to clipboard operation
termux-api copied to clipboard

How to select and connect WiFi

Open Vj opened this issue 7 years ago • 4 comments

TERMUX-wifi-enable - to start WiFi TERMUX-wifi-scaninfo - to search available WiFi TERMUX-wifi-connectioninfo - to check the connected WiFi details...

So, what's the command to select a particular WiFi from available list.?

Vj avatar Jan 13 '19 10:01 Vj

I also would like a command to connect to a specific network. I know it's possible because QR scanner apps can do this. I have used QR Droid to make a WiFi QR code. It can then connect even if it's not in the phone's saved networks list. We just need someone to find how these apps do it and implement it in termux-api. The new command could be as follows:

termux-wifi-connect [SSID] [encryption type (none|wep|wpa|)] [key]

bpsib avatar Jul 09 '19 17:07 bpsib

Hi guys, thank you for the hard work making these APIs. it's really helpful. Anw, any updates for termux-wifi-connect API?

fathanpranaya avatar Jul 23 '21 03:07 fathanpranaya

Why is this command is not showing the wifi info

Deepcode2021 avatar Aug 16 '23 17:08 Deepcode2021

@Deepcode2021 The termux-wifi-scaninfo shows the information about last scan made by Android OS, i.e. it doesn't perform scanning. If your Android didn't scan the WiFi, you won't have the information in output.

The location permission grant for the Termux:API is mandatory for having command termux-wifi-scaninfo working properly.

sylirre avatar Aug 16 '23 22:08 sylirre