Closed the-mind closed 4 years ago
I want to use the client_id to connect to a mqtt broker.
const char* client_id = NULL; /* Ensure we have a clean session */ uint8_t connect_flags = MQTT_CONNECT_CLEAN_SESSION; /* Send connection request to the broker. */ mqtt_connect(&client, client_id, NULL, NULL, 0, NULL, NULL, connect_flags, 400);
What should i change to connect using a custom client_id like 12345 etc.
@the-mind client_id is string that name your client. If you want your clients name to be 12345 you can do "12345".
client_id
See the docs here
I want to use the client_id to connect to a mqtt broker.
What should i change to connect using a custom client_id like 12345 etc.