Skip to main content



      Home
Home » Eclipse Projects » Paho » Testing MQTT for dot net sample from two windows computer
Testing MQTT for dot net sample from two windows computer [message #1840517] Sat, 17 April 2021 05:16 Go to next message
Eclipse UserFriend
I was testing a windows sample for MQTT found at hemelix automation/structured-text-mqtt/

The sample works fine on the same machine but if I try to run the same application from a different computer it does not work. The sample is using mosquitto as a broker.
Are there any settings that I should use so the client running on a different computer can receive the data?
Re: Testing MQTT for dot net sample from two windows computer [message #1840536 is a reply to message #1840517] Sun, 18 April 2021 04:50 Go to previous messageGo to next message
Eclipse UserFriend
It might be this. Two applications connecting to the same broker must have different MQTT client ids. If they are the same, one will be kicked off when the other connects.
Re: Testing MQTT for dot net sample from two windows computer [message #1840537 is a reply to message #1840536] Sun, 18 April 2021 05:17 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
Thank you for the response, it looks client id is different for each client
as it is generated by the GUID.
// use a unique id as client id, each time we start the application
clientId = Guid.NewGuid().ToString();
client.Connect(clientId);

Any further thoughts or options?
Since the last post was my first post, I could not show the source link, now I hope I can show it and that is https://www.hemelix.com/automation/structured-text-mqtt/
Re: Testing MQTT for dot net sample from two windows computer [message #1840538 is a reply to message #1840537] Sun, 18 April 2021 05:17 Go to previous message
Eclipse UserFriend
It works, there was some minor problem in the subscription part of the application.

[Updated on: Mon, 19 April 2021 08:21] by Moderator

Previous Topic:Java paho tls_set equivalent like in python
Next Topic:Problem connecting mqtt for smart watch
Goto Forum:
  


Current Time: Sat Jun 14 16:14:14 EDT 2025

Powered by FUDForum. Page generated in 0.03685 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top