YIO-Remote / remote-software

đź’Ž YIO Remote Software repository
GNU General Public License v3.0
164 stars 21 forks source link

No captive portal popup on Samsung phones #351

Closed martonborzak closed 4 years ago

martonborzak commented 4 years ago

Description

When connecting to the YIO Remote AP, no captive portal pops up on Samsung devices.

Expected behavior

A captive portal should pop up on the phone with a list of available wifi networks.

Your Environment

zehnm commented 4 years ago

Sorry I can't test this. No Samsung devices in my household. My old Samsung tablet died last Sunday and won't buy Samsung anymore.

This is probably more of an issue of the Android version used. @martonborzak please provide further details.

martonborzak commented 4 years ago

@Tosko4 would you be able to provide more details?

nklerk commented 4 years ago

How does samsung handle captive portals? Presumably DNS if so what record does it check on

Tosko4 commented 4 years ago

Brand: Samsung Model: S8+ Android version: 9 Kernel version: 4.4.153-16246896

What actually happened:

Step 1: turned on YIO Remote Step 2: connected to the YIO Remote Access Point (WiFi) with my Samsung device. It does connect, as it goes from Connecting to Connected and the WiFi icon appears in my top menu on Android instead of 4G cellular network.

And I believe this is where it goes wrong:

Step 3: A message pops up from Android mentioning that there is no internet connection on this WiFi and whether I want to continue with no internet, or want to turn off wifi. When I choose connect anyway, the Android message disappears, and no pop-up is shown with the web interface to continue the WiFi configuration setup. I think the Android pop-up asking me that question, blocked the script from executing the pop-up web page from YIO.

I am then returned to the WiFi access points list in Android and see that I remain connected to the YIO Access Point. When I click on the more information button next to the YIO Access Point WiFi connection, I see the IP adres that has been assigned to me and I see the gateway. When I click on the gateway, it opens the website: yio.remote/index.php in my chrome browser. And there is the configuration screen!

One more weird thing to note is: the WiFi signal was not there in the auto discovered list, so I had to enter the SSID en WPA code manually. once I entered all credentials and pressed next, the access point was turned off and it went to the page yio.remote/wifi where I obviously got the error message: “this website cant be reached”. It also did not write the wpa_supplicant.conf file. Maybe because the device could not connect to my home network, as it was auto tuned to channel 13, and these RPi’s don’t work with these channels. Marton figured that out once I confirmed that the YIO software was loaded but no IP adres was showing in the settings page.

De-assembling the device to take out the SD card, we noticed there was no wpa_supplicant.conf file and got a template shared with me by Marton. Filled in the details manually and uploaded the file to SD card. Changed channel to one that is supported by RPi, and there it goes.

——————— Test with other device? I first tried this on my iPhone. But I then figured I was not able to switch apps. So decided to grab a second phone. But When I performed steps 1 and 2 from my iPhone, no question was asked and the pop-up did appear with the YIO configuration page. I did not continue from there on because I had already switched over to my Android device.

gvdhoven commented 4 years ago

Related to this fix i did for my Arduino devices; https://www.hackster.io/voske65/captive-portal-for-wifi-ap-a14155

If i recall correctly the AP IP should be something like 172.x.x.x for Samsung devices (S7) to detect the captive portal. I'll see if i can fix it by providing the pull request.

martonborzak commented 4 years ago

Due to recent change in the setup flow, this is not an issue anymore.