Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Send data from raspberry and read them from PC
Send data from raspberry and read them from PC [message #1807720] Thu, 06 June 2019 16:00 Go to next message
Alessandro Bozzi is currently offline Alessandro BozziFriend
Messages: 2
Registered: June 2019
Junior Member
Hello,
I have developed two bundles that implements a Publisher and a Subscriber.
The Publisher is installed on a Raspberry Pi2, the Subscriber is on my PC.
The publisher should send messages to my MQTT cloud, and the Subscriber should receive them. They both have the same account-name, the same application ID, the same application topic. They only differ from their client ID.
When I start the two bundles both from my pc the result is what I want (the publisher send some data, and in my console I can read the received data thanks to the subscriber). The problem is that when I install the Publisher on the raspberry the data are sent to the cloud, but the Subscriber is not listening on the correct topic (because of the different client ID). If i choose the same client ID for both devices the cloud keep connecting one and disconnecting the other device.
How can I do?

Thanks for help,

Alessandro
Re: Send data from raspberry and read them from PC [message #1807794 is a reply to message #1807720] Sun, 09 June 2019 14:18 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
Hi,
if you have the same client id, then you have a stealing link and that is the reason why you are getting those disconnections.
In order to achieve your goal you have two options. The first one is that you subscribe to a topic with your client id and expect that the publisher subscribes to that topic. The other is to subscribe to a generic topic (using, for example, wildcards) and wait for a publisher to publish data in a matching topic in the pool subscribed by the subscriber.

Best regards,
Matteo
Re: Send data from raspberry and read them from PC [message #1807881 is a reply to message #1807794] Tue, 11 June 2019 13:16 Go to previous message
Alessandro Bozzi is currently offline Alessandro BozziFriend
Messages: 2
Registered: June 2019
Junior Member
Thank you very much for the reply.
How can I use the wildcards to subscribe to a generic topic? I can't find anything to implement this solution.

Best regards,
Alessandro
Previous Topic:PDE Export of Kura driver: A cycle was detected when generating the classpath
Next Topic:[kura 4.1.0]Problems with CloudSubscriber
Goto Forum:
  


Current Time: Fri Apr 19 17:01:50 GMT 2024

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

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

Back to the top