Hello,
I am using the EK-RA6M3 evaluation kit with the overall goal of connecting to Thingsboard (IoT platform) using Renesas RA6M3 Micro, and Azure RTOS using NetX Ethernt Connection. I have used this tutorial which connects to Azures IoT Hub however I'm having issues getting the message to publish:
RA FSP MQTT/TLS Azure Cloud Connectivity Solution Application Note (renesas.com)
I can build the project with no errors however the RTT viewer gives the following response:
I believe I've completed the configuration correctly both in E2 studio and on the Azure IoT side however I'm unsure to why the message is failing to publish. This was only meant to be an intermediate step until I send the data to the desired endpoint (Thingsboard) so any help or suggestions would be hugely appreciated.
Thanks,
Chris.
The attached project for the EK-RA6M3 connects, and publishes :-
I disables TLS 1.3 :-
and modified the files src\sample_config.h and src\sample_azure_iot_embedded_sdk.c to match those in the code from…
I suspect using the Azure IoT Middleware to connect to Thingsboard is not the way to go, as the Azure IoT middleware is designed to make it easier connection to Azure IoT Hub. I suspect you will need to…
I downloaded the project you posted this morning, and the device local certificate was not a DER encoded certificate it was a PEM ecoded certificate so there was an error when calling nx_secure_x509_certificate_initialize…
MQTT.zip
and modified the files src\sample_config.h and src\sample_azure_iot_embedded_sdk.c to match those in the code from the apps note for the EK-RA6M5.
FSP_3_7_0_EK_RA6M3_Azure_RTOS_MQTT.zip
Great thanks Jeremy that worked perfectly, in the solution document provided it states to enable said parameter hence the confusion, apologies for it being a stupid mistake.
In terms of now connecting to Thingsboard, is this project set-up strictly for connecting to Azures IoT or could I edit the 'sample_config.h' file to amend the end point, username and other parameters to connect the dev board to a new MQTT broker?
I would suspect the project i setup to connect to Azure IoT, you would have to rework the project to connect to a different MQTT broker.
If I add crypto_method_hkdf :-
I can enable TLS 1.3 :-
Understood, thanks again Jeremy.
Hi Jeremy, thanks for your previous assistance. When adapting this project to connect to a third party broker I've ran into some issues. I've found some other examples in the forum and documentation using FreeRTOS to connect to various IoT platforms however the variables to connect to the broker like endpoint, username and password were found inside the 'AWS common' stack on the configuration page. However for this example I cant seem to find where the variables such as 'device id' are set other than inside the 'sample_config' file. Where would be the best place to start to try alter the project to be able to connect to Thingsboard opposed to Azure IoTHub using the AzureRTOS. I'm new to e2 studio so apologies if this is trivial.
For example:
This file sets the broker endpoint:
Then inside the AWS common stack the variables are called.
But when using the Netx duo common it doesn't seem to be set up the same way and I don't think there are any examples connecting to 3rd party brokers using the AzureRTOS:
Hopefully this makes sense.
MQTTThingsboard.zip
This is the project I've started, the 'Thingsboard_config' source file is where I've set the variables required to connect to the thingsboard broker, any suggestions of next steps would be hugely appreciated.
I suspect using the Azure IoT Middleware to connect to Thingsboard is not the way to go, as the Azure IoT middleware is designed to make it easier connection to Azure IoT Hub. I suspect you will need to use the MQTT layer directly. The attached project uses the MQTT, DNS, DHCP and TLS provided by NetX to connect to an MQTT broker (I have tested it connecting to io.adafruit.com, so you might need to change the certificate if you are using TLS to connect to Thingsboard).
The client ID is set in the call to nxd_mqtt_client_create().
the MQTT broker is set in nxd_mqtt_client_secure_connect(), I am doing a DNS lookup of the name to resolve the IP address of the broker.
The MQTT user name and password are set in nxd_mqtt_client_login_set().
FSP_3_7_1_EK_RA6M3_Azure_RTOS_MQTT_TLS.zip
Okay thanks will take a look now, really appreciate the advice.