Closed ItsIgnacioPortal closed 4 months ago
Thanks for the logs, very helpful!
Unfortunately it seems like the wifi p2p manager is rejecting your attempt.
https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager#ERROR
Error code "Error" could unfortunately be just about anything.
Is your device able to use WiFi Direct for other functions?
This may be the API wake up call to move to starting a Local Hotspot API instead in the codebase. I will read up about how that API works and may be able to provide Local Hotspot as an alternative connection Broadcast
Do the recent changes in version 38 resolve your problem? Does rebooting the device hosting the hotspot change anything?
Do the recent changes in version 38 resolve your problem? Does rebooting the device hosting the hotspot change anything?
Hey! I've tested v38 now but the problem persists. Rebooting the host device does not seem to have any effect.
I'll try to manually test WiFi Direct functions next week
Unfortunate to hear. If Wifi direct is sending an internal error like your situation here, then either something else is using it (but normally that would report as BUSY instead of ERROR) or your device may just be incompatible :(
In your system settings, under Wifi, do you have a Wifi Direct option? Maybe in the overflow menu?
Hey, sorry for the late answer, it's been some very busy months.
I do have that button in my Android settings. I've tested Wi-Fi direct, and I can connect to another Wi-Fi direct android phone, and also connect to a regular WiFi network at the same time. So, Wifi-Direct does work. What else could be the cause of the issue?
Hi, thanks for getting back. I know life can be busy, it happens :)
Well unfortunately, I am not sure where else to go from here.
From the code side, all I am able to do as a Dev is say "hey WiFi direct, turn on"
And WiFi direct can either say "yes, error, or busy"
In your case its just saying "error" but nothing exists to convey to TetherFi why its erroring or what you can do to make it not error.
I'd look through other apps you have running just in case something else is expecting to use WiFi direct. Common things I've seen are things like Android Auto and some printer software or IoT devices like assistants or cameras.
Sometimes things just magically start working after you turn WiFi on and off 50 jillion times. It really is random, unfortunately.
Sorry to say, I don't know what else I can do here :(
I ran logcat
while I tried to start the TetherFi hotspot, and I found this:
04-07 21:34:47.264 1684 2843 E SupplicantP2pIfaceHal: Can't call groupAdd_1_2: ISupplicantP2pIface is null
04-07 21:34:47.270 9086 9086 E (WifiDirectNetwork.kt:366): Unable to create Wifi Direct Group
04-07 21:34:47.270 9086 9086 E (WifiDirectNetwork.kt:366): java.lang.RuntimeException: Broadcast Error: Error
I went down the rabbit hole and I can only conclude that this issue is caused by LineageOS. I'm on LineageOS 19.1, Android 12.
Is there an alternative to WifiP2pManager
? Earlier you mentioned:
This may be the API wake up call to move to starting a Local Hotspot API instead in the codebase. I will read up about how that API works and may be able to provide Local Hotspot as an alternative connection Broadcast
Hey nice job!
I really don't know where to go from here, you would probably have to report to lineage, since I have no control over the virt iface level of WiFi direct.
I've investigated Wifip2p local hotspot APIs since our very initial discussion, but the local hotspot is not a full replacement for WiFi p2p, so it wouldn't be an easy switch - I'm not even fully sure if it would be viable.
I would take this over to lineage and see what they say. Thanks for all your very cool work!
App version: 20231015-1 Android: 12 Device: Moto e6 plus
When I try to start the Tetherfi hotspot, I get this error:
I already tried reseting to the default settings and rebooting my device, but the problem persists. I've also collected the debugging log of when this error happens:
Could you help me @pyamsoft ?