0

I'm trying to connect a Pc without internet with a Ethernet Cable to my Raspberry and want to send informations from the Computer to the Raspberry via MQTT. I searched trough the internet but everything I found didn't fit to my Question.

I guess the connection between the PC and the Pi via Ethernet is set up because I can ping the IP-Address from the other device.

I have to use MQTT because the program on the PC can only send over MQTT. I want to send a JSON String through the mqtt.fx program. There I have to define a broker to which the JSON string should be sent to. I tried to type in the IP from the ethernet Cable from the PI but that didn't work, because the PI dont have the Broker Server I guess. Do you know a way to set up a local Broker to the Pi? If it is to difficult to sent a JSON String it also can be just a HELLO WORLD so I understand the concept of MQTT.

So my Question is: Is it possible to set up a local MQTT-Broker on the Pi/PC so the PC can publish Information and the PI can recieve them via subscribe over ethernet?

  • I’m sure there’s a way to do it, but why do you want to use mqtt if you have a direct network cable connection between the pi and pc? What information do you want to send and for what use? Answering those is more likely to get you a good solution. – T. M. Jan 18 at 10:43
  • I thought this would be the easiest/best way? Are there other easier ways? I want to send JSON Strings or maybe only Stirngs @T.M. – benipro98 Jan 18 at 10:49
  • @T.M. I have to use MQTT because the Programm on the PC can only send over MQTT... But still do you know other ways to send over Ethernet just so i know them :D. And do you know how to do it over MQTT ? – benipro98 Jan 18 at 10:57
  • If all you want is text sent from one computer to another you can use any of literally hundreds of methods. The scp command would be an easy one, but nfs, web server, etc could work. If the software you’re using only uses mqtt then use that I guess but you still haven’t explained in enough detail what you are trying to do. What software are you using. What data are you sending. I’ve only set up mqtt once but it was fairly straightforward. One device publishes a message and one subscribes to it. I get a little confused with the client server and broker parts of mqtt though. – T. M. Jan 18 at 11:26
  • I want to send a JSON String through the mqtt.fx Programm. There i have to define a broker to which the JSON string should be sent to. I tried to type in the IP from the ethernet Cable from the PI but that didn t work, because the PI dont have the Broker Server I guess. Do you know a way to set up a local Broker to the pi. If it is to difficult to sent a JSON String it also cna be just a HELLO WORLD so i understand the concept of MQTT. Thank you for the help @T.M. – benipro98 Jan 18 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.