Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • Could you Serial.write(payload, length); in the callback and show us what it prints? Commented Mar 6, 2023 at 21:43
  • Did it - payload has length zero, so nothing is coming from the server... Commented Mar 7, 2023 at 12:37
  • Do you have another way of testing the server? Maybe sniff the connection? Commented Mar 7, 2023 at 12:52
  • No way to sniff.... need to try different approach Commented Mar 7, 2023 at 12:54
  • Found the problem.... Needs to have a payload property when sending message: let msg = {topic: topic, payload: JSON.stringify({type: "test", param: "p1"})} did the trick. Commented Mar 7, 2023 at 14:59