elementzonline / SIM800_MQTT

Visit our blog/website for more information
http://www.elementzonline.com
GNU General Public License v3.0
170 stars 96 forks source link

Can't publish and subscribe #31

Closed Franciscopcosta closed 4 years ago

Franciscopcosta commented 5 years ago

I get the message:

AT+CREG?

+CREG: 0,5

OK AT+CIPMUX=0

OK AT+CIPMODE=1

OK AT+CGATT?

+CGATT: 1

OK AT+CIPSTATUS

OK

STATE: IP INITIAL AT+CSTT="wm"

OK AT+CIPSTATUS

OK

STATE: IP START AT+CIICR

OK AT+CIPSTATUS

OK

STATE: IP GPRSACT AT+CIFSR

xxx.xxx.x.x (ip address) AT+CIPSTATUS

OK

STATE: IP STATUS AT+CIPSTART="TCP","_my_brokerip","1883"

OK

CONNECT MQTT.TCP_Flag = True

But i cant publish and subscribe. if (MQTT.available()) { Serial.println("MQTT available..."); } also this is not working, i never get the message "MQTT available..." on my serial. Please can anyone help me? (SIM800L with ESP32 via HardwareSerial UART2)

fdeizaguirre commented 5 years ago

Dear @Franciscopcosta I'm having the same problem, did you made any improvement?

marcosdepo commented 4 years ago

Serial pins Rx and Tx work with SIM800 module. This library uses software serial "mySerial" Change Serial.println("MQTT available..."); with mySerial.println("MQTT available..."); Conect an external usb/serial driver to software serial pins, it works for me.