vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.94k stars 719 forks source link

BG96 MQTT Problem #475

Closed nedimkivanc closed 3 years ago

nedimkivanc commented 3 years ago

[x ] Bug or issue with library functionality (ie, sending data over TCP/IP) [ ] Question or request for help

Modem: Quectel BG96

Hello there;

I am using bg96 and trying to establish mqtt connection. There is no problem with my sim card and accessing the internet, but when I tried to connect, I saw that it suddenly closed the connection after it started, but I could not find the reason. Thanks in advance for your help

`AT+QIOPEN=1,0,"TCP","kangaroo.rmq.cloudamqp.com",1883,0,0

OK

+QIOPEN: 0,0 AT+QISEND=0,83

QMQTTÂ*****(I closed this place because it contains mqtt information) SEND OKAT+QIRD=0,0

+QIRD: 0,0,0

OK AT+QISTATE=1,0

+QISTATE: 0,"TCP","104.155.82.190",1883,22742,3,1,0,0,"uart1"

OK AT+QIRD=0,0

+QIRD: 0,0,0

OK AT+QISTATE=1,0

+QISTATE: 0,"TCP","104.155.82.190",1883,22742,3,1,0,0,"uart1"

OK

+QIURC: "recv",0 [37218] ### URC RECV: 0 AT+QIRD=0,0

+QIRD: 4,0,4 [37238] ### DATA AVAILABLE: 4 on 0

OK AT+QIRD=0,4

+QIRD: 4 

OK AT+QIRD=0,0

+QIRD: 4,4,0

OK AT+QISTATE=1,0

+QISTATE: 0,"TCP","104.155.82.190",1883,22742,3,1,0,0,"uart1"

OK

AT+QICLOSE=0

OK

MQTT connected

AT+QIRD=0,0

ERROR

AT+QISTATE=1,0

OK [40783] ### Unhandled: OK try connect mqtt.

AT+QIRD=0,0

ERROR AT+QISTATE=1,0

OK [41789] ### Unhandled: OK AT+QIRD=0,0

ERROR AT+QISTATE=1,0

OK [42795] ### Unhandled: OK AT+QICLOSE=0

OK AT+QIOPEN=1,0,"TCP","kangaroo.rmq.cloudamqp.com",1883,0,0

OK`