Hi
I am currently merging mqtt_simple and location example using my custom board based on nrf9160. Currently. I am able to connect to mqtt and also retrieving location using Cellular Service (maybe GNSS timeout because my friend test it at indoor location). I also able to publish ping message to free broker (broker.emqx.io) for testing mqtt. Ping message is condition that my board sending '1' to the broker, just for indicate that the board works properly.
And then, when I try to publish the location, suddenly the board is restarting. Below is the way I publish it.
char buffer_lattitude[CONFIG_MQTT_MESSAGE_BUFFER_SIZE]; sprintf(buffer_lattitude, "%.06f", event_data->location.lattitude); // it is restarting when the board at this step data_publish(&client, MQTT_QOS_1_AT_LEAST_ONCE, buffer_lattitude, sizeof(buffer_lattitude), TOPIC_LOC_CELLULER_LAT);
Anybody know the way to do that? Really appreciate for your help. Thanks.