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

Can't toggle wifi in android 10

Open kcubeterm opened this issue 4 years ago • 6 comments

I gave all permission to termux api,but can't toggle wifi with termux-wifi-enable true command, it's doesn't give any error even i can use all other api features like toggling torch, listing contact even wifi connection-info and wifi-scan-info etc. Since my termux-info command stuck it doesn't give any output so i provides an image for device info IMG_20200228_112910

kcubeterm avatar Feb 28 '20 06:02 kcubeterm

While playing around, I noticed the termux-wifi-enable works when Airplane mode=off. But if Airplane mode=on the Wifi status doesn't change in either way. My modus operandi is Airplane mode=on and Wifi=on as I don't have sim-card and it(or some of my previous devices, not sure) kept nagging about missing sim-card. termux-info-SM-T515.txt

roiderats avatar Jun 16 '21 04:06 roiderats

But if Airplane mode=on the Wifi status doesn't change in either way. My modus operandi is Airplane mode=on and Wifi=on

Same here on LineageOS 18.1 When, wifi is on, I run termux-wifi-enable false nothing happens. I have to do CTRL-C to get the prompt back. The same for termux-wifi-enable true

It does not matter if flight modus is on or off. In both cases termux-wifi-enable hangs.

It would be nice if this could be solved. Thanks.

zounp avatar Sep 11 '21 11:09 zounp

I can confirm. Both termux-wifi-enable true and termux-wifi-scaninfo just hangs without any output. Android 11.

xvitaly avatar Apr 14 '22 09:04 xvitaly

Fixed by Termux API installation. termux-api-* should check if this app is installed instead of waiting forever.

xvitaly avatar Apr 14 '22 09:04 xvitaly

can confirm termux-wifi-enable true and termux-wifi-enable false works with termux-api (with everything updated and updated && with hotspot off)

But @xvitaly, for some reason termux-api-* gave me command not found error. Do I have to install anything before running it.

PrajwalS1234 avatar Aug 25 '23 11:08 PrajwalS1234

Hello Termux not working on wifi Plz help me Any command not outing ids I don't know what is problem My ip address is unblock Uploading Screenshot_20231202_231524_Termux.jpg…

najibnr2 avatar Dec 02 '23 19:12 najibnr2