termux-wifi-connectioninfo
Problem description When doing termux-wifi-connectioninfo in an established wifi-connection i get wrong information. Wrong infos: bssid, mac_address, ssid, ssid_hidden bssid and mac_adress are both set to 02:00:00:00:00:00; that's wrong. ssid: "<unknown ssid>" ssid_hidden:true; that's wrong
Steps to reproduce Do termux-wifi-enable true and wait some seconds or enable it using a android app Do termux-wifi-connectioninfo
Expected behavior I would expect to get correct info about ssid, ssid_hidden, bssid and mac_address
Additional information
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.org/packages/ stable main
# game-repo (sources.list.d/game.list)
deb https://dl.bintray.com/grimler/game-packages-24 games stable
# science-repo (sources.list.d/science.list)
deb https://dl.bintray.com/grimler/science-packages-24 science stable
Updatable packages:
All packages up to date
Android version:
8.1.0
Kernel build information:
Linux localhost 4.4.78-perf+ termux/termux-packages#1 SMP PREEMPT Mon May 13 22:21:16 CST 2019 aarch64 Android
Device manufacturer:
BullittGroupLimited
Device model:
S61
Output of termux-wifi-connectioninfo:
{
"bssid": "02:00:00:00:00:00",
"frequency_mhz": 5180,
"ip": "192.168.xxx.xxx",
"link_speed_mbps": 433,
"mac_address": "02:00:00:00:00:00",
"network_id": 3,
"rssi": -42,
"ssid": "<unknown ssid>",
"ssid_hidden": true,
"supplicant_state": "COMPLETED"
}
@Mike6742 - in my case, getting this to work required the following to be true on my phone:
- Termux:API application installed
- Termux:API application granted access to Location permission
- Location enabled
@MrFishFinger i have Termux:API installed, location enabled and access to location granted, but still getting exactly the same incomplete/incorrect results for termux-wifi-connectioninfo as reported by @Mike6742
it would be helpful to include the current state of wifi also, eg toggled on / off as this info is inaccessible without root inside termux. can currently only see if wifi is connected or not. not the android state - if wifi is toggled on or off.
Hi,
I got the same issue. After some time, I saw the location was granted "only in foreground processes", switch it to "always" fixed the problem for me.