I'm trying to use MQTT on a ESP8266 (Flash map 1MB:512/512, manuf 0xc8 chip 0x4014) and always returns same error:
1526108440: New connection from 192.168.10.44 on port 1883.
1526108440: New client connected from 192.168.10.44 as 4e8422275dd0 (c1, k60).
1526108440: Socket error on client 4e8422275dd0, disconnecting.
It's only a simple connection test code like this:
Move "mqtt.connect()" line inside "wifi.connect" callback
Try using connect directly:
var mqtt = require("MQTT").connect({
host: "192.168.10.43",
});
Run mosquitto server in verbose mode "mosquitto -v":
1526109123: New connection from 192.168.10.44 on port 1883.
1526109123: New client connected from 192.168.10.44 as 3fefc4344328 (c1, k60).
1526109123: Sending CONNACK to 3fefc4344328 (0, 0)
1526109123: Socket error on client 3fefc4344328, disconnecting.
Mosquitto server is up and runnig with anonymous access acepted. I'm using this server with other esp8266 boards running native C code and goes good, so I think that is no problem with the server.
If someone can help me with this problem, I would be enormously grateful.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi,
I'm trying to use MQTT on a ESP8266 (Flash map 1MB:512/512, manuf 0xc8 chip 0x4014) and always returns same error:
It's only a simple connection test code like this:
The output is always the same:
I try a lot of configurations and I don't know how to continue:
Try using connect directly:
Run mosquitto server in verbose mode "mosquitto -v":
Mosquitto server is up and runnig with anonymous access acepted. I'm using this server with other esp8266 boards running native C code and goes good, so I think that is no problem with the server.
If someone can help me with this problem, I would be enormously grateful.
Thank you