Skip to content

Commit

Permalink
Fixed examples typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Dec 6, 2024
1 parent 7e1b6df commit 5645daf
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions examples/MqttsBuiltlnAWS/MqttsBuiltlnAWS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TinyGsm modem(SerialAT);
// The URL of xxxxxxx-ats.iot.ap-southeast-2.amazonaws.com can be found in the settings for endpoint in your AWS IOT Core account
const char *broker = "xxxxxxx.iot.ap-southeast-2.amazonaws.com";
const uint16_t broker_port = 8883;
const char *clien_id = "A76XX";
const char *client_id = "A76XX";

// Replace the topic you want to subscribe to
const char *subscribe_topic = "GsmMqttTest/subscribe";
Expand Down Expand Up @@ -71,11 +71,11 @@ bool mqtt_connect()
Serial.print("Connecting to ");
Serial.print(broker);

bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, clien_id);
bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, client_id);
if (!ret) {
Serial.println("Failed!"); return false;
}
Serial.println("successed.");
Serial.println("successfully.");

if (modem.mqtt_connected()) {
Serial.println("MQTT has connected!");
Expand Down
6 changes: 3 additions & 3 deletions examples/MqttsBuiltlnAuth/MqttsBuiltlnAuth.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const char *broker = "test.mosquitto.org";
const uint16_t broker_port = 8885;
const char *broker_username = "rw";
const char *broker_password = "readwrite";
const char *clien_id = "A76XX";
const char *client_id = "A76XX";

const char *subscribe_topic = "GsmMqttTest/subscribe";
const char *publish_topic = "GsmMqttTest/publish";
Expand All @@ -62,11 +62,11 @@ bool mqtt_connect()
Serial.print("Connecting to ");
Serial.print(broker);

bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, clien_id, broker_username, broker_password);
bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, client_id, broker_username, broker_password);
if (!ret) {
Serial.println("Failed!"); return false;
}
Serial.println("successed.");
Serial.println("successfully.");

if (modem.mqtt_connected()) {
Serial.println("MQTT has connected!");
Expand Down
6 changes: 3 additions & 3 deletions examples/MqttsBuiltlnEMQX/MqttsBuiltlnEMQX.ino
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TinyGsm modem(SerialAT);
// MQTT details
const char *broker = "broker.emqx.io";
const uint16_t broker_port = 8883;
const char *clien_id = "A76XX";
const char *client_id = "A76XX";

const char *subscribe_topic = "GsmMqttTest/subscribe";
const char *publish_topic = "GsmMqttTest/publish";
Expand Down Expand Up @@ -65,11 +65,11 @@ bool mqtt_connect()
// Set up Hivemq ROOT certificate
modem.mqtt_set_certificate(EmqxRootCa);

bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, clien_id);
bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, client_id);
if (!ret) {
Serial.println("Failed!"); return false;
}
Serial.println("successed.");
Serial.println("successfully.");

if (modem.mqtt_connected()) {
Serial.println("MQTT has connected!");
Expand Down
6 changes: 3 additions & 3 deletions examples/MqttsBuiltlnHivemq/MqttsBuiltlnHivemq.ino
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const char *broker = "xxxxx.s2.eu.hivemq.cloud";
const uint16_t broker_port = 8883;
const char *broker_username = "Your Hivemq username";
const char *broker_password = "Your Hivemq password";
const char *clien_id = "A76XX";
const char *client_id = "A76XX";

const char *subscribe_topic = "GsmMqttTest/subscribe";
const char *publish_topic = "GsmMqttTest/publish";
Expand All @@ -67,11 +67,11 @@ bool mqtt_connect()
Serial.print("Connecting to ");
Serial.print(broker);

bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, clien_id, broker_username, broker_password);
bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, client_id, broker_username, broker_password);
if (!ret) {
Serial.println("Failed!"); return false;
}
Serial.println("successed.");
Serial.println("successfully.");

if (modem.mqtt_connected()) {
Serial.println("MQTT has connected!");
Expand Down
6 changes: 3 additions & 3 deletions examples/MqttsBuiltlnNoSSL/MqttsBuiltlnNoSSL.ino
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TinyGsm modem(SerialAT);
// MQTT details
const char *broker = "test.mosquitto.org";
const uint16_t broker_port = 1883;
const char *clien_id = "A76XX";
const char *client_id = "A76XX";

const char *subscribe_topic = "GsmMqttTest/subscribe";
const char *publish_topic = "GsmMqttTest/publish";
Expand All @@ -61,11 +61,11 @@ bool mqtt_connect()
Serial.print("Connecting to ");
Serial.print(broker);

bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, clien_id);
bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, client_id);
if (!ret) {
Serial.println("Failed!"); return false;
}
Serial.println("successed.");
Serial.println("successfully.");

if (modem.mqtt_connected()) {
Serial.println("MQTT has connected!");
Expand Down
6 changes: 3 additions & 3 deletions examples/MqttsBuiltlnSSL/MqttsBuiltlnSSL.ino
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TinyGsm modem(SerialAT);
// MQTT details
const char *broker = "test.mosquitto.org";
const uint16_t broker_port = 8883;
const char *clien_id = "A76XX";
const char *client_id = "A76XX";

const char *subscribe_topic = "GsmMqttTest/subscribe";
const char *publish_topic = "GsmMqttTest/publish";
Expand All @@ -61,11 +61,11 @@ bool mqtt_connect()
Serial.print("Connecting to ");
Serial.print(broker);

bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, clien_id);
bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, client_id);
if (!ret) {
Serial.println("Failed!"); return false;
}
Serial.println("successed.");
Serial.println("successfully.");

if (modem.mqtt_connected()) {
Serial.println("MQTT has connected!");
Expand Down
4 changes: 2 additions & 2 deletions examples/MqttsBuiltlnWill/MqttsBuiltlnWill.ino
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const char *broker = "Your mqtt server address";
const uint16_t broker_port = 1883;
const char *broker_username = "broker_username";
const char *broker_password = "broker_password";
const char *clien_id = "clien_id";
const char *client_id = "client_id";

// Will topic , Change to the channel you want to post to
const char *will_topic = "esp32-00000-04/status";
Expand Down Expand Up @@ -70,7 +70,7 @@ bool mqtt_connect()
// Set will topic and message
modem.setWillMessage(will_topic, will_msg, qos);

bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, clien_id, broker_username, broker_password);
bool ret = modem.mqtt_connect(mqtt_client_id, broker, broker_port, client_id, broker_username, broker_password);
if (!ret) {
Serial.println("Failed!"); return false;
}
Expand Down

0 comments on commit 5645daf

Please sign in to comment.