Hi!
I’m developing a SW to connect with mosquitto broker. I started from the source code in apps/platformservices of Legato environment.
I can right build the project, create the session, but I have problem when I have to connect to the broker:
I’m trying to connect without user and password (I’m beginning!) and this is the result:
Obviously I connected my mangOH green to internet thought both WiFi and Sim and I can righly ping google, so it is not a connection trouble. Mosquitto is running on my VM:
Can someone help me to understand the cause of this problem? Here is the code I’m working on… maqqClientServicee.txt (36.7 KB)
Which could be the problem?
No one can help me? Is there a guide to install a broker on a VM? Have I to configure a file mosquitto.conf (if mosquitto is a broker)? I’m desperate, I can’t make mqtt app available after a month spent on this so difficult HW
The first attempt uses a bad port number 7777 so it’s refused. The second attempt connects. This indicates that your broker on Ubuntu is OK to receive connections from the WPxxxx.
This means that if your application on the WPxxxx won’t connect to the broker on Ubuntu it is probably doing something wrong.
Okay…so this is a SW issue (also if I don’t understand what!). Thanks a lot @piinst , at least now I know what to focus on.
Unfortunately this is the result and I really don’t understand the cause:
So I have two options: 1. I install a previous version of Mosquitto (for example 1.6.14)…but I can’t understand how, since sudo apt-get install mosquitto option gives the last version automatically ! 2. I install the last version of Mosquitto (2.0.10) but giving the commands listener 1883
allow_anonymous true…but I can’t understand how and where!
Do you think that my reasoning is good or am I out of road?
It appears that the client is getting an error before mosquitto receives anything. Best thing to do in my view is look at the source for a client such as MQTTClient_publish.c and see how it works.
I tried, but unfortunately this is not the solution either. However, I noticed another thing. I have Mosquitto server installed on windows of another PC and from my Ubuntu I can ping (seeing the connection attempt on the other side):
But if I repeat the same operation from my mangOH nothing happens:
It’s a normal thing? Should my mangOH be configured on a door? Because at this point it’s really not clear to me what I’m wrong