Hello all,
I'm currently working on a project using Azure's RTOS and would like to use a JSON library for formatting my device payload. I have found this reader and writer here:
netxduo/addons/azure_iot at master · azure-rtos/netxduo (github.com)
I have tried adding the header and the rest of the relevant dependencies but can't get the project to compile or initialize the JSON writer/reader. If anyone has any experience using the library or another JSON library which is integrable to e2 the advice would be greatly appreciated. I'm wondering whether it can be added via the FSP or it's part of one of the NetX stacks such as the IoT middleware?
KR,
Chris.
Project attached for reference: FSP_3_7_0_EK_RA6M3_AzureRTOS_JSONwriter.zip
Hi,
May be helpful. For JSON parsing I have used the open source jsmn library in the past.
https://github.com/zserge/jsmn
Ian.
Hi Chris,
You should raise issue with Microsoft on the missing _internal in their source file.
json_writer_ptr -> nx_packet_init_length + (UINT)(json_writer_ptr -> json_writer._internal.total_bytes_written…
Hello,
There are some syntax errors in your project. Please check theese:
1)File application_thread_entry.c -->line 341 NX_AZURE_IOT_JSON_WRITER could not found. You should include "nx_azure_iot_json_writer…
Thanks for posting your question!
So , you are trying to create an Azure RTOS project (which sends payloads with MQTT) and you face problem in creating your payload with JSON format? Could you please send me a screenshot of e2studio build console? What is the exact build error you get?
Kind Regards,
IK_Renesas
json_writer_ptr -> nx_packet_init_length + (UINT)(json_writer_ptr -> json_writer._internal.total_bytes_written);
You need Azure headers to get that symbol. Not sure how it will work with ThreadX headers. Check the doc for the package to see what it needs.
1)File application_thread_entry.c -->line 341 NX_AZURE_IOT_JSON_WRITER could not found. You should include "nx_azure_iot_json_writer.h"
2) File nx_azure_iot_json_writer.c --> line 98 you have a nested struct you should access element total_bytes_written like this :
(UINT)json_writer_ptr -> json_writer._internal.total_bytes_written;
3) File nx_azure_iot_json_writer.c --> line 194 same error with the previous total_bytes_written is an element of a nested struct.
Please fix them and let us know!
Also check this documentation:
www.renesas.com/.../ra-fsp-mqtttls-azure-cloud-connectivity-solution-application-note
That worked, thank you.
You're welcome! Thanks for sharing your question with Renesas Engineering Community!
If this response, or one provided by another user, answers your question, please verify the answer!