tuanpmt / esp32-mqtt

ESP32 MQTT sample project for
https://github.com/tuanpmt/espmqtt
Apache License 2.0
180 stars 51 forks source link

not able to connect to hive mqtt #15

Open shirish47 opened 7 years ago

shirish47 commented 7 years ago
.[0;32mI (3345) event: ip: 192.168.1.129, mask: 255.255.255.0, gw: 192.168.1.1.[0m
[MQTT INFO] Starting mqtt task
[MQTT INFO] Resolve dns for domain: broker.hivemq.com
[MQTT INFO] Connecting to server 35.156.1.237:1883,23303
[MQTT INFO] Connected!
[MQTT INFO] Connected to server broker.hivemq.com:1883
[MQTT INFO] Sending MQTT CONNECT message, type: 1, id: 0000
[MQTT INFO] Reading MQTT CONNECT response message
I (12649) wifi: pm start, type:0

[MQTT ERROR] Error network response
[MQTT INFO] Closing client socket
[MQTT INFO] Client destroyed

also how do I disable security? I went to mqtt_config.h and just commented #define CONFIG_MQTT_SECURITY_ON is it the right way ?

jdasilvaav commented 7 years ago

Hi,

I have the same problem as you describe...

shirish47 commented 7 years ago

ya today hivemqtt try out has some problem but I was not able to connect to it yesterday also ... screen shot 2017-08-24 at 12 19 50 pm

shirish47 commented 7 years ago

try now mine is getting connected now..

also what is this ? what happens after 30 min...

[MQTT INFO] Sending pingreq
[MQTT INFO] Read len 2
[MQTT INFO] MQTT_MSG_TYPE_PINGRESP
I (1812705) wifi: state: run -> auth (2c0)
I (1812706) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (1812706) wifi: pm stop, total sleep time: 0/1800055859

[MQTT INFO] Read len 0
[MQTT INFO] Read error 128
[MQTT INFO] Closing client socket
[MQTT INFO] Client destroyed
I (1812832) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (1812832) wifi: state: auth -> auth (b0)
I (1812850) wifi: state: auth -> assoc (0)
I (1812855) wifi: state: assoc -> run (10)
I (1812870) wifi: connected with UNICORN, channel 1
.[0;32mI (1813866) event: ip: 192.168.x.x, mask: 255.255.255.0, gw: 192.168.1.1.[0m
[MQTT INFO] Starting mqtt task
[MQTT INFO] Resolve dns for domain: broker.hivemq.com
[MQTT INFO] Connecting to server 35.158.148.112:1883,23303
[MQTT INFO] Connected!
[MQTT INFO] Connected to server broker.hivemq.com:1883
[MQTT INFO] Sending MQTT CONNECT message, type: 1, id: 0000
[MQTT INFO] Reading MQTT CONNECT response message
[MQTT INFO] Connected
[MQTT INFO] Connected to MQTT broker, create sending thread before call connected callback
[MQTT INFO] mqtt_sending_task
[MQTT INFO] Queue subscribe, topic"/test/ESP32", id: 1
[MQTT INFO] Sending...18 bytes
[MQTT INFO] Sending...31 bytes
[MQTT INFO] Queuing publish, length: 31, queue size(0/4096)
[MQTT INFO] mqtt_start_receive_schedule
[MQTT INFO] Read len 5
I (1822855) wifi: pm start, type:0

[MQTT INFO] Sending pingreq
[MQTT INFO] Read len 2
[MQTT INFO] MQTT_MSG_TYPE_PINGRESP