Has anyone else come up against an issue using Android 7.1 (Google Pixel mobile) and SoftAP?
Am pretty sure that the problem is with Android 7.1 because Android 5.0.2 (HTC One) works fine, as does a MacBook running macOS 10.12.1.
Settings:Phone Status:Status shows that the phone has IP address 10.245.142.241, but it should be 192.168.0.2. It looks to me that Android 7.1 is rejecting the served IP address.
I think this is different to iOS 10 and SoftAP which seems to be a browser security issue.
Thanks for reaching out. I’m afraid I don’t quite understand the issue here. Are you having issues connecting to your Photon while it’s in listening mode or when it’s in a user-defined SoftAP mode?
I unfortunately don’t have a Android 7.1 phone in front of me now but I have a friend with one and I can test if you can clarify!
Update - same issue with the Pixel mobile phone running Android 8.0.0.
In summary, Photon is in listening mode, running SoftAP.
Mobile phone associates okay with the Photon and is correctly issued IP 192.168.0.2 with gateway 192.168.0.1. So far so good, but the mobile cannot browse to http://192.168.0.1/ using the Chrome browser (noting that I did select http: and not https:)
Using a MacBook, same procedure was successful, ie able to browse http://192.168.0.1/ and the SoftAP page displayed as expected.
To check that Chrome was not the issue, ran Telnet on my phone, and tried to connect to 192.168.0.1 port 80 - problem was NO CONNECTION. This clears Chrome as the problem.
Happy to report that the following modified line in MyPage() fixed the issue:
// Catching page request "/gen_204" and other variants is necessary for Android 7.1 and above.
if ((strcmp(url,"/index")==0) || (strcmp(url,"/gen")==0))
Looks like my Telnet test was bad - the “connection fail” does not make sense given that a connection is in play…
Anyhow, case closed!
PS - if anyone knows what /gen_204 is about for the record, that would be appreciated.
HTTP/1.1 204 No Content
Content-Type: text/html; charset=ISO-8859-1
P3P: CP="This is not a P3P policy! See P3P and Google's cookies - Google Account Help for more info."
Date: Sun, 03 Dec 2017 09:57:45 GMT
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Set-Cookie: NID=118=omS8w1nIGn7s2VXuN2IPeKaufNsHu9kCG1wACUuUj6B1-6jo_5KljO2Kc0attjx4v1ru-tSYdgtf7neQPjz_0N-OTL6_rULg9z6-XvgkcvY5EBi7Yae-IQDV1CHULquI; expires=Mon, 04-Jun-2018 09:57:45 GMT; path=/; domain=.google.com; HttpOnly
Am going to experiment with returning 204 No content to the mobile to overcome the Android issue. Will report back.
Configure WiFi access as appropriate on the mobile to allow connection to a non-internet connected WiFi AP
There should be a way to make configuration of the mobile not required by properly responding to the gen_204 request. Am happy to test any suggestions here as I have not been able to work it out.
This is a problem, since different devices have different ways to determine wheter a "real" internet access exist or not.
Some just ping 8.8.8.8 others might try to ping their home server or even request a particular page - there is no way to build all these possible responses into SoftAP.