2022-05-06 12:41 AM
Hi, hope someone could kindly help me out with this.
I am using the B-L462E-Cell-1 EVK with the 1SC modem from Murata.
My goal is to test MQTT on the device using X-Cube-Cellular v5.2.1 which has the MQTT client application. I have followed the readme to use IAR workbench IDE to include the relevant MQTT folders. I have also set the variables to use MQTT client.
I see these commands printed here. But the publish command doesn't work when I try to publish to the Hive MQ public MQTT broker. It seems to get stuck.
I don't think this is a network related issue, since I used the cst command to check that my SIM has been configured already and I can received a signal.
My MQTT client configuration is seen here:
Any ideas? Would appreciate some help from ST or the community. :)
Solved! Go to Solution.
2022-06-23 10:50 PM
Update
Use the X-Cube-Cellular version (V7.0.0), which uses AzureRTOS and includes the NetXDuo network stack.
You can look into the ..\STM32CubeExpansion_CELLULAR_V7.0.0\Middlewares\ST\netxduo\addons folder to add the MQTT client.
There is also a MQTT sample code found in ..\STM32CubeExpansion_CELLULAR_V7.0.0\Middlewares\ST\netxduo\samples that explores how to connect and send data to a mosquitto broker.
If you do come across some undefined reference errors, then remember to include the paths to the header files by going to Properties → C/C++ General → Paths and symbols.
Credit to @JVand.12 for the help.
2022-05-23 02:53 AM
Where did you download 5.2.1?
I only found 5.2.0, in which by default MQTT is not enabled.
I have compiling error after enabling MQTT.
2022-05-23 03:36 AM
It's 5.2.0 with the software patch found in the STMicro X Cube Cellular page.
Yes I also faced some compiling issues after enabling the MQTT client using STM32CubeIDE.
But there's a ReadMe inside one of the MQTT folders which says that IAR compiler needs to be used. Unfortunately that's only going to work with a 30 day trial or paying for the IAR IDE. So I'm stuck trying to implement it.
2022-05-23 11:52 PM
I see your network operator is Singtel. What kind of SIM card do you use? How much is the cost?
2022-05-24 12:15 AM
I wonder why IAR IDE can work, why CubeIDE cannot. Does not make sense.
They should use the same compiler.
2022-06-23 10:50 PM
Update
Use the X-Cube-Cellular version (V7.0.0), which uses AzureRTOS and includes the NetXDuo network stack.
You can look into the ..\STM32CubeExpansion_CELLULAR_V7.0.0\Middlewares\ST\netxduo\addons folder to add the MQTT client.
There is also a MQTT sample code found in ..\STM32CubeExpansion_CELLULAR_V7.0.0\Middlewares\ST\netxduo\samples that explores how to connect and send data to a mosquitto broker.
If you do come across some undefined reference errors, then remember to include the paths to the header files by going to Properties → C/C++ General → Paths and symbols.
Credit to @JVand.12 for the help.