Skip to Content
0

MQTT TCP API

Apr 16 at 10:57 AM

79

avatar image
Former Member

Dear all,

i want to test

MQTT over TCP.

I've configured Message management Service cockpit, then I try to test connection using Messaging through MQTT over TCP. But in the screen the button "connect" is disabled.

Have you any hint?

Please note that MQTT websocket connection test works correctly.


Thank You.



wsk3k.png (38.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Anton Levin
Apr 16 at 11:21 AM
0

Hello Luigi,

could you please double check if you have enabled "MQTT Connection" in the Configuration. See second screenshot in here [1] > point #2. Save your settings and try again.

Also, it would be helpful if you check and share your browser console logs. Do you see any errors/warnings reported there? What browser are you using?

Regards, Anton

[1] https://github.com/SAP/iot-starterkit/tree/master/neo/apps/built-in/sending/mqtttcp

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank You Anton,

after your hint, I used Chrome insted of Explorer and I can see this message "The test client cannot connect to the MQTT broker endpoint.".

I'll check connection and use Chrome.

regards,

Luigi

0

Hello Anton,

I have changed the browser (now I'm using Explorer v.11) and in MQTT TCP API I see Connect Client Broker: tcp://192.168.24.113 :1883 but the button "Connect" is always disabled.

I've checked the configuration of Message Management Service and the button MQTT Connection Enabled is ON.

I've noted that when I insert miny password MQTT Password it is overwritten with the previous value wich is much more lenght while MQTT User Name is correctly updated with the value that I insert.

Should be this the problem?

Furthermore does the client check if the IP address of MQTT server is reachable?

If not reachable because IP address belongs to al local network the button "Connect" does not activate?

Thank you.

Regards.

Luigi


0

In my understanding, the problem is exactly with the Internet Explorer. Which browser were you using before? Luigi is now using Chrome (see answer above)

Answering your other questions:

- password is being encoded and saved to the SecureStore that is why your get a longer value. You may check its encoded value by downloading your configuration with Configuration API [1]

- no, client is not checking if the endpoint is reachable

Regards, Anton

[1] https://help.sap.com/viewer/7436c3125dd5491f939689f18954b1e9/Cloud/en-US/034cc6a428134cc0aa244fe0d69376d7.html


0

Hello Anton,

now I'm using Internet Explorer v.11 and in MQTT TCP API and I see:

Connect Client Broker: tcp://192.168.24.113 :1883

but the button "Connect" is always disabled.

Referring to MQTT Password I've made export of MMS Configuration into a file and I see the encoded value:

"mms.mqtt.pwd": "${1849228995_mms_mqtt_pwd}",

so OK.

If the client (i.e. MQTT Client on SCP) doesn't check the endpoint's reachability why the botton "Connect" is disabled?

I'm using a NEO TRIAL version of HCP (i.e. Europ(Rot) - Trial): with this version is possible to use the Data Service "Messaging through MQTT over TCP"?

Furthermore in Services - Internet of Things I've not configured Destinations: is correct?

Thank you.

Bye Luigi

0

Dear Luigi/Stefano,

please help us to understand your issue by answering above and below questions. Here again: What browser did you use before switching to IE 11? Did it work for you in Chrome as you have mentioned on 16th of April [1]? It would be helpful if you check and share your browser console logs. Do you see any errors/warnings reported there?

Answering your follow-up questions:

- yes, it is possible to use "MQTT over TCP" also on Trial landscape

- you do not have to configure any additional destinations. All destinations which IoT Service require to work, you get automatically when you enable the service and deploy IoT MMS to your account

Regards, Anton

[1] https://answers.sap.com/questions/484838/mqtt-tcp-api.html?childToView=483446#

0
Former Member

Hi Anton,

when I made the test the first time I used Chrome and with this browser I see the message:

"The test client cannot connect to the MQTT broker endpoint."

and the button Send was not activated.

Then I changed browser and I used IE v.11 and with it I see the message:

tcp://192.168.24.113:1883

where 192.168.24.113 is the IP address of MQTT broker but the button Send was always not activated.

The problem is the same i.e. it is not possible sending messages to MQTT broker because it is disconnected.

How does SCP check if MQTT broker is connected or reachable?

Thank you for responses to my answers.

Bye Luigi

0