Hi, I'm currently trying to send real time analog sensor data to hivemq broker using nrf9160 DK, is it possible to provide source code for this kind of project? I've attached my current code below as well. Thanks
Hi, I'm currently trying to send real time analog sensor data to hivemq broker using nrf9160 DK, is it possible to provide source code for this kind of project? I've attached my current code below as well. Thanks
Hi,
is it possible to provide source code for this kind of project?
What do you mean by this? Could you explain some more?
We are currently connecting a sensor to nrf9160_dk and we have successfully gotten the data and print them on serial monitor. We have also succesully connected lte link to print simple string on mqtt broker(hivemq) by using the mqtt_simple sample source code. So we are trying to send the data from the sensors to the mqtt broker but we are unable to do that. Do you have any example that sends the sensor data to mqtt broker?
Hi, I have added the code above in my function and I am still having the same issue.
Also, the data I am currently getting is in integer form, but the data_publich function require char form, may I know how to convert integer to char?
yeo said:I have added the code above in my function and I am still having the same issue.
And did you get any errors returned?
yeo said:but the data_publich function require char form
No, it's just a uint8_t buffer
it does not publish anything after u added the code.
May I ask why this data cannot be publish (instead of string I am publishing integer)
data_publish(&client, MQTT_QOS_1_AT_LEAST_ONCE, 123, 3);
May I ask why this data cannot be publish (instead of string I am publishing integer)
data_publish(&client, MQTT_QOS_1_AT_LEAST_ONCE, 123, 3);