The module is BC28 and the firmware version is BC28JAR01A10. The actual workflow is to execute AT + QMTOPEN, then AT + QMTCONN, send data AT + QMTPUB, and finally execute AT + QMTDISC or AT + QMTCLOSE. In the polling process every 5 minutes, there is a certain probability that AT + QMTOPEN succeeds. Executing AT + QMTCONN returns + QMTCONN: 0,2.
Hi Songhuilee
Executing AT + QMTCONN returns + QMTCONN: 0,2.
The module is connecting to the MQTT server. After waiting for a while, AT + QMTCONN? Will then query the connection status.
Please confirm the network is good?
Hi Songhuilee
Can you get me the UEmonitor log through the DBG serial port?
use the tool of QNavigator_NB-IoT, or the serial port of my device ?
Hi Songhuilee
QNavigator is an upgrade tool. You need to connect the modules DBG_RX, DBG_TX, GND, and use USB to TTL to get the bottom log of the module.
UEmonitor
Dear,Abner
/* Start AT SYNC: Send AT every 1s, if receive OK, SYNC success, if no OK return after sending AT 10 times, SYNC fail */
[2020-03-05 14:22:52:205_S:] AT
[2020-03-05 14:22:52:299_R:]
[2020-03-05 14:22:52:301_R:] OK
/* Use AT+CMEE=1 to enable result code and use numeric values */
[2020-03-05 14:22:52:305_S:] AT+CMEE=1
[2020-03-05 14:22:52:370_R:]
[2020-03-05 14:22:52:372_R:] OK
/* Use AT+CGMI to get Manufacturer ID of module information */
[2020-03-05 14:22:52:377_S:] AT+CGMI
[2020-03-05 14:22:52:440_R:]
[2020-03-05 14:22:52:441_R:] Quectel
[2020-03-05 14:22:52:450_R:]
[2020-03-05 14:22:52:453_R:] OK
/* Use AT+CGMM to get Device module of module information */
[2020-03-05 14:22:52:458_S:] AT+CGMM
[2020-03-05 14:22:52:520_R:]
[2020-03-05 14:22:52:522_R:] BC28JA-02-STD
[2020-03-05 14:22:52:538_R:]
[2020-03-05 14:22:52:540_R:] OK
/* Use AT+CGMR to get Firmware version of module information */
[2020-03-05 14:22:52:546_S:] AT+CGMR
[2020-03-05 14:22:52:609_R:]
[2020-03-05 14:22:52:616_R:] SSB,V150R100C10B200SP1
[2020-03-05 14:22:52:636_R:]
[2020-03-05 14:22:52:638_R:] SECURITY_A,V150R100C20B300SP5
[2020-03-05 14:22:52:671_R:]
[2020-03-05 14:22:52:673_R:] PROTOCOL_A,V150R100C20B300SP5
[2020-03-05 14:22:52:706_R:]
[2020-03-05 14:22:52:708_R:] APPLICATION_A,V150R100C20B300SP5
[2020-03-05 14:22:52:746_R:] SECURITY_B,V150R100C20B300SP5
[2020-03-05 14:22:52:778_R:]
[2020-03-05 14:22:52:781_R:] RADIO,Hi2115_RF1
[2020-03-05 14:22:52:801_R:] OK
/* Query module support Bands */
[2020-03-05 14:22:52:807_S:] AT+NBAND?
[2020-03-05 14:22:52:873_R:]
[2020-03-05 14:22:52:878_R:] +NBAND:8
[2020-03-05 14:22:52:888_R:]
[2020-03-05 14:22:52:890_R:] OK
/* Query the user configuration */
[2020-03-05 14:22:52:895_S:] AT+NCONFIG?
[2020-03-05 14:22:52:963_R:]
[2020-03-05 14:22:52:965_R:] +NCONFIG:AUTOCONNECT,FALSE
[2020-03-05 14:22:52:995_R:] +NCONFIG:CR_0354_0338_SCRAMBLING,TRUE
[2020-03-05 14:22:53:036_R:] +NCONFIG:CR_0859_SI_AVOID,TRUE
[2020-03-05 14:22:53:069_R:] +NCONFIG:COMBINE_ATTACH,FALSE
[2020-03-05 14:22:53:102_R:] +NCONFIG:CELL_RESELECTION,TRUE
[2020-03-05 14:22:53:135_R:] +NCONFIG:ENABLE_BIP,FALSE
[2020-03-05 14:22:53:163_R:] +NCONFIG:MULTITONE,TRUE
[2020-03-05 14:22:53:189_R:] +NCONFIG:NAS_SIM_POWER_SAVING_ENABLE,TRUE
[2020-03-05 14:22:53:234_R:] +NCONFIG:BARRING_RELEASE_DELAY,64
[2020-03-05 14:22:53:270_R:] +NCONFIG:RELEASE_VERSION,13
[2020-03-05 14:22:53:303_R:] +NCONFIG:RPM,FALSE
[2020-03-05 14:22:53:321_R:] +NCONFIG:SYNC_TIME_PERIOD,0
[2020-03-05 14:22:53:352_R:] +NCONFIG:IPV6_GET_PREFIX_TIME,15
[2020-03-05 14:22:53:388_R:] +NCONFIG:NB_CATEGORY,1
[2020-03-05 14:22:53:412_R:] +NCONFIG:RAI,FALSE
[2020-03-05 14:22:53:433_R:] +NCONFIG:HEAD_COMvol,FALSE
[2020-03-05 14:22:53:464_R:] +NCONFIG:RLF_UPDATE,FALSE
[2020-03-05 14:22:53:496_R:] +NCONFIG:CONNECTION_REESTABLISHMENT,FALSE
[2020-03-05 14:22:53:538_R:] +NCONFIG:PCO_IE_TYPE,EPCO
[2020-03-05 14:22:53:567_R:]
[2020-03-05 14:22:53:568_R:] OK
[2020-03-05 14:22:53:575_S:] AT+CFUN?
[2020-03-05 14:22:53:638_R:]
[2020-03-05 14:22:53:641_R:] +CFUN:1
[2020-03-05 14:22:53:654_R:]
[2020-03-05 14:22:53:656_R:] OK
/* Use AT+CGDCONT to configuration PDP
[2020-03-05 14:22:53:662_S:] AT+CGDCONT=1,“IP”,“HUAWEI.COM”
[2020-03-05 14:22:53:750_R:]
[2020-03-05 14:22:53:756_R:] +CME ERROR: 515
[2020-03-05 14:22:56:491_S:] AT+CLCC
[2020-03-05 14:22:56:555_R:]
[2020-03-05 14:22:56:558_R:] +CME ERROR: 50
/* Use AT+CGSN=1 to query the IMEI of module */
[2020-03-05 14:22:57:821_S:] AT+CGSN=1
[2020-03-05 14:22:57:888_R:]
[2020-03-05 14:22:57:895_R:] +CGSN:861410045030854
[2020-03-05 14:22:57:913_R:]
[2020-03-05 14:22:57:915_R:] OK
/* Use AT+CIMI to query the IMSI */
[2020-03-05 14:22:58:421_S:] AT+CIMI
[2020-03-05 14:22:58:484_R:]
[2020-03-05 14:22:58:487_R:] 460046908901437
[2020-03-05 14:22:58:507_R:] OK
/* User "AT+CGATT=1"to activate context profile */
[2020-03-05 14:22:58:514_S:] AT+CGATT=1
[2020-03-05 14:22:58:580_R:]
[2020-03-05 14:22:58:583_R:] OK
/* Query the status of the context profile,You may have to wait for several seconds */
[2020-03-05 14:22:58:600_S:] AT+CGATT?
[2020-03-05 14:22:58:665_R:]
[2020-03-05 14:22:58:667_R:] +CGATT:1
[2020-03-05 14:22:58:681_R:] OK
/* Use AT+CSQ to query current signal quality */
[2020-03-05 14:22:58:689_S:] AT+CSQ
[2020-03-05 14:22:58:755_R:] +CSQ:22,99
[2020-03-05 14:22:58:772_R:] OK
/* Use AT+COPS? to query current Network Operator */
[2020-03-05 14:22:58:775_S:] AT+COPS?
[2020-03-05 14:22:58:838_R:]
[2020-03-05 14:22:58:844_R:] +COPS:0,2,“46000”
[2020-03-05 14:22:58:860_R:]
[2020-03-05 14:22:58:862_R:] OK
/Use AT+CEREG? to query current EPS Network Registration Status/
[2020-03-05 14:22:58:879_S:] AT+CEREG?
[2020-03-05 14:22:58:944_R:]
[2020-03-05 14:22:58:946_R:] +CEREG:1,1
[2020-03-05 14:22:58:963_R:] OK
/* Fetches the most recent operational statistics */
[2020-03-05 14:22:58:971_S:] AT+NUESTATS
[2020-03-05 14:22:59:039_R:]
[2020-03-05 14:22:59:042_R:] Signal power:-844
[2020-03-05 14:22:59:065_R:] Total power:-683
[2020-03-05 14:22:59:080_R:] TX power:190
[2020-03-05 14:22:59:099_R:] TX time:12763
[2020-03-05 14:22:59:110_R:] RX time:149163
[2020-03-05 14:22:59:128_R:] Cell ID:117712166
[2020-03-05 14:22:59:149_R:] ECL:2
[2020-03-05 14:22:59:153_R:] SNR:-62
[2020-03-05 14:22:59:164_R:] EARFCN:3682
[2020-03-05 14:22:59:180_R:] PCI:307
[2020-03-05 14:22:59:190_R:] RSRQ:-179
[2020-03-05 14:22:59:198_R:] OPERATOR MODE:4
[2020-03-05 14:22:59:216_R:] CURRENT BAND:8
[2020-03-05 14:22:59:232_R:]
[2020-03-05 14:22:59:235_R:] OK
[2020-03-05 14:23:10:538_S:] AT+CGATT=1
[2020-03-05 14:23:10:604_R:]
[2020-03-05 14:23:10:608_R:] OK
[2020-03-05 14:23:13:251_S:] AT+cgdcont?
[2020-03-05 14:23:13:321_R:]
[2020-03-05 14:23:13:323_R:] +CGDCONT:1,“IP”,“HUAWEI.COM”,0,0,0
[2020-03-05 14:23:13:367_R:]
[2020-03-05 14:23:13:369_R:] OK
[2020-03-05 14:23:17:417_S:] AT+QMTOPEN=0,“140.143.181.104”,1831
[2020-03-05 14:23:17:508_R:]
[2020-03-05 14:23:17:511_R:] OK
[2020-03-05 14:23:17:517_R:]
[2020-03-05 14:23:17:519_R:] +QMTOPEN: 0,0
[2020-03-05 14:23:19:868_S:] AT+QMTCONN=0,“GasMeter”,“020005Q835K0”,“3kFDR94ThDQs48lNRTTmLQ==”
[2020-03-05 14:23:19:997_R:]
[2020-03-05 14:23:20:001_R:] OK
[2020-03-05 14:23:21:125_R:]
[2020-03-05 14:23:21:129_R:] +QMTCONN: 0,0,0
[2020-03-05 14:23:23:126_S:] AT+QMTPUB=0,1,2,1,“Dev/Status/020005Q835K0/1/020005Q835K0”
[2020-03-05 14:23:23:241_R:]
[2020-03-05 14:23:23:243_R:] >{“vol”:0.00,“temp”:0.00}
[2020-03-05 14:23:28:332_S:]
[2020-03-05 14:23:28:388_R:] {“vol”:0.00,“temp”:0.00}
[2020-03-05 14:23:28:417_R:]
[2020-03-05 14:23:28:420_R:] OK
[2020-03-05 14:23:30:136_R:]
[2020-03-05 14:23:30:139_R:] +QMTPUB: 0,1,0
[2020-03-05 14:23:34:911_S:] AT+QMTOPEN?
[2020-03-05 14:23:34:978_R:]
[2020-03-05 14:23:34:980_R:] +QMTOPEN: 0,“140.143.181.104”,1831
[2020-03-05 14:23:35:017_R:]
[2020-03-05 14:23:35:023_R:] OK
[2020-03-05 14:23:37:023_S:] AT+QMTCONN?
[2020-03-05 14:23:37:090_R:]
[2020-03-05 14:23:37:093_R:] +QMTCONN: 0,3
[2020-03-05 14:23:37:108_R:]
[2020-03-05 14:23:37:111_R:] OK
[2020-03-05 14:23:44:535_S:] AT+QMTPUB=0,1,2,1,“Dev/Status/020005Q835K0/1/020005Q835K0”
[2020-03-05 14:23:44:651_R:]
[2020-03-05 14:23:44:653_R:] >{“vol”:0.00,“temp”:0.00}
[2020-03-05 14:23:51:383_S:]
[2020-03-05 14:23:51:441_R:] {“vol”:0.00,“temp”:0.00}
[2020-03-05 14:23:51:472_R:] OK
[2020-03-05 14:23:53:672_R:]
[2020-03-05 14:23:53:679_R:] +QMTPUB: 0,1,0
[2020-03-05 14:25:23:569_S:] AT+QMTCONN?
[2020-03-05 14:25:23:636_R:]
[2020-03-05 14:25:23:638_R:] +QMTCONN: 0,3
[2020-03-05 14:25:23:654_R:]
[2020-03-05 14:25:23:661_R:] OK
[2020-03-05 14:25:27:315_S:] AT+QMTOPEN?
[2020-03-05 14:25:27:382_R:]
[2020-03-05 14:25:27:386_R:] +QMTOPEN: 0,“140.143.181.104”,1831
[2020-03-05 14:25:27:423_R:]
[2020-03-05 14:25:27:425_R:] OK
[2020-03-05 14:25:35:483_S:] AT+QMTPUB=0,1,2,1,“Dev/Status/020005Q835K0/1/020005Q835K0”
[2020-03-05 14:25:35:600_R:]
[2020-03-05 14:25:35:602_R:] >{“vol”:0.00,“temp”:0.00}
[2020-03-05 14:25:40:034_S:]
[2020-03-05 14:25:40:089_R:] {“vol”:0.00,“temp”:0.00}
[2020-03-05 14:25:40:119_R:]
[2020-03-05 14:25:40:121_R:] OK
[2020-03-05 14:25:43:102_R:]
[2020-03-05 14:25:43:104_R:] +QMTSTAT: 0,1
[2020-03-05 14:25:43:228_R:]
[2020-03-05 14:25:43:230_R:] +CEREG:2
[2020-03-05 14:25:47:555_R:] +CEREG:1
[2020-03-05 14:25:54:621_S:] AT+QMTOPEN?
[2020-03-05 14:25:54:689_R:]
[2020-03-05 14:25:54:691_R:] OK
[2020-03-05 14:26:00:930_S:] AT+QMTCONN?
[2020-03-05 14:26:00:998_R:]
[2020-03-05 14:26:01:001_R:] OK
[2020-03-05 14:26:09:948_S:] AT+QMTOPEN=0,“140.143.181.104”,1831
[2020-03-05 14:26:10:041_R:]
[2020-03-05 14:26:10:044_R:] OK
[2020-03-05 14:26:10:048_R:]
[2020-03-05 14:26:10:050_R:] +QMTOPEN: 0,0
[2020-03-05 14:26:12:755_S:] AT+QMTCONN=0,“GasMeter”,“020005Q835K0”,“3kFDR94ThDQs48lNRTTmLQ==”
[2020-03-05 14:26:12:880_R:]
[2020-03-05 14:26:12:882_R:] +CME ERROR: 50
[2020-03-05 14:26:16:955_S:] AT+QMTCONN?
[2020-03-05 14:26:17:025_R:] +QMTCONN: 0,3
[2020-03-05 14:26:17:039_R:]
[2020-03-05 14:26:17:042_R:] OK
[2020-03-05 14:26:17:941_R:]
[2020-03-05 14:26:17:943_R:] +QMTSTAT: 0,1
[2020-03-05 14:26:20:250_R:]
[2020-03-05 14:26:20:254_R:] +QMTPUB: 0,1,2
[2020-03-05 14:26:24:633_S:] AT+QMTPUB=0,1,2,1,“Dev/Status/020005Q835K0/1/020005Q835K0”
[2020-03-05 14:26:24:750_R:]
[2020-03-05 14:26:24:760_R:] >{“vol”:0.00,“temp”:0.00}
[2020-03-05 14:26:29:725_S:]
[2020-03-05 14:26:29:780_R:] {“vol”:0.00,“temp”:0.00}
[2020-03-05 14:26:29:809_R:]
[2020-03-05 14:26:29:811_R:] +CME ERROR: 50
[2020-03-05 14:26:35:237_S:] AT+QMTCONN?
[2020-03-05 14:26:35:307_R:] OK
[2020-03-05 14:26:41:160_S:] AT+QMTOPEN?
[2020-03-05 14:26:41:227_R:]
[2020-03-05 14:26:41:230_R:] OK
[2020-03-05 14:26:44:847_S:] AT+QMTOPEN=0,“140.143.181.104”,1831
[2020-03-05 14:26:44:939_R:]
[2020-03-05 14:26:44:941_R:] OK
[2020-03-05 14:26:44:947_R:]
[2020-03-05 14:26:44:949_R:] +QMTOPEN: 0,0
[2020-03-05 14:26:47:024_S:] AT+QMTCONN=0,“GasMeter”,“020005Q835K0”,“3kFDR94ThDQs48lNRTTmLQ==”
[2020-03-05 14:26:47:148_R:]
[2020-03-05 14:26:47:152_R:] +CME ERROR: 50
[2020-03-05 14:26:50:881_S:] AT+QMTOPEN=0,“140.143.181.104”,1831
[2020-03-05 14:26:50:973_R:]
[2020-03-05 14:26:50:976_R:] +CME ERROR: 514
[2020-03-05 14:27:18:399_S:] AT+QMTOPEN=0,“140.143.181.104”,1831
[2020-03-05 14:27:18:491_R:]
[2020-03-05 14:27:18:494_R:] +CME ERROR: 514
[2020-03-05 14:27:18:686_R:]
[2020-03-05 14:27:18:691_R:] +QMTSTAT: 0,1
[2020-03-05 14:27:58:567_S:] AT+QMTOPEN?
[2020-03-05 14:27:58:634_R:]
[2020-03-05 14:27:58:636_R:] OK
[2020-03-05 14:28:00:463_S:] AT+QMTCONN?
[2020-03-05 14:28:00:536_R:] OK
[2020-03-05 14:28:04:947_S:] AT+QMTOPEN=0,“140.143.181.104”,1831
[2020-03-05 14:28:05:039_R:]
[2020-03-05 14:28:05:042_R:] OK
[2020-03-05 14:28:05:046_R:]
[2020-03-05 14:28:05:048_R:] +QMTOPEN: 0,0
[2020-03-05 14:28:06:816_S:] AT+QMTCONN=0,“GasMeter”,“020005Q835K0”,“3kFDR94ThDQs48lNRTTmLQ==”
[2020-03-05 14:28:06:939_R:]
[2020-03-05 14:28:06:942_R:] +CME ERROR: 50
[2020-03-05 14:28:11:191_R:]
[2020-03-05 14:28:11:194_R:] +QMTSTAT: 0,1
[2020-03-05 14:28:36:569_S:] AT+QMTOPEN=0,“140.143.181.104”,1831
[2020-03-05 14:28:36:662_R:]
[2020-03-05 14:28:36:665_R:] OK
[2020-03-05 14:28:36:668_R:]
[2020-03-05 14:28:36:671_R:] +QMTOPEN: 0,0
[2020-03-05 14:28:38:499_S:] AT+QMTOPEN?
[2020-03-05 14:28:38:566_R:]
[2020-03-05 14:28:38:569_R:] +QMTOPEN: 0,“140.143.181.104”,1831
[2020-03-05 14:28:38:606_R:]
[2020-03-05 14:28:38:607_R:] OK
[2020-03-05 14:28:40:687_S:] AT+QMTCONN=0,“GasMeter”,“020005Q835K0”,“3kFDR94ThDQs48lNRTTmLQ==”
[2020-03-05 14:28:40:815_R:] +CME ERROR: 50
[2020-03-05 14:28:42:923_S:] AT+QMTCONN?
[2020-03-05 14:28:42:994_R:] +QMTCONN: 0,3
[2020-03-05 14:28:43:009_R:]
[2020-03-05 14:28:43:011_R:] OK
[2020-03-05 14:28:45:385_S:] AT+QMTPUB=0,1,2,1,“Dev/Status/020005Q835K0/1/020005Q835K0”
[2020-03-05 14:28:45:501_R:]
[2020-03-05 14:28:45:504_R:] >{“vol”:0.00,“temp”:0.00}
[2020-03-05 14:28:50:346_S:]
[2020-03-05 14:28:50:401_R:] {“vol”:0.00,“temp”:0.00}
[2020-03-05 14:28:50:431_R:]
[2020-03-05 14:28:50:432_R:] OK
[2020-03-05 14:28:51:846_R:]
[2020-03-05 14:28:51:848_R:] +QMTSTAT: 0,1
[2020-03-05 14:29:07:652_S:] AT+QMTOPEN?
[2020-03-05 14:29:07:718_R:]
[2020-03-05 14:29:07:723_R:] OK
[2020-03-05 14:29:09:820_S:] AT+QMTCONN?
[2020-03-05 14:29:09:887_R:]
[2020-03-05 14:29:09:889_R:] OK
[2020-03-05 14:29:13:393_S:] AT
[2020-03-05 14:29:13:451_R:]
[2020-03-05 14:29:13:454_R:] OK
[2020-03-05 14:29:18:248_S:] AT+QMTOPEN=0,“140.143.181.104”,1831
[2020-03-05 14:29:18:340_R:]
[2020-03-05 14:29:18:343_R:] OK
[2020-03-05 14:29:18:351_R:] +QMTOPEN: 0,0
[2020-03-05 14:29:22:231_R:]
[2020-03-05 14:29:22:239_R:] +QMTSTAT: 0,1
[2020-03-05 14:29:25:265_S:] AT+QMTOPEN?
[2020-03-05 14:29:25:334_R:]
[2020-03-05 14:29:25:336_R:] OK
[2020-03-05 14:29:30:469_R:]
[2020-03-05 14:29:30:474_R:] +QMTPUB: 0,1,2
[2020-03-05 14:29:35:335_S:] AT+QMTOPEN=0,“140.143.181.104”,1831
[2020-03-05 14:29:35:432_R:] OK
[2020-03-05 14:29:35:434_R:]
[2020-03-05 14:29:35:436_R:] +QMTOPEN: 0,0
[2020-03-05 14:29:39:793_S:] AT+QMTOPEN?
[2020-03-05 14:29:39:861_R:]
[2020-03-05 14:29:39:864_R:] +QMTOPEN: 0,“140.143.181.104”,1831
[2020-03-05 14:29:39:900_R:]
[2020-03-05 14:29:39:903_R:] OK
[2020-03-05 14:29:44:561_S:] AT+QMTCONN?
[2020-03-05 14:29:44:630_R:]
[2020-03-05 14:29:44:632_R:] +QMTCONN: 0,3
[2020-03-05 14:29:44:650_R:]
[2020-03-05 14:29:44:651_R:] OK
[2020-03-05 14:29:52:060_S:] AT+QMTOPEN?
[2020-03-05 14:29:52:126_R:]
[2020-03-05 14:29:52:130_R:] +QMTOPEN: 0,“140.143.181.104”,1831
[2020-03-05 14:29:52:166_R:]
[2020-03-05 14:29:52:168_R:] OK
[2020-03-05 14:29:56:074_S:] AT+QMTPUB=0,1,2,1,“Dev/Status/020005Q835K0/1/020005Q835K0”
[2020-03-05 14:29:56:190_R:]
[2020-03-05 14:29:56:193_R:] >{“vol”:0.00,“temp”:0.00}
[2020-03-05 14:30:00:361_S:]
[2020-03-05 14:30:00:417_R:] {“vol”:0.00,“temp”:0.00}
[2020-03-05 14:30:00:447_R:]
[2020-03-05 14:30:00:448_R:] OK
[2020-03-05 14:30:02:904_R:]
[2020-03-05 14:30:02:911_R:] +QMTSTAT: 0,1
[2020-03-05 14:30:25:784_S:] AT+QMTOPEN?
[2020-03-05 14:30:25:852_R:]
[2020-03-05 14:30:25:856_R:] OK
[2020-03-05 14:30:28:047_S:] AT+QMTCONN?
[2020-03-05 14:30:28:117_R:]
[2020-03-05 14:30:28:119_R:] OK
Dear,Abner
上次的问题已解决,是没关闭PSM。另请教下,在MQTT执行AT+QMTPUB=X,X,“XXX”,数据成功发送,模组会返回刚发送的数值,再反馈+QMTPUB=0,X,X发送成功标志。怎样可以屏蔽掉串口刚发送的那串数据呢?
Hi Songhuilee
不要SUB订阅就可以接受不到发布的消息。
Dear,Abner
首先,感谢您的回答。实际上我已经执行AT+QMTUNS取消了订阅,再说如果是订阅返回的消息,不应该是以+QMTRECV开始的吗?以下是我打印的log
AT+QMTOPEN=0,“XXX.XXX.XXX.XXX”,1831
OK
+QMTOPEN: 0,0
AT+QMTCONN=0,“EXAMPLE”,“xxxxxxxxx”,“xxxxxxxxxxxxxxxxxxxxxx”
OK
+QMTCONN: 0,0,0
+QMTUNS: (0),,""[,""…]
OK
+QMTUNS: 0,1,0
AT+QMTPUB=0,1,2,1,“xxxxxxxxxxxxxxxxxxxxxxxxx”
{“vol”:0.00,“tmp”:0.00}
OK
上条漏下了最后一句返回。
AT+QMTOPEN=0,“XXX.XXX.XXX.XXX”,1831
OK
+QMTOPEN: 0,0
AT+QMTCONN=0,“EXAMPLE”,“xxxxxxxxx”,“xxxxxxxxxxxxxxxxxxxxxx”
OK
+QMTCONN: 0,0,0
+QMTUNS: (0),,""[,""…]
OK
+QMTUNS: 0,1,0
AT+QMTPUB=0,1,2,1,“xxxxxxxxxxxxxxxxxxxxxxxxx”
{“vol”:0.00,“tmp”:0.00}
OK
+QMTPUB: 0,1,0
Hi Songhuilee
麻烦提供下完整流程,我看你上面提供的流程中也没有看到返回你发送的数据?
不好意思,刚忘了标注出来。我在代码中只打印了发送命令,串口返回数据,未打印字符“>”即之后的发送数据,所以没看出来。红色部分为模组返回数据。
实际上和这张图的一致,该图可看到,在14:17分发送了hello world,并在14:18分收到了该数据“hello world”。此时收到的数据并不是以+QMTRECV开始的数据。
Hi Songhuilee
你这个是串口显示">"后你输入的数据,发送后串口打印出来的。
如果你不想这样可以使用定长的方式发送数据,但是定长的方式是不支持特殊字符。
Hi Abner,
是的,就是 > 之后返回的数据。如果是定长发送,指令是AT+QMTPUBEX吗?只在网上看到过这条指令,不知道具体在手册什么地方有提到。
Hi Songhuilee
AT+QMTPUB=0,0,0,0,"***************",“12345” ===》发布消息
后面的12345就是你要发送的数据。
Hello @Abner-Q
I am not able to execute AT+QMTCONN=0,“1234567”,"","" this command.I am getting error +QMTSTAT:0,6.
What might be the issue?
Thank you in advance!
Hi Sana
AT+QMTCONN should be established immediately after AT+QMTOPEN.
Otherwise, +QMTSTAT:0,6 will appear because the AT+QMTCONN has not been established for a long time, and the server disconnected the previous AT+QMTOPEN connection.