adds zero byte client id option for 3.1.1
This commit is contained in:
parent
a3925bdb6b
commit
913cce41af
@ -294,6 +294,12 @@ uint8_t Adafruit_MQTT::connectPacket(uint8_t *packet) {
|
|||||||
} else {
|
} else {
|
||||||
if (pgm_read_byte(clientid) != 0) {
|
if (pgm_read_byte(clientid) != 0) {
|
||||||
p = stringprint_P(p, clientid);
|
p = stringprint_P(p, clientid);
|
||||||
|
} else {
|
||||||
|
p[0] = 0x0;
|
||||||
|
p++;
|
||||||
|
p[0] = 0x0;
|
||||||
|
p++;
|
||||||
|
DEBUG_PRINTLN(F("SERVER GENERATING CLIENT ID"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,9 +45,7 @@
|
|||||||
#define DEBUG_PRINTBUFFER(buffer, len) {}
|
#define DEBUG_PRINTBUFFER(buffer, len) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MQTT_PROTOCOL_LEVEL
|
|
||||||
#define MQTT_PROTOCOL_LEVEL 4
|
#define MQTT_PROTOCOL_LEVEL 4
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MQTT_CTRL_CONNECT 0x01
|
#define MQTT_CTRL_CONNECT 0x01
|
||||||
#define MQTT_CTRL_CONNECTACK 0x02
|
#define MQTT_CTRL_CONNECTACK 0x02
|
||||||
@ -65,9 +63,7 @@
|
|||||||
#define PING_TIMEOUT_MS 500
|
#define PING_TIMEOUT_MS 500
|
||||||
|
|
||||||
// Adjust as necessary, in seconds. Default to 5 minutes.
|
// Adjust as necessary, in seconds. Default to 5 minutes.
|
||||||
#ifndef MQTT_CONN_KEEPALIVE
|
|
||||||
#define MQTT_CONN_KEEPALIVE 300
|
#define MQTT_CONN_KEEPALIVE 300
|
||||||
#endif
|
|
||||||
|
|
||||||
// Largest full packet we're able to send.
|
// Largest full packet we're able to send.
|
||||||
// Need to be able to store at least ~90 chars for a connect packet with full
|
// Need to be able to store at least ~90 chars for a connect packet with full
|
||||||
|
Loading…
Reference in New Issue
Block a user