Computersmith64 Well-Known Member Licensed User Longtime User Apr 27, 2017 #1 So my WeMos D1 boards arrived today, so I set about running Erel's tutorial (ESP8266 - WiFi Remote Configuration), which was all good. However, I want to set up the WeMos as an access point & then connect to it using a client socket on an Android device so that I can send messages from the WeMos to an app on the device. The problem I'm running into is that if I try to listen (on the WeMos) & connect (on the Android device) on anything other than port 80, the connection fails. Is this a WeMos "thing" or am I missing something? Thanks - Colin.
So my WeMos D1 boards arrived today, so I set about running Erel's tutorial (ESP8266 - WiFi Remote Configuration), which was all good. However, I want to set up the WeMos as an access point & then connect to it using a client socket on an Android device so that I can send messages from the WeMos to an app on the device. The problem I'm running into is that if I try to listen (on the WeMos) & connect (on the Android device) on anything other than port 80, the connection fails. Is this a WeMos "thing" or am I missing something? Thanks - Colin.
Erel B4X founder Staff member Licensed User Longtime User Apr 27, 2017 #2 You can listen on any port you like. Two tests you should make: 1. Test it from the PC. 2. Test it from the Android with airplane mode turn on and wifi enabled. Otherwise it may try to make the connection over the cellular network (because there is no internet in the wifi network). Upvote 0
You can listen on any port you like. Two tests you should make: 1. Test it from the PC. 2. Test it from the Android with airplane mode turn on and wifi enabled. Otherwise it may try to make the connection over the cellular network (because there is no internet in the wifi network).
Computersmith64 Well-Known Member Licensed User Longtime User Apr 27, 2017 #3 Thanks for that Erel. I was testing on my phone & it must have been trying to connect via the cell network. I switched to my tablet (WiFi only) & it worked fine. On further investigation, it turns out that the weather station tutorial using UDP was actually a better fit for what I want to do - so I've written some code to do a UDP broadcast from the WeMos & I'm seeing the data come through on the B4A side. Thanks! - Colin. Upvote 0
Thanks for that Erel. I was testing on my phone & it must have been trying to connect via the cell network. I switched to my tablet (WiFi only) & it worked fine. On further investigation, it turns out that the weather station tutorial using UDP was actually a better fit for what I want to do - so I've written some code to do a UDP broadcast from the WeMos & I'm seeing the data come through on the B4A side. Thanks! - Colin.