Skip to main content
yoann LBY
Senior
March 13, 2018
Question

SPWF04Sx - FW1.1.0 - MQTTCONN userID

  • March 13, 2018
  • 1 reply
  • 456 views
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

    This topic has been closed for replies.

    1 reply

    Elio Cometti
    Visitor II
    March 13, 2018
    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