3904 views|10 replies

61

Posts

1

Resources
The OP
 

[Evaluation of EC-01F-Kit, the NB-IoT development board of Essence] 03. Discussion: Frequent disconnection after the device is connected to the network [Copy link]

This post was last edited by Li Baiyi on 2021-12-22 21:11

When debugging EC-01F MQTT to access Alibaba, the normal communication state is frequently disconnected and then automatically connected to the network. The antenna has been replaced with a 4G suction cup high-gain antenna. What is the reason?

The following is the debug log:

[2021-12-19 14:36:18.344 R]

+CREG: 6 // Registered to the "SMS only" network ( only applicable when <AcT> is E -UTRAN )

+CEREG: 1 //1 has been registered to the local network

[2021-12-19 14:36:41.108 R]

+CREG: 0 //0 No network is registered, MT does not search for new network

+CEREG: 0 //0 No network registered, MT does not search for new network

+CEREG: 2 //2 No network registered, MT is searching for a new network

[2021-12-19 14:36:50.442 R]

+CREG: 6 //6 has been registered to the "SMS only" network ( only applicable when <AcT> is E -UTRAN )

+CEREG: 1 // Registered to the local network

[2021-12-19 14:36:52.837 R]

+ECMTSTAT: 0,1 //+ECMTSTAT URC message, reporting link layer status <err_code> integer. Error code err_code: 1 The connection has been closed or reset by the peer

[2021-12-19 14:37:04.988 R]

+ECMTCONN: 0,0,0 //+ECMTCONN:<tcpconnectID>,<result>[,<ret_code>]result:0 Data was sent successfully and a reply from the server was receivedret_code:0 Connection to the server was successful

[2021-12-19 14:37:40.695 R]

+ECMTSTAT: 0,1 //+ECMTSTAT URC message, reporting link layer status <err_code> integer. Error code err_code: 1 The connection has been closed or reset by the peer

[2021-12-19 14:37:51.604 R]

+ECMTCONN: 0,0,0 //+ECMTCONN:<tcpconnectID>,<result>[,<ret_code>]result:0 Data was sent successfully and a reply from the server was receivedret_code:0 Connection to the server was successful

[2021-12-1916:18:38.377T]AT+ECMTPUB=0,0,0,0,"/sys/a1KApkvNNDZ/EVN_2021_4_17/thing/event/property/post",{"params:{"temperature":33.8,"CO2":10.27},"method":"thing.event.property.post","id":1}

[2021-12-19 16:18:38.493 R]

OK

+ECMTPUB: 0,0,0

[2021-12-19 16:18:40.093 R]

+ECMTRECV: 0,0,"/sys/a1KApkvNNDZ/EVN_2021_4_17/thing/event/property/post_reply",{"code":200,"data":{},"id":"1","message":"success","method":"thing.event.property.post","version":"1.0"}

[2021-12-19 16:22:08.695 R]

+ECMTSTAT: 0,1 //+ECMTSTAT URC message, reporting link layer status <err_code> integer. Error code err_code: 1 The connection has been closed or reset by the peer

[2021-12-19 16:22:15.955 R]

+CREG: 0 //0 No network is registered, MT does not search for new network

+CEREG: 0 //0 No network registered, MT does not search for new network

+CERE G: 2 // No network registered, MT is searching for a new network

[2021-12-19 16:22:27.791 R]

+CREG: 6 // Registered to the "SMS only" network ( only applicable when <AcT> is E -UTRAN )

+CEREG: 1 //1 has been registered to the local network

[2021-12-19 16:22:30.960 R]

+ECMTCONN: 0,0,0 //+ECMTCONN:<tcpconnectID>,<result>[,<ret_code>]result:0 Data was sent successfully and a reply from the server was receivedret_code:0 Connection to the server was successful

[2021-12-19 16:33:09.244 R]

+ECMTSTAT: 0,1 //+ECMTSTAT URC message, reporting link layer status <err_code> integer. Error code err_code: 1 The connection has been closed or reset by the peer

[2021-12-19 16:33:21.712 R]

+ECMTCONN: 0,0,0 //+ECMTCONN:<tcpconnectID>,<result>[,<ret_code>]result:0 Data was sent successfully and a reply from the server was receivedret_code:0 Connection to the server was successful

This post is from RF/Wirelessly

Latest reply

Is the paddle antenna not effective? Why switch to a 4G suction cup antenna?  Details Published on 2022-1-20 14:47
Personal signature

intersil Techwell应用工程师

 

6818

Posts

11

Resources
2
 
Are there too many requests? I use MQTT to connect to my network, and it is very stable! It has not been disconnected for half a day!
This post is from RF/Wirelessly

Comments

PC tested it through AT command, but it didn't work after connecting, and it dropped out every once in a while  Details Published on 2021-12-20 08:37
 
 

61

Posts

1

Resources
3
 
lugl4313820 posted on 2021-12-19 21:08 Are there too many requests? I use MQTT to connect to my network, which is very stable! It has not been disconnected for half a day!

PC tested it through AT command, but it didn't work after connecting, and it dropped out every once in a while

This post is from RF/Wirelessly

Comments

20 Configure keepalive time AT+ECMTCFG="keepalive",0,30\r Try this parameter more often.   Details Published on 2021-12-20 12:51
Personal signature

intersil Techwell应用工程师

 
 
 

1412

Posts

3

Resources
4
 

Is it because the PC does not send heartbeats at a fixed time?

This post is from RF/Wirelessly

Comments

This application does not require the MCU to maintain the heartbeat. 1. EC-01F supports the MQTT protocol. The MCU only needs to operate the MQTT configuration of EC-01F: Configure the keepalive time->AT+ECMTCFG="keepalive",0,30\r 2. If the MCU builds the MQTT protocol through TCP, it needs to maintain the keepalive time by itself.  Details Published on 2021-12-20 10:24
Personal signature

没有什么不可以,我就是我,不一样的烟火! 

 
 
 

61

Posts

1

Resources
5
 
annysky2012 posted on 2021-12-20 08:48 Is it because the PC does not send heartbeats at a fixed time?

This application does not use the MCU to maintain the heartbeat.

1.EC-01F supports MQTT protocol. MCU only needs to operate MQTT configuration of EC-01F: Configure keepalive time->AT+ECMTCFG="keepalive",0,30\r

2. If the MCU builds the MQTT protocol through TCP, it needs to maintain the keep-alive time itself.

This post is from RF/Wirelessly
Personal signature

intersil Techwell应用工程师

 
 
 

6818

Posts

11

Resources
6
 
Li Baiyi posted on 2021-12-20 08:37 The PC was tested through AT commands, but it didn't work when connected, and it dropped the line every once in a while

20 Configuring the keep-alive time

AT+ECMTCFG="keepalive",0,30\r

Please try this parameter more.

This post is from RF/Wirelessly
 
 
 

6818

Posts

11

Resources
7
 

In addition, the MQTT server also has regulations. If you send illegal data or send it too frequently, it will actively kick you offline.

This post is from RF/Wirelessly
 
 
 

61

Posts

1

Resources
8
 
This post was last edited by Li Baiyi on 2021-12-20 14:23
lugl4313820 posted on 2021-12-20 12:52 In addition, the MQTT server also has regulations. If you send illegal data or send it too frequently, it will actively kick you offline.

1. Search in Alibaba Cloud Help Documents:

How to set the heartbeat interval?

In IOT_MQTT_Construct, you can set the value of keepalive_interval_ms, which is used by the IoT platform as the heartbeat interval. The value range of keepalive_interval_ms is 60000~300000.

2. The Alibaba Cloud MQTT protocol specification does not mention this limitation https://help.aliyun.com/document_detail/30540.html . I will try to configure it to 60+.

3. PC sends debugging instructions to eliminate the possibility of illegal data.

4. Does not registering to the network have anything to do with this problem?

This post is from RF/Wirelessly
Personal signature

intersil Techwell应用工程师

 
 
 

61

Posts

1

Resources
9
 

It should be ok to change the MQTT keepalive time configuration.

This post is from RF/Wirelessly
Personal signature

intersil Techwell应用工程师

 
 
 

4

Posts

0

Resources
10
 
Is the paddle antenna not effective? Why switch to a 4G suction cup antenna?
This post is from RF/Wirelessly

Comments

The paddle antenna doesn't work well indoors. I tried several antennas, but the problem is the same.  Details Published on 2022-1-20 16:15
 
 
 

61

Posts

1

Resources
11
 
This post was last edited by Li Baiyi on 2022-1-20 16:17
Bo Antong published on 2022-1-20 14:47 Is the paddle antenna not effective? Why change to a 4G suction cup antenna?

The paddle antenna doesn't work well indoors. I tried several antennas and got the same problem.

https://item.taobao.com/item.htm?spm=a1z09.2.0.0.1e142e8dKBDK6H&id=592809751730&_u=kmm6pvk7e2b

The selected one is 2G/GSM/NB/6dBi/309mm. Feeder length: 2m

This post is from RF/Wirelessly
Personal signature

intersil Techwell应用工程师

 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list