mqtt-connection | Barebone Connection object for MQTT in node.js | Runtime Evironment library
kandi X-RAY | mqtt-connection Summary
kandi X-RAY | mqtt-connection Summary
Barebone Connection object for MQTT in node.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a new Connection instance .
mqtt-connection Key Features
mqtt-connection Examples and Code Snippets
Community Discussions
Trending Discussions on mqtt-connection
QUESTION
I have a question concerning the Arduino MKRGSM 1400 and MQTT.
I use the code below to connect my MKRGSM to the internet via a SIM-card, then connect it to a HiveMQ-broker I have installed on Docker. Even though the code is compiled without any errors, once I upload it to my board, it crashes. Once it has crashed, I have to reset my board entirely. I've tried this code with the Arduino IDE and Platform.io on VS Code, both give the same result.
Before I put in the MQTT-connection, the board connected successfully to the internet and the DHT11-sensor was able to read humidity and temperature values without problems.
I'm not great with Arduino and this is the first time I'm trying to use MQTT myself.
Does anyone know why the code not only doesn't work, but also makes my board crash? Thanks in advance!
...ANSWER
Answered 2020-Feb-06 at 20:11As hashed out in the comments
You never called the connect()
function so the GSM network was never setup.
You then probably need to use the GSMClient to initialise the PubSubClient so it knows how to access the network.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mqtt-connection
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page