Hi, I am using the MQTT with ESP-IDF example.
I have the following question, where is the CONFIG_BROKER_URL_FROM_STDIN compilation option configured?
It is in the file mqtt.c
#if CONFIG_BROKER_URL_FROM_STDIN
char line[128];
if (strcmp(mqtt5_cfg.uri, "FROM_STDIN") == 0) {
int count = 0;
printf("Please enter url of mqtt broker\n");
while (count < 128) {
int c = fgetc(stdin);
if (c == '\n') {
line[count] = '\0';
break;
} else if (c > 0 && c < 127) {
line[count] = c;
++count;
}
vTaskDelay(10 / portTICK_PERIOD_MS);
}
mqtt5_cfg.broker.address.uri = line;
printf("Broker url: %s\n", line);
} else {
ESP_LOGE(TAG, "Configuration mismatch: wrong broker url");
abort();
}
#endif /* CONFIG_BROKER_URL_FROM_STDIN */
Thank you
MQTT CONFIG_BROKER_URL_FROM_STDIN
Re: MQTT CONFIG_BROKER_URL_FROM_STDIN
Defines starting with CONFIG_ are usually from menuconfig (or whatever your IDE calls it).
Re: MQTT CONFIG_BROKER_URL_FROM_STDIN
Hi Sprite
Thank you very much for your answer. I didn't find the option to do this in menuconfig.
I directly used a define in mqtt.h
#define CONFIG_BROKER_URL_FROM_STDIN FALSE
Best regards,
Carlos
Thank you very much for your answer. I didn't find the option to do this in menuconfig.
I directly used a define in mqtt.h
#define CONFIG_BROKER_URL_FROM_STDIN FALSE
Best regards,
Carlos
Who is online
Users browsing this forum: Applebot, ChatGPT-User, Qwantbot and 3 guests
