u-blox / XPLR-HPG-software

Apache License 2.0
13 stars 1 forks source link

Captive portal not working with iphone hotspots #1

Closed sbro-u-blox closed 1 year ago

sbro-u-blox commented 1 year ago

We had a training session with Fernando Torres in Malmo recently. We were able to run the WiFi captive portal example when we used the local WiFi network, but it never worked with iphone hotspots. Multiple people have tried, multiple times, but we can't seem to get it to work on iphone. This is really important because it would typically be the easiest way to demonstrate the program in the field.

Can you see if you can figure out why it isn't working with iphone?

Thanks,

Steve Brown

dbou-ublox commented 1 year ago

Hi @sbro-u-blox,

To understand the situation a bit better:

A log of xplr serial console would help here

sbro-u-blox commented 1 year ago

I was able to configure the credentials, and I believe they are correct. But, I can't see that the device is connecting to the hotspot.

How would I tell from the serial log? I see this:

D [(5528) xplrWifiStarter|xplrWifiStarterFsm|270|: WiFi init successful! D [(5559) xplrWifiStarter|xplrWifiStarterFsm|281|: Register handlers successful! D [(5584) xplrWifiStarter|xplrWifiStarterFsm|300|: Wifi credentials configured:1 D [(5609) xplrWifiStarter|xplrWifiStarterFsm|306|: WiFi mode selected: STATION D [(5609) xplrWifiStarter|xplrWifiStarterFsm|314|: WiFi set mode successful! D [(5656) xplrWifiStarter|xplrWifiStarterFsm|354|: WiFi set config successful! I (5681) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07 I (5785) wifi:mode : sta (e8:31:cd:da:a0:f4) I (5786) wifi:enable tsf D [(5788) xplrWifiWebserver|xplrWifiWebserverStart|228|: Starting server on port: '80' D [(5791) xplrWifiWebserver|xplrWifiWebserverStart|232|: Registering URI handlers I [(5798) xplrWifiDns|mDnsInit|339|: mdns hostname set to: [xplr-hpg] D [(5814) xplrWifiStarter|xplrWifiStarterFsm|382|: WiFi started successful! D [(5841) xplrWifiStarter|xplrWifiStarterFsm|431|: Call esp_wifi_connect success! I (5849) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1 I (5851) wifi:state: init -> auth (b0)

Prior to that I see the correct SSID and Password on the serial interface.

I see GNSS statistics on the serial interface, but I can't ever get PointPerfect to get a high precision fix.

If you let me know how to capture more information for you, I will give it a try. I'm kind of new at this, so pardon my ignorance.

Steve From: dbou-ublox @.> Sent: Wednesday, July 5, 2023 2:56 PM To: u-blox/XPLR-HPG-software @.> Cc: Steve Brown @.>; Mention @.> Subject: Re: [u-blox/XPLR-HPG-software] Captive portal not working with iphone hotspots (Issue #1)

You don't often get email from @.* Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification ** This is an EXTERNAL email. It was sent from outside of u-blox. ****

Hi @sbro-u-bloxhttps://github.com/sbro-u-blox,

To understand the situation a bit better:

A log of xplr serial console would help here

- Reply to this email directly, view it on GitHubhttps://github.com/u-blox/XPLR-HPG-software/issues/1#issuecomment-1622404635, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A27SF4WUCTWW7ZVO2QCN3O3XOXBELANCNFSM6AAAAAAZ7MFXEA. You are receiving this because you were mentioned.Message ID: @.***>

sbro-u-blox commented 1 year ago

By the way, if I follow the exact same sequence of steps with my home WiFi network, it works as expected.

I get a FLOAT fix, and I can track my device on the web portal.

It seems to have something to do with using the iphone hotspot.

Steve

From: dbou-ublox @.> Sent: Wednesday, July 5, 2023 2:56 PM To: u-blox/XPLR-HPG-software @.> Cc: Steve Brown @.>; Mention @.> Subject: Re: [u-blox/XPLR-HPG-software] Captive portal not working with iphone hotspots (Issue #1)

You don't often get email from @.* Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification ** This is an EXTERNAL email. It was sent from outside of u-blox. ****

Hi @sbro-u-bloxhttps://github.com/sbro-u-blox,

To understand the situation a bit better:

A log of xplr serial console would help here

- Reply to this email directly, view it on GitHubhttps://github.com/u-blox/XPLR-HPG-software/issues/1#issuecomment-1622404635, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A27SF4WUCTWW7ZVO2QCN3O3XOXBELANCNFSM6AAAAAAZ7MFXEA. You are receiving this because you were mentioned.Message ID: @.***>

dbou-ublox commented 1 year ago

Just a guess, since I do not have an iphone available. Is the hotspot running at 5GHz maybe? (I think in recent iOS you can tune it). If it is 5GHz only, then xplr will not connect, since the NINA module operates at 2.4 only

mazgch commented 1 year ago

Hi Steve, It was working for me but I have not tried recently for the new code. Have you enabled compatibility mode and allowed access for others in the hotspot settings?

aangeletos commented 1 year ago

Hello Steve, just as Michael suggests, have you enabled compatibility mode? Furthermore, searching in esp forums I see that other people had issues when they were having a backtick/apostrophe in their hotspot name. Can that be the case for you as well?

sbro-u-blox commented 1 year ago

Michael,

Yes, I have “allowed others to join”.

I don’t know about “enable compatibility mode”.

That’s not in my personal hotspot settings menu. Where would you set that on an iPhone?

Thanks,

Steve Brown u-blox America Field Applications Engineer 39W716 Buckskin Trail St. Charles, IL 60175 847-910-6791 (cell) @.***

On Jul 6, 2023, at 12:55 AM, Michael Ammann @.***> wrote:

 You don't often get email from @.* Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification ** This is an EXTERNAL email. It was sent from outside of u-blox. ****

Hi Steve, It was working for me but I have not tried recently for the new code. Have you enabled compatibility mode and allowed access for others in the hotspot settings?

— Reply to this email directly, view it on GitHubhttps://github.com/u-blox/XPLR-HPG-software/issues/1#issuecomment-1623035426, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A27SF4TNZKH2OXRQVSBX7VTXOZHLNANCNFSM6AAAAAAZ7MFXEA. You are receiving this because you were mentioned.Message ID: @.***>

sbro-u-blox commented 1 year ago

I thought that maybe this was the issue, but I found that my phone only supports 2.4GHz WiFi. I have an older iPhone Xr which doesn’t have 5GHz.

So, that’s not the issue.

Maybe this is the excuse I need to finally go buy a new phone. :-)

Steve Brown u-blox America Field Applications Engineer 39W716 Buckskin Trail St. Charles, IL 60175 847-910-6791 (cell) @.***

On Jul 6, 2023, at 12:12 AM, dbou-ublox @.***> wrote:

 You don't often get email from @.* Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification ** This is an EXTERNAL email. It was sent from outside of u-blox. ****

Just a guess, since I do not have an iphone available. Is the hotspot running at 5GHz maybe? (I think it n recent iOS you can tune it). If it is 5GHz only, then xplr will not connect, since the NINA module operates at 2.4 only

— Reply to this email directly, view it on GitHubhttps://github.com/u-blox/XPLR-HPG-software/issues/1#issuecomment-1623000643, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A27SF4WCLND24NITNAIYUSTXOZCMLANCNFSM6AAAAAAZ7MFXEA. You are receiving this because you were mentioned.Message ID: @.***>

sbro-u-blox commented 1 year ago

I can try changing the name and let you know what happens. I have a “-“ in my hotspot name (SRB-XR).

But, I realized that I have that in my home network too (The-Brown-Network) which does work every time.

My hotspot password has “!” in it. Any issues with that?

Maybe I’m doing something else wrong. If it was actually connecting to the hotspot, how do I get to the web portal from my PC?

I have to connect my laptop to the hotspot, then what address should I use in the browser? I’m thinking maybe I messed that up.

Steve Brown u-blox America Field Applications Engineer 39W716 Buckskin Trail St. Charles, IL 60175 847-910-6791 (cell) @.***

On Jul 6, 2023, at 2:45 AM, Al3x @.***> wrote:

 You don't often get email from @.* Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification ** This is an EXTERNAL email. It was sent from outside of u-blox. ****

Hello Steve, just as Michael suggests, have you enabled compatibility mode? Furthermore, searching in esp forums I see that other people had issues when they were having a backtick/apostrophe in their hotspot name. Can that be the case for you as well?

— Reply to this email directly, view it on GitHubhttps://github.com/u-blox/XPLR-HPG-software/issues/1#issuecomment-1623154926, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A27SF4RVEVWYRIPEPA5FHPLXOZULDANCNFSM6AAAAAAZ7MFXEA. You are receiving this because you were mentioned.Message ID: @.***>

mazgch commented 1 year ago

I would suggest to monitor the NINA serial port from the laptop to see if the device connects to the hotspot of the phone after you entered the wifi credentials using the captive portal.

Likely you should see there some printfs indicating state changes or progress. Providing a log with this serial output could give you a clue or help the team to know what is going on it would probably also print the numeric IP address.

You need to be in the same network to communicate between device and laptop (both need to be connected to the hotspot)

sbro-u-blox commented 1 year ago

I figured it out. It was user malfunction on my part.

I realized that my PC was reconnecting to my home WiFi network and not to the hot spot. Once I forced my PC to join the hot spot, I was able to get it working on my iphone.

Sorry for the false alarm, but thanks a bunch for the really quick responses.

I'll keep playing with the kit and let you know what else I find.

Steve

From: Michael Ammann @.> Sent: Thursday, July 6, 2023 11:38 AM To: u-blox/XPLR-HPG-software @.> Cc: Steve Brown @.>; Mention @.> Subject: Re: [u-blox/XPLR-HPG-software] Captive portal not working with iphone hotspots (Issue #1)

You don't often get email from @.* Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification ** This is an EXTERNAL email. It was sent from outside of u-blox. ****

I would suggest to monitor the NINA serial port from the laptop to see if the device connects to the hotspot of the phone after you entered the wifi credentials using the captive portal.

Likely you should see there some printfs indicating state changes or progress. Providing a log with this serial output could give you a clue or help the team to know what is going on.

- Reply to this email directly, view it on GitHubhttps://github.com/u-blox/XPLR-HPG-software/issues/1#issuecomment-1623982490, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A27SF4TKPGCG6G6H2ADI4L3XO3SUZANCNFSM6AAAAAAZ7MFXEA. You are receiving this because you were mentioned.Message ID: @.***>

dbou-ublox commented 1 year ago

Great! Closing this issue