jarkko-hautakorpi / iBeacon-indoor-positioning-demo

Indoor positioning of iBeacon tags (tagged people, dogs, cats and objects) by trilateration, using ESP32.
MIT License
187 stars 102 forks source link

BLEData are not transfered to MQTT #21

Open schmeckm opened 1 year ago

schmeckm commented 1 year ago

Hi ALL

I was successfully able to upload the sketch to the ESP32 and the device was able to built-up a connectivity to my MQTT Server.

However although the connection was built, no MQTT message is transfered to the server although in the serial monitor I can see that a lot of BLE Devices were found , but nothing is transfered.

The issue must be site here arround in this coding:

payloadString.getBytes(message_char_buffer, payloadString.length() + 1); result = client.publish("/beacons/office", message_char_buffer, payloadString.length(), false); Serial.print("PUB Result: "); Serial.println(result);

If I look to the serial monitor I can see that the Serial.println(result) = 0

If I just use the following coding as a demo: "client.publish("/beacons/office", "hello World")" The message arrived on the MQTT Server

Any tip here? I didnt touch the code

Markus

Screenshot 2023-04-06 141810