|
|
|
@ -32,7 +32,6 @@ bool MyMqtt_Init(void){ |
|
|
|
char brokerUri[50]; |
|
|
|
char brokerUri[50]; |
|
|
|
// get from NVS
|
|
|
|
// get from NVS
|
|
|
|
Challenge_Nvs_GetBrokerIpFromNVS(_brokerIp, sizeof(_brokerIp)); |
|
|
|
Challenge_Nvs_GetBrokerIpFromNVS(_brokerIp, sizeof(_brokerIp)); |
|
|
|
ESP_LOGI(TAG, "Got Broker IP '%s' from NVS", _brokerIp); |
|
|
|
|
|
|
|
McuUtility_strcpy((unsigned char*)brokerUri, sizeof(brokerUri), (unsigned char*)"mqtt://"); |
|
|
|
McuUtility_strcpy((unsigned char*)brokerUri, sizeof(brokerUri), (unsigned char*)"mqtt://"); |
|
|
|
McuUtility_strcat((unsigned char*)brokerUri, sizeof(brokerUri), (unsigned char*)_brokerIp); |
|
|
|
McuUtility_strcat((unsigned char*)brokerUri, sizeof(brokerUri), (unsigned char*)_brokerIp); |
|
|
|
ESP_LOGI(TAG, "Connecting to Mqtt Broker URI '%s'", brokerUri); |
|
|
|
ESP_LOGI(TAG, "Connecting to Mqtt Broker URI '%s'", brokerUri); |
|
|
|
|