cancel
Showing results for 
Search instead for 
Did you mean: 

SPWF04Sx - FW1.1.0 - MQTTCONN userID

yoann LBY
Senior
Posted on March 13, 2018 at 12:17

hi,

question about MQTT conection TLS:

how can i sent empty userID during MQTT Communication?

if parameter userID is NULL, nv_model used....

thanks

Yoann

AT+S.MQTTCONN

To open a connection with an MQTT Broker. The command returns a local ID =0, used in the correspondent commands. The device manages one MQTT connection at a time.

Usage: AT+S.MQTTCONN=<hostname>,[<port>],[<path>],[<TLS>],[<username>],[<passwd>],[<userID>],[<keep_alive>],[<retry>],[<lastWill_QoS>],[<lastWill_topic>],[<lastWill_message>]<cr>

<userID>

Default: nv_model used during MQTT communications

1 REPLY 1
Elio Cometti
Senior II
Posted on March 13, 2018 at 12:48

Hello Yoann,

userID field maps to Client Identifier field in connect packet.

Client Identifier that has length of zero bytes is an optional feature not implemented in SPWF04's MQTT client.

You may want to use a userID which is a random string of 23 UTF-8 encoded bytes in length, and that contain only the characters '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' (unless the server allows longer string containing richer alphabets).

Regards,

Elio