merbanan / rtl_433

Program to decode radio transmissions from devices on the ISM bands (and other frequencies)
GNU General Public License v2.0
5.94k stars 1.3k forks source link

MQTT Connect error: Unknown Error #2991

Open Bogdan50 opened 2 weeks ago

Bogdan50 commented 2 weeks ago

Trying to test the mqtt messaging with the Mosquito test server. I am issuing this command:

rtl_433 -F mqtt:test.mosquitto.org -F log

I am receiving this:

rtl_433 version 23.11 branch at 202311281352 inputs file rtl_tcp RTL-SDR SoapySDR MQTT: Publishing MQTT data to test.mosquitto.org port 1883 MQTT: Publishing device info to MQTT topic "rtl_433/DESKTOP-M9DIDRD/devices[/type][/model][/subtype][/channel][/id]". MQTT: Publishing events info to MQTT topic "rtl_433/DESKTOP-M9DIDRD/events". MQTT: Publishing states info to MQTT topic "rtl_433/DESKTOP-M9DIDRD/states". Found Elonics E4000 tuner SDR: Using device 0: Realtek, RTL2838UHIDIR, SN: , "Generic RTL2832U OEM" Exact sample rate is: 250000.000414 Hz MQTT: MQTT connect error: Unknown error

I tested the messaging with mosquitto_pub and sub and I can send and receive messages no problems. Am I doing something wrong?

Bogdan50 commented 2 weeks ago

Using the IP address directly works, I am finding out.

rtl_433 -F mqtt:91.121.93.94 -F log

I can now receive messages from the server. So use only IP addresses?

gdt commented 2 weeks ago

As usual:

Bogdan50 commented 2 weeks ago

rtl_433 version 23.11 branch at 202311281352 inputs file rtl_tcp RTL-SDR SoapySDR Windows 10 Pro ver 22H2, 64-bit operating system, x64-based processor, AMD FX(tm)-9590 Eight-Core Processor 4.72 GHz

Not sure what do you mean by name resolution plan. I'm using the free server provided by Mosquitto here:

https://[test.mosquitto.org](https://test.mosquitto.org/)/

The name resolution I've tested with mosquitto_pub and mosquitto_sub using the address "test.mosquitto.org" without quotes.

gdt commented 2 weeks ago

23.11 is quite old. I have no idea if there are relevant fixes since then. I personally do not engage in debugging old code. Yes, I know that it might be the latest formal release.....

By name resolution, I mean how the system converts names to IP addresses. There is regular DNS, with a configured resolver, /etc/hosts on Unix, and multicast dns. Various systems have different configs. It seems likely that either something is odd or there is something wrong in the mqtt code in rtl_433 that is not resolving the name correctly. It will likely require using tools like dig and other things that resolve names, and a debugger on rtl_433 to figure it out.

Bogdan50 commented 2 weeks ago

Are there any tests you want me to do on my PC?

Bogdan50 commented 2 weeks ago

I can ping test.mosquitto.org just fine:

╰─ff ping test.mosquitto.org

Pinging test.mosquitto.org [91.121.93.94] with 32 bytes of data: Reply from 91.121.93.94: bytes=32 time=114ms TTL=50 Reply from 91.121.93.94: bytes=32 time=129ms TTL=50 Reply from 91.121.93.94: bytes=32 time=113ms TTL=50 Reply from 91.121.93.94: bytes=32 time=117ms TTL=50

Ping statistics for 91.121.93.94: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 113ms, Maximum = 129ms, Average = 118ms