Comments (3)
I have the same issue here. It is caused by the while loop at line 157 in espduino.cpp
while(pad_len % 4 != 0)
pad_len++;
This loop makes the length of the payload data always a multiple of 4. Hence your payload is: [O,N,null,null] This causes weird behaviour at the receiving side of the mqtt data.
I tried to run the code without this loop but then I receive the following error:
ARDUINO: fail to setup mqtt
@tuanpmt is there a fix for this?
from espduino.
Same issue here... Trying to communicate with OpenHAB via a Mosquitto MQTT broker using an ESP8266 connected to an Arduino. All messages are received on the MQTT bus and in OpenHAB, but only messages with 4, 8, 12, ... length are being processed within OpenHAB (they trigger rules, are being displayed in the UI). All messages with other message lengths are listed in the OpenHAB logs (events.log) but ignored in rules and the UI --> strange behaviour!
from espduino.
@Bob-Ran because of exchange protocol between MCU and ESP8266, we need data align 4 bytes. I've add length params for data when publish, it will help ESP8266 determine exact length of data to send. Now you can try the fixes
from espduino.
Related Issues (20)
- Timeout with local http servers (Python, Ruby, Node) HOT 3
- MQTT Topic depth? HOT 3
- When I upload software to esp8266 I get an error that is below. Please help me !!!. HOT 2
- Error "'ESP' does not name a type ESP *esp;" HOT 3
- HTTPS Rest API HOT 6
- ESPDuino hang on ESP:process HOT 12
- Using both REST and MQTT results in error HOT 1
- Is there any timeline for the WiFi AP portion? HOT 2
- mqtt.publish from the call back void mqttData(void* response) gives unpredictable result
- malloc assert! HOT 2
- SoftwareSerial as esp serial? HOT 1
- Unable to communicate HOT 6
- Help sending multiple publish (MQTT,Bridge) HOT 2
- AT Command Not Working
- Unable to Set Qos 1 or 2 while Subscribing. HOT 1
- Connect/disconnect loop without pulling down any change info;
- Getting Garbage after esp.ready() HOT 2
- does not work
- How to read MAC of ESP8266?
- How to work on Arduino Mega.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espduino.