Summary: MQTT restricts password to be less than 256 bytes
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: richmond_umagat
Submitted on: Thu 13 Sep 2018 07:27:21 AM UTC
Severity: 3 - Normal
Item Group: Feature Request
Assigned to: None
Discussion Lock: Any
Planned Release: None
lwIP version: git head
MQTT brokers such as Google Cloud IoT Core requires MQTT clients to send JSON
Web Token (JWT) as password field of the MQTT Connect packet. JWT can be more
than 255 bytes.
Currently, the MQTT library restricts password to be less than 256 bytes, thus
it prevents connectivity to Google Cloud IoT Core.
To fix the issue, mqtt_client_connect() must be updated as follows:
- Change client_pass_len from u8 to u16
- Update error checking length of client_info->client_pass from 255 to X
- Also, MQTT_OUTPUT_RINGBUF_SIZE has been changed from 256 to 768.
Modifications are enclosed in FT32_PORT.
Attached are the proposed modifications tested to connect to Google Cloud IoT