I am new to the forum and to Mbed-OS, but not new to IoT, IT and Programming in general.
So I have been playing with L152RE for while now and trying different things with it. Where I have been stuck lately, is working with MQTT.
I am trying to get my L152RE to send and receive information to/from MQTT, I have been successful in getting it to work as a subscriber, but not much as a publisher. Here is what I can tell about my setup.
As subscriber, my L152RE works fine, no complaints yet.
What makes problem:
5. I can’t publish to MQTT-Topic, Status Code from publish request is almost always -3004
funny thing though, if I publish something, before I have received a message from broker, then it works variably. But I have received a message from broker. Then I can’t publish anymore.
I am using mosquito-mqtt-broker, set to log everything and I am watching the log with tail-f, my L152RE, doesn’ even tries to publish. (and just if it is not obvious already, there is no authentication/authorization issue.
I feel like I am missing some small thing here, but believe me I have given a lot time and attention and still to no avail. Maybe someone here can guide to me right direction.
as per your suggestion, I tried to get it with AWS-example, couldn’t get it to work, it is full of inconsistencies.
First I though: maybe it is something with my Mbed-Studio environment, so I tried it with Keil Studio online, same.
I went online to Keil Studio Online and started a new project with the pre-given examples.
I didn’t changed one bit in the code and tried to compile it, it fails: Screenshot below
TLSSocket Class/library is literally in the exact same directory as TCPSocket, but neither Mbed-Studio, installed locally nor the Keil-Studio Online can understand it.
Current latest Mbed-OS Version is 6.15.1 and when I try to start a new project with Mbed OS example for AWS cloud, it uses Version 6.13.0
locally, I can use strlen() method to find length of a char array, but online it is unknown
That is know issue and it comes from clangd, it has nothing together with an error in code and it will be compiled without issues around it.
With Mbed Studio and Keil Studio it is little bit complicated. Shortly say, both are still in development, from my point of view.
It is not official information, but my understanding. Development of Mbed Studio was stopped and it is waiting for a final look of Keil Studio online because it should be also Keil Studio desktop.
Keil Studio online development is still ongoing and there is good progress during the last year. it’s not that fast but it’s happening.
What I saw here, professionals usually use Mbed CLI.