On Wed, 15 Apr 2020, Roger Light via curl-library wrote:

./curl 'mqtt://test.mosquitto.org/de.wsv/pegel/cm/ems/emshoern' --output -

That topic currently has a retained message with content "582". The
response I get from curl is:

curl: (8) Weird server reply
de.wsv/pegel/cm/ems/emshoern582

I cannot reproduce that. Doing that command line here seems to get a partial response and then it sits waiting for the rest:

$ curl 'mqtt://test.mosquitto.org/de.wsv/pegel/cm/ems/emshoern' -o dump --trace -
...
=> Send header, 35 bytes (0x23)
0000: 82 21 00 01 00 1c 64 65 2e 77 73 76 2f 70 65 67 .!....de.wsv/peg
0010: 65 6c 2f 63 6d 2f 65 6d 73 2f 65 6d 73 68 6f 65 el/cm/ems/emshoe
0020: 72 6e 00                                        rn.
<= Recv header, 5 bytes (0x5)
0000: 90 03 00 01 00                                  .....
<= Recv header, 1 bytes (0x1)
0000: 31                                              1
<= Recv header, 1 bytes (0x1)
0000: 21                                              !
== Info: Remaining length: 33 bytes
<= Recv data, 33 bytes (0x21)
0000: 00 1c 64 65 2e 77 73 76 2f 70 65 67 65 6c 2f 63 ..de.wsv/pegel/c
0010: 6d 2f 65 6d 73 2f 65 6d 73 68 6f 65 72 6e 35 38 m/ems/emshoern58
0020: 32                                              2
100    33  100    33    0     0      2      0  0:00:16  0:00:15  0:00:01
^C

From what I glanced at on the twitch stream I think the focus has been on publishing

No it hasn't. I even did subscribe first. And we have test cases for both subscribe and publish in the test suite.

But I'm a MQTT rookie, I'm sure there are mistakes and glitches in there to fix!

./curl mqtt://test.mosquitto.org/de.wsv/#
./curl 'mqtt://test.mosquitto.org/de.wsv/#'

Which I would expect would subscribe using the multilevel wildcard '#'. I tried both forms to try and be sure that it wasn't the shell swallowing the #.

'#' is special in URLs, as it marks a fragment. You need to URL encoded such characters as %23.

--

 / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                  | Private help, bug fixes, support, ports, new features
                  | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
  • MQTT Daniel Stenberg via curl-library
    • Re: MQTT Daniel Stenberg via curl-library
    • Re: MQTT Roger Light via curl-library
      • Re: MQTT Daniel Stenberg via curl-library
        • Re: MQTT Daniel Stenberg via curl-library
    • Re: MQTT Christoph Krey via curl-library
      • Re: MQTT Daniel Stenberg via curl-library
        • Re: MQTT Christoph Krey via curl-library

Reply via email to