I recently studied MQTT and found that BANanoMQTT is very happy 1.BANano6.11 Demo example, there are the following questions 2.because of BANanoMQTT Only Websockets are supported, can you support MQTT\TCP ? Thanks
From a web browser you can ONLY use MQTT over Websockets, not native MQTT (over TCP).
This is because the browser will not let you open a normal socket for security reasons.
If the iot.eclipse.org broker is down, here is an alternative to test:
B4X:
Dim clientId As String = "BananoMQTT" & Rnd(1,9999999999)
mqtt.Initialize("mqtt", "mqtt.eclipse.org",80, "/mqtt", False, clientId) ' note: the path MUST be /mqtt for this test server
Dim ops As BANanoMQTTConnectOptions
ops.Initialize("", "")
ops.CleanSession = False
mqtt.Connect2(ops)