B4J Library [B4X] jMQTT - Official MQTT client - Erel    
Aug 24, 2026   
(27 reactions)Implementation of MQTT client based on the Paho open source project: http://www.eclipse.org/paho/
See this tutorial for more information: https://www.b4x.com/android/forum/threads/iot-mqtt-protocol.59471/
jMQTT v1.26+ is compatible with B4J and B4A (older versions weren't compatible...
link: org.eclipse.paho.client.mqttv3-1.2.5.jar was missing from the zip. I've added it back....
link: /android/forum/threads/connectandreconnect-mqtt-close-problem.171884/post-1051058...
B4J Tutorial [IoT] MQTT Protocol - Erel    
Sep 26, 2023   
(24 reactions)What is MQTT?
"MQTT is a Client Server publish/subscribe messaging transport protocol....org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html)
I recommend all developers to learn the main concepts of MQTT. It is quite simple to use and it solves many of the real-world issues that developers need to manage when building network based solutions.
You can find good tutorials about MQTT here:
https://www.hivemq.com/mqtt-essentials/
Some of the differences between MQTT solutions and B4J server (http...
B4J Library MqttBroker - Erel    
Jul 17, 2019   
(23 reactions)jMqttBroker library is based on the moquette open source project: https://github.com/andsel/moquette
It implements a MQTT broker. If you are not familiar with MQTT then start with this tutorial... be used with B4A. You can turn any Android or Linux board to a MQTT broker.
With B4A you need to add... this library is simple:
Sub Process_Globals
Dim broker As MqttBroker
End Sub
Sub AppStart....12 (December 2018) is available here: www.b4x.com/b4j/files/jMqttBroker2.zip
Unlike v1, the new...
B4A Tutorial [B4X] MQTT Chat Room - Erel    
Nov 18, 2019   
(43 reactions)It's time to learn how to use MQTT: https://www.b4x.com/android/forum/threads/59471/#content
It is simple and powerful. In most cases MQTT is the best solution for low level networks. Low level....
In this example we implement a chat room with one or more users. The MQTT broker is embedded in the Android app (jMqttBroker library). The clients are Android, iOS or desktop apps. Any number... the soft keyboard changes.
jMQTT library: https://www.b4x.com/android/forum/threads/59472/#content...
B4J Question MQTT: Unknow packet - limitation on messagesize ? - wl    
Aug 1, 2021I have my own MqttBroker running (v2 in B4J).
broker.Initialize("", 51041) 'first parameter is the event name. It is currently not used.
broker.DebugLog = True
broker.Start
StartMessageLoop 'Non-UI app
When I send a message like this one:
Type MQTTFilePartMessage (PartNumber As Long, PartCount As Long, Chunksize As Long, Data() As Byte) 'topic....
As I understood the maximum size a MQTT packet could have is around 250 MB ?
I can't seem to set any option...
B4A Tutorial MQTT Chat with Auto Discovery - Erel    
Jan 30, 2017   
(28 reactions)This is an extension to the MQTT chat room example: https://www.b4x.com/android/forum/threads/b4x-mqtt-chat-room.61568/#content
It is a chat room where one of the devices acts as a server and the others as clients.
https://www.b4x.com/basic4android/images/SS-2017-01-30_10.56.47.jpg
The difference in this example is that the clients don't need to enter the server ip address.
All devices listen to UDP packets on port 51049.
The server broadcasts its ip address every second. It is done...
B4A Library jMQTT - Official Android MQTT client - Erel    
Feb 17, 2020   
(14 reactions)The B4J jMQTT library is fully compatible with B4A: https://www.b4x.com/android/forum/threads/59472/#content
A tutorial about MQTT: MQTT Protocol
Implementation of the same example is attached (you need to set the user name and password if you like to test it)....
Share My Creation [B4X] ShareYourSpot (GPS, FLP, MQTT) 0$ - Magma    
Jun 27, 2024   
(28 reactions).. sharing them with MQTT Broker with AES Encryption...
What Exactly do that APP ?
- Get GPS Location using FLP (location get at background and foreground) and publish at MQTT Broker - at specific...
B4A Tutorial [B4X] MQTT - Connect & Reconnect - Erel    
Sep 27, 2021   
(21 reactions) the connection has broken.
It sends a "ping" request every 5 seconds to help the MQTT client recognize... the working variable to False.
Sub ConnectAndReconnect
Do While working
If mqtt.IsInitialized Then mqtt.Close
Do While mqtt.IsInitialized
Sleep(100)
Loop
mqtt.Initialize("mqtt", "ssl://io.adafruit.com:8883", "B4X" & Rnd(0, 999999999))
Dim mo As MqttConnectOptions
mo.Initialize(username, password)
Log...
B4A Question Mqtt chat network error - postasat    
Mar 21, 2018Hello,
I have a problem using mqtt chat with autodiscovery.
I use a tablet as server and phones as client in a mqtt chat with autodiscovery.
Both are connected in the same wifi network but the wifi network have no internet connection.
If the phone have wifi on and mobile data on, when I start connection, the phone/client can't find the tablet/server and I have success=false in a few time in the "Private Sub client_Connected (Success As Boolean)".
If I turn off the phone mobile...
Page: 1  
2  
3  
4  
5  
6  
7