File was renamed from src/nbiotd/core/iotd_conf.c |
| | |
| | | return -2 ; |
| | | } |
| | | |
| | | memset(iotd_conf, 0, sizeof(*iotd_conf)); |
| | | log_nrml("Start parser iotd configure file \"%s\"\n", conf_file); |
| | | |
| | | logger = &iotd_conf->logger; |
| | | nbiot = &iotd_conf->nbiot_conf; |
| | | lora = &iotd_conf->lora_conf; |
| | |
| | | log_err("Configure without NB-IoT comport device, thread will not start\n"); |
| | | nbiot->enable = DISABLE; |
| | | } |
| | | log_nrml("Configure NB-IoT comport device as '%s'\n", lora->comport); |
| | | log_nrml("Configure NB-IoT comport device as '%s'\n", nbiot->comport); |
| | | |
| | | nbiot->baudrate = iniparser_getint(ini, "nbiot:baudrate", 9600); |
| | | log_nrml("Configure NB-IoT comport baudrate as '%d'\n", nbiot->baudrate); |
| | |
| | | |
| | | data = iniparser_getint(ini, "mqtt:enable", 0); |
| | | mqtt->enable = data? ENABLE : DISABLE; |
| | | log_nrml("Confiugre MQTT thread [%s]\n", lora->enable ? "enable" : "disable"); |
| | | log_nrml("Confiugre MQTT thread [%s]\n", mqtt->enable ? "enable" : "disable"); |
| | | |
| | | str = iniparser_getstring(ini, "mqtt:hostname", NULL); |
| | | if( !str || strlen(str) <= 0 ) |