D Deleted member 103 Guest Sep 30, 2016 #1 Hi, I can connect to my Wemos-board with Android (Wemos is the server). For the connection I use the Library "WiFiConnect". Now I want to simultaneously build a connection with an iPhone. How does it work? Is there a library / function for this? Thank you in advance
Hi, I can connect to my Wemos-board with Android (Wemos is the server). For the connection I use the Library "WiFiConnect". Now I want to simultaneously build a connection with an iPhone. How does it work? Is there a library / function for this? Thank you in advance
Erel B4X founder Staff member Licensed User Longtime User Oct 2, 2016 #2 I'm not familiar with WiFiConnect library. You should use Network and iNetwork libraries with AsyncStreams for a low level TCP or UDP communication. Simple solution based on UDP broadcasting: https://www.b4x.com/android/forum/threads/esp8266-udp-bmp180-simple-weather-station.70243/#content For a more complex communication requirements then I would have used MQTT. It means that you need to run a broker on an Android, PC or RPi. But it will make everything simple. Upvote 0
I'm not familiar with WiFiConnect library. You should use Network and iNetwork libraries with AsyncStreams for a low level TCP or UDP communication. Simple solution based on UDP broadcasting: https://www.b4x.com/android/forum/threads/esp8266-udp-bmp180-simple-weather-station.70243/#content For a more complex communication requirements then I would have used MQTT. It means that you need to run a broker on an Android, PC or RPi. But it will make everything simple.
D Deleted member 103 Guest Oct 2, 2016 #3 Hi Erel, Simple solution based on UDP broadcasting: https://www.b4x.com/android/forum/threads/esp8266-udp-bmp180-simple-weather-station.70243/#content Click to expand... a question: how quickly is running the transfer? I must quickly transfer individual bytes, almost in realtime. Upvote 0
Hi Erel, Simple solution based on UDP broadcasting: https://www.b4x.com/android/forum/threads/esp8266-udp-bmp180-simple-weather-station.70243/#content Click to expand... a question: how quickly is running the transfer? I must quickly transfer individual bytes, almost in realtime.
Erel B4X founder Staff member Licensed User Longtime User Oct 4, 2016 #4 UDP broadcasting to multiple devices can be slow. If you send directly to a single device then it will be very fast. MQTT will also be fast. Upvote 0
UDP broadcasting to multiple devices can be slow. If you send directly to a single device then it will be very fast. MQTT will also be fast.
D Deleted member 103 Guest Oct 4, 2016 #5 Thank Erel. I need to simultaneously transmit at least two devices. Upvote 0
D Deleted member 103 Guest Oct 6, 2016 #7 Erel said: Go with MQTT. Click to expand... I'm sorry Erel, but I do not understand how to use MQTT to send the data from WeMos to Android and iOS without having a server. Your example uses a B4j server, for my solution I can not use a B4j server and no Internet. I start my WeMos as Wifi.StartAccessPoint2 ( "myWifi", "passwd"). Android and iOS connect with the WeMos and everyone gets a new IP address. Until everything is clear, how do I send from now with MQTT the data to the 2 devices? Upvote 0
Erel said: Go with MQTT. Click to expand... I'm sorry Erel, but I do not understand how to use MQTT to send the data from WeMos to Android and iOS without having a server. Your example uses a B4j server, for my solution I can not use a B4j server and no Internet. I start my WeMos as Wifi.StartAccessPoint2 ( "myWifi", "passwd"). Android and iOS connect with the WeMos and everyone gets a new IP address. Until everything is clear, how do I send from now with MQTT the data to the 2 devices?
Erel B4X founder Staff member Licensed User Longtime User Oct 6, 2016 #8 MQTT does require a broker. You need to run it somewhere. It can be on a desktop computer, Raspberry Pi or an Android device. If it is not possible then you can use UDP: https://www.b4x.com/android/forum/threads/70243/#content Upvote 0
MQTT does require a broker. You need to run it somewhere. It can be on a desktop computer, Raspberry Pi or an Android device. If it is not possible then you can use UDP: https://www.b4x.com/android/forum/threads/70243/#content
D Deleted member 103 Guest Oct 16, 2016 #9 Thank you Erel! I love MQTT, it is so simple, I think now on the right way. Upvote 0
D Deleted member 103 Guest Oct 16, 2016 #10 Unfortunately, the data on the connected devices does not come exactly at the same time. From device to device, 2 to 4 hundredths of a second are different. Upvote 0
Unfortunately, the data on the connected devices does not come exactly at the same time. From device to device, 2 to 4 hundredths of a second are different.