M mmanso Active Member Licensed User Longtime User Mar 11, 2022 #1 Hi All, When we use the MqttClient in B4A it expects us to send Bytes(). We "feed" it with something like: serializator.ConvertObjectToBytes(var) How do you deal with other clients that are connected to the same mqtt broker? It's possible o send JSON or something between clients? Thanks.
Hi All, When we use the MqttClient in B4A it expects us to send Bytes(). We "feed" it with something like: serializator.ConvertObjectToBytes(var) How do you deal with other clients that are connected to the same mqtt broker? It's possible o send JSON or something between clients? Thanks.
DonManfred Expert Licensed User Longtime User Mar 11, 2022 #2 mmanso said: It's possible o send JSON or something between clients? Click to expand... Create a json and send this. Other clients (others than B4X) are not able to read or send serialized content. B4X: dim json as String ' fill json with the jsondata mqtt.send(json.GetBytes("UTF8")) ' Or whatever commands you need to use. Last edited: Mar 11, 2022 Upvote 1
mmanso said: It's possible o send JSON or something between clients? Click to expand... Create a json and send this. Other clients (others than B4X) are not able to read or send serialized content. B4X: dim json as String ' fill json with the jsondata mqtt.send(json.GetBytes("UTF8")) ' Or whatever commands you need to use.