kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
mqtt clientid done right (+no space in id)
rodzic
1d4f406dbb
commit
97716f7d79
|
@ -27,7 +27,7 @@ void MQTT::init(const char* host, uint16_t port, const char* id, const char *use
|
|||
|
||||
Serial.println("[MQTT] pubsub client");
|
||||
mqttClient.setServer(ip, port);
|
||||
snprintf(buffer, 20, "%s%6ld", id, random(0, 1000));
|
||||
snprintf(buffer, 20, "%s%04d", id, (int)random(0, 1000));
|
||||
buffer[20] = 0;
|
||||
mqttClient.setClientId(buffer);
|
||||
if (strlen(password) > 0) {
|
||||
|
|
Ładowanie…
Reference in New Issue