switch to MQTT 3.1.1 by default
This commit is contained in:
parent
9fa0c54fce
commit
15713af468
@ -287,7 +287,13 @@ uint8_t Adafruit_MQTT::connectPacket(uint8_t *packet) {
|
||||
p+=2;
|
||||
// fill in packet[1] last
|
||||
|
||||
#if (MQTT_PROTOCOL_LEVEL == 4)
|
||||
p = stringprint_P(p, PSTR("MQTT"));
|
||||
#elif (MQTT_PROTOCOL_LEVEL == 3)
|
||||
p = stringprint_P(p, PSTR("MQIsdp"));
|
||||
#else
|
||||
#error "No MQTT version selected!"
|
||||
#endif
|
||||
|
||||
p[0] = MQTT_PROTOCOL_LEVEL;
|
||||
p++;
|
||||
|
@ -45,7 +45,8 @@
|
||||
#define DEBUG_PRINTBUFFER(buffer, len) {}
|
||||
#endif
|
||||
|
||||
#define MQTT_PROTOCOL_LEVEL 3
|
||||
// Use 3 (MQTT 3.0) or 4 (MQTT 3.1.1)
|
||||
#define MQTT_PROTOCOL_LEVEL 4
|
||||
|
||||
#define MQTT_CTRL_CONNECT 0x01
|
||||
#define MQTT_CTRL_CONNECTACK 0x02
|
||||
|
Loading…
Reference in New Issue
Block a user