Closed jeffkowalski closed 4 months ago
I have a Samsung Android phone and sotacat.local works on it. So is there some way to get other Android phones to do what the Samsung phones do? Are there 3rd party mDNS clients we could use?
Using the KX display would be cool if you know how to do that. But then you have to type in the address each time rather than having a shortcut that can be reused.
Two issues conflating here:
Yes, there are some ways to get android to resolve sotacat.local to the address of the sotacat when it's working in AP mode. But then, the android will direct all traffic there, and won't allow simultaneous split network access to the "outside" so that all the other functions of the sotacat page (like the spot list!) will silently fail.
Instead, we can connect the sotacat to the android-published hotspot - as a client of that hotspot. This allows the sotacat to communicate with the outside world just fine. ...If only we could figure out where the sotacat was from the point of view of the hotspot-serving device. It seems to hop around.
That's the central issue - when the sotacat connects to an android hotspot, how can the android user find the sotacat's client IP?
I think I have the solution, at least it works on my Samsung Android phone:
To make things easier on novice users, I updated the firmware with a WiFi Client-2 default SSID of "ham-hotspot" and Password of "sotapota" in commit 38a66f6. This allows Android users to avoid having to program the SOTACAT, and all they need to do is configure their Android hotspot settings to match the defaults.
This is good sleuthing, Brian. I will try it out. I prefer to have the phone hotspot on client 1 since that's the one I use most of the time in the field. At home, it's OK to wait the extra seconds to have it time out past that and find my home network on client 2. I would think that most folks wouldn't need to have it connect to home network, except for testing, or, like us few, for programming.
On Sun, Apr 21, 2024 at 4:00 PM Brian Mathews @.***> wrote:
To make things easier on novice users, I updated the firmware with a WiFi Client-2 default SSID of "ham-hotspot" and Password of "sotapota" in commit 38a66f6 https://github.com/SOTAmat/SOTAcat/commit/38a66f6e00abf0cae945f2353bfe5e4b2fe412cf. This allows Android users to avoid having to program the SOTACAT, and all they need to do is configure their Android hotspot settings to match the defaults.
— Reply to this email directly, view it on GitHub https://github.com/SOTAmat/SOTAcat/issues/41#issuecomment-2068240941, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN4MCNMLMIP533TUDGA7LY6RAINAVCNFSM6AAAAABGMSE4QCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRYGI2DAOJUGE . You are receiving this because you authored the thread.Message ID: @.***>
Feel free to swap them. I just want a reasonable default so that people can skip having to connect to the ESP32 as a Server, and instead just set up their Android hotspot to advertise an SSID/Password that the SOTACAT is expecting by default. Saves a lot of steps that way.
Made the following changes in commit 51a9133
Just need you to test.
Made changes to the Setup and WiFi code in commits adde9a4 84b5da8 1b0b670
This is less likely an issue on these scenarios: 1) when the sotacat joins an existing home wifi network 2) when the sotacat creates its own access point (discoverable at 192.168.4.1), but not availing split networking on android (sigh) 3) when the sotacat joins a hotspot on apple devices, where it's discoverable as sotacat.local
The chief issue is
There's no good way, currently, of determining the IP addr of the sotacat as it is presented on the hotspot. Therefore there's no reliable address to which to connect. Fortunately it does have a lifetime, so if observed in the serial logs while connected to PC, it could be a basis for subsequent connection, but that's really terrible.
Proposal here is to scroll the IP address of the SOTAcat on the VFOb display until a connection from client (e.g. webserver request) is made.