Configuring MQTT for tinyMQTT mosquitto.conf using MDBT42Q running on Windows10 #6248
Replies: 1 comment
-
Posted at 2020-04-25 by Robin Sat 2020.04.25 Well, that took a bit of searching.
Sending and Receiving!! Now off to load up tinyMQTT . . . . Posted at 2020-04-25 by Robin Sat 2020.04.25 I'm at a loss. I'm missing a piece of the puzzle, conceptually. I switched to an Espruino WiFi, as tinyMQTT is setup for that, for a sanity check. From a cmd window, I'm able to publish a topic and message that a subscriber is able to display. This means the MQTT broker, Mosquitto is running as a server. I also believe that socket communication is occurring on the default port :1883 confirmed by netstat and the fact no errors appear. Unable to make further progress, for a sanity check, I created a Xampp server and am able to view .html pages along with exectuting .php scripts from the Windows file system, using the browser as a client. Using Fiddler, I'm able to detect and view packets that go out to the web. Loading tinyMQTT onto the WiFi does in fact blink the WiFi LED once a second for around ten seconds, concluded by the 'disconnect' message. Here is where there seems to be a disconnect. I'm not seeing packet traffic using Fiddler. That app did recently update, and appears very different, so still getting used to that, and am 90% sure there isn't an option I'm missing. It is quite possible I'm not remembering all the needed detail for bi-direction WiFi, I'll keep at that. Re-reading Espruino docs for MQTT, tinyMQTT and EspruinoHub, I'm under the impression that the PI is used as a server running Node-Red to use as an intermediary for the Espruino WiFi device we are attempting to build. I shouldn't even need the PI, nor do I want to learn another OS or that line of device hardware, as Mosquitto is running on the PC. My belief is that should be the equivalent and actually replace the PI at this point. Is that concept true? So it appears I'm missing the part that bridges the WiFi communication through to Windows on through the dedicated socket used by the Mosquitto Pub-Sub server. Anyone able to confirm and assist with the missing conceptual part or provide some troubleshooting ideas, snippets, web links to move forward? Posted at 2020-04-25 by AkosLukacs First guess: windows firewall blocks MQTT packet. Check windows firewall settings. Last time I used Fiddler, it didn't capture incoming traffic. Only outgoing traffic. So your MQTT traffic won't show up. Do you have another computer or did you get phone / tablet that could be used to verify connectivity? For example Fing is pretty useful to scan your wifi, discover devices and find open ports:
Don't have anything, because that was before a couple of reinstalls, but ESP8266 could connect to mosquitto running on Win10. IIRC just followed the official guide because Yes, the PI is just a computer running Linux, nothing special. Just it's easier and cheaper to run 24/7/365 than your normal PC... Posted at 2020-04-25 by Robin Thank you @AkosLukacs - loads to absorb there, will be busy the rest of this evening!! ;-) I see that you have been successful with WiFI <==> MQTT Have you any desire over BLE? @BobFrankston has made some strides here #21 post: > [ble<=>ip](http://forum.espruino.com/conversations/345892/#comment15222299) Solving this would be really cool for Bangle/widgets, as I'm sure Bob see's it that way too. Posted at 2020-04-25 by AkosLukacs Hey, wait, what? Just reading the topic now: "MDBT42Q". That's BLE chip. I see that other topic now. Posted at 2020-04-25 by Robin
I can even hear your wheels turnin' on the other side of the world! What about a Bangle controller for that home automation? Time for me to dig out that MDBT42Q <==> WiFi SPI bus direction switching proof of concept code now that we have a visual means using Bangle to send via BLE. Posted at 2020-04-26 by Robin Sun 2020.04.26 Well @AkosLukacs it appears your #4 post 0th and 1st points are starting to prove out.
While I never saw any errors using the MQTT tutorial snippet, they are certainly there calling the Wifi and http modules directly. Since I can't get at the AP and IP detail to debug, unable to progress further. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-04-25 by Robin
Fri 2020.04.24
First time user configuring the MQTT broker for Windows10.
Have installed mosquitto and am able to start inside a cmd.exe window:
I have attempted using the test server, with no apparent success. Switched to localhost, no luck there either.
Most likely either a configuration issue or likely a 'how to use' issue. Any insight to get over the hump would be appreciated. Thanks in advance.
Familiar with xampp and now off to review and see if possible to pass data through that means.
Beta Was this translation helpful? Give feedback.
All reactions