HL7900 – RI not triggered all the time on incoming TCP/MQTT data in eDRX

Hello,

Context

I am currently working on implementing eDRX on the HL7900 / HL7812 modem and I am encountering an issue related to the Ring Indicator (RI).

The device communicates using MQTT over TCP with a broker. My final goal is to run the modem with eDRX enabled, use Lite-Hibernate mode, and rely on the Ring Indicator to wake up the host MCU when a downlink message is received.

However, the RI signal does not seem to trigger consistently. In some situations, when a message is sent to the modem, the application subsystem appears to wake up (view with consumption) and process the incoming data, but the RI signal is not asserted, meaning the host MCU is not notified.

At this point, I don’t know if this is related to:

  • a hardware problem on my end,
  • how to configure the RI via AT commands,
  • how to manage the wake-up phases after RI detection.
  • Time between RI detections

I have already run several tests but have not been able to identify the real cause.

Tests performed

TEST 1 – Baseline behavior : RI without eDRX, No low power mode enabled, MQTT connection

Purpose: verify that RI works correctly in a simple scenario.

MQTT connection, subscribe to a topic, then send two ping requests without reading the acknowledgments between them.

>>> AT
OK
>>> AT+CFUN=4
OK
+CEREG: 2
+CEREG: 0
>>> AT+KSLEEP=2
OK
>>> AT+KSLEEP?
+KSLEEP: 2
OK
>>> AT+KRIC?
+KRIC: 64,0,5,2,1
OK
>>> AT+KHWIOCFG?
+KHWIOCFG: 0, 1
+KHWIOCFG: 1, 0
+KHWIOCFG: 2, 0
+KHWIOCFG: 3, 1
+KHWIOCFG: 4, 0
+KHWIOCFG: 5, 1
+KHWIOCFG: 6, 0
OK
>>> AT&V
ACTIVE PROFILE:
&D0 &S0 &C0 E1 Q0 V1 &K0 +IPR=115200 &R1 X4 +FCLASS0 S0:0 S1:0 S3:13 S4:10 S5:8 S7:255 S8:0 S10:1 +IFC=0,0 
STORED PROFILE0:
&D0 &S0 &C0 E1 Q0 V1 &K0 +IPR=115200 &R1 X4 +FCLASS0 S0:0 S1:0 S3:13 S4:10 S5:8 S7:255 S8:0 S10:1 +IFC=0,0 
STORED PROFILE1:
&D0 &S0 &C0 E0 Q0 V0 &K3 +IPR=115200 &R1 X4 +FCLASS0 S0:0 S1:0 S3:13 S4:10 S5:8 S7:255 S8:0 S10:1 +IFC=2,2 
OK
>>> AT+KSRAT?
+KSRAT: 0
OK
>>> AT+CEDRXRDP
+CEDRXRDP: 0
OK
>>> AT+CPSMS=0
OK
>>> AT+CPSMS?
+CPSMS: 0,,,"00101100","00001010"
OK
>>> AT+CEDRXS=0
OK
>>> AT+CEDRXS?
OK
>>> AT+CFUN=1,1
OK



+CEREG: 2
+CEREG: 0
+CEREG: 2
+CEREG: 1,"3A01","00DC5606",7
>>> AT+CGDCONT=1,"IPV4V6","****"
OK
>>> AT+KCNXCFG=1,"GPRS","****"
OK
>>> AT+KTCPCFG?
OK
>>> AT+KTCPCFG=1,0,"****",1883
+KTCPCFG: 1
OK
>>> AT+KTCPCNX=1
OK
+KCNX_IND: 1,1,0
+KTCP_IND: 1,1
>>> AT+KTCPSND=1,73 
>>> 10 … 5F
CONNECT
OK
+KTCP_DATA: 1,4
>>>AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,4
OK
>>> AT+KTCPRCV=1,4
AT+KTCPRCV=1,4
CONNECT
20 02 00 00
--EOF--Pattern--
OK
>>> AT+KTCPSND=1,39 
>>> 82 …  00
CONNECT
OK
+KTCP_DATA: 1,5
>>>AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,5
OK
>>> AT+KTCPRCV=1,5
CONNECT
90 03 00 01 00
--EOF--Pattern--
OK
>>> AT+KTCPSND=1,2 
>>> C0 00
CONNECT
OK
+KTCP_DATA: 1,2
>>> AT+KTCPSND=1,2
>>> C0 00
CONNECT
OK
AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,2
OK
>>> AT+KTCPRCV=1,2
CONNECT
D0 00
--EOF--Pattern--
OK
+KTCP_DATA: 1,2
>>>AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,2
OK
>>> AT+KTCPRCV=1,2
CONNECT
D0 00
--EOF--Pattern--
OK
>>> AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,0
OK

TEST 2 – eDRX + Lite-Hibernate : eDRX cycle set to ~20 seconds, Messages sent quickly from the broker

Purpose: observe RI triggering during normal eDRX operation.

Here, the first one works, but the second one causes the HL7900 to crash. The ring indicator does not activate during the second wake-up. I then tried to wake it up (forcing it with wake-up) and send messages with pingreq, but I did not receive any messages from the broker (and the ring indicator no longer works). Looking at the MQTT broker manager, my client is still connected and the broker is receiving the pings sent by the HL.

>>> AT+CFUN=4
OK
+CEREG: 0
>>> AT+CPSMS=0
OK
>>> AT+CPSMS?
+CPSMS: 0,,,"00101100","00001010"
OK
>>> AT+CEDRXS=2,4,2
OK
>>> AT+CEDRXS?
+CEDRXS: 4,"0010"
OK
>>> AT+KSLEEP=1,1,10
OK
>>> AT+KSLEEP?
+KSLEEP: 1,1,10
OK
>>> AT+KRIC?
+KRIC: 64,0,5,2,1
OK
>>> AT+KHWIOCFG?
+KHWIOCFG: 0, 1
+KHWIOCFG: 1, 0
+KHWIOCFG: 2, 0
+KHWIOCFG: 3, 1
+KHWIOCFG: 4, 0
+KHWIOCFG: 5, 1
+KHWIOCFG: 6, 0
OK
>>> AT+CFUN=1,1
OK

+CEREG: 2
+CEREG: 0
+CEREG: 2
+CEREG: 1,"3A01","00DC5606",7
>>> AT+CEDRXRDP
+CEDRXRDP: 4,"0010","0010","0000"
OK
>>> AT+CGDCONT=1,"IPV4V6","orange.m2m.spec"
OK
>>> AT+KCNXCFG=1,"GPRS","orange.m2m.spec"
OK
>>> AT+KTCPCFG?
OK
>>> AT+KTCPCFG=1,0,"emqx.sylvia.tekin.fr",1883
+KTCPCFG: 1
OK
>>> AT+KTCPCNX=1
OK
+KCNX_IND: 1,1,0
+KTCP_IND: 1,1
>>> AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,0
OK
>>> AT+KTCPSND=1,73 
>>> 10 47 00 04 4D 51 54 54 04 C2 01 2C 00 0D 48 4C
37 39 30 30 5F 54 43 50 5F 52 49 00 0A 73 79 6C
76 31 61 63 34 72 65 00 20 4D 50 62 39 50 74 41
33 76 59 67 6F 54 6F 45 62 63 4A 39 6B 72 53 36
73 4E 50 76 5A 38 77 69 5F
CONNECT
OK
+KTCP_DATA: 1,4
AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,4
OK
>>> AT+KTCPRCV=1,4
CONNECT
20 02 00 00
--EOF--Pattern--
OK
>>> AT+KTCPSND=1,39 
>>> 82 25 00 01 00 20 73 65 6E 73 6F 72 73 2F 48 4C
37 39 30 30 5F 54 43 50 5F 52 49 2F 73 74 61 74
75 73 5F 72 65 71 00
CONNECT
OK
+KTCP_DATA: 1,5
AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,5
OK
>>> AT+KTCPRCV=1,5
CONNECT
90 03 00 01 00
--EOF--Pattern--
OK
+KTCP_DATA: 1,38
AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,38
OK
>>> AT+KTCPRCV=1,38
CONNECT
30 24 00 20 73 65 6E 73 6F 72 73 2F 48 4C 37 39
30 30 5F 54 43 50 5F 52 49 2F 73 74 61 74 75 73
5F 72 65 71 7B 7D
--EOF--Pattern--
OK

Réveil après séquence de test : 

>>> AT+KTCPSND=1,2
>>> C0 00
CONNECT
OK
>>> AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,0
OK
>>> AT+KTCPSND=1,2  [MQTT PINGREQ]
>>> C0 00
CONNECT
OK
AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,0
OK

TEST 3 – Periodic WAKEUP : Same configuration as Test 2, I manually wakes the modem every minute using WAKEUP, I send à PINGREQ and wait the response of the broker.

Purpose : Observe the behavior of the RI between eDRX sleep cycles.

Each time you wake up, here are the commands sent:

>>> AT
OK
>>> AT+KTCPSND=1,2 
>>> C0 00
CONNECT
OK
+KTCP_DATA: 1,2
>>>AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,2
OK
>>> AT+KTCPRCV=1,2
CONNECT
[KTCPRCV DATA session 1, 2 byte(s)]
D0 00
--EOF--Pattern--
OK

TEST 4 – Long interval : Same configuration as Test 2, Messages sent from broker at longer intervals

Purpose : Observe whether the timing between eDRX cycles affects RI (waiting for the calibration phase).

Each time you wake up, here are the commands sent:

+KTCP_DATA: 1,38
>>>AT+KTCPSTAT=1
+KTCPSTAT: 3,-1,0,38
OK
>>> AT+KTCPRCV=1,38
CONNECT
30 ... 7D
--EOF--Pattern--
OK

Hardware and firmware

For the setup:

  • External 3.7 V power supply

  • Communication via UART1

  • AT commands sent from a Python script on PC

Has anyone experienced a similar issue ? Any ideas or suggestions would be greatly appreciated.

Thanks in advance for your help.

i saw your +KRIC is not using RI pin…

BTW, is it the same situation for your HL7812?

>>> AT+KRIC?
+KRIC: 64,0,5,2,1

For my test i am using the ‘GPIO2’ pin and not the ‘UART_RI’.
I didn’t mention it here, but I also ran tests with UART_RI and got the same results.
I also tried changing the timing of the pulse or removing it, but it didn’t help.

is it the same situation for your HL7812?

Unfortunately, I don’t have an unsoldered HL7812, so I couldn’t perform my tests on the Semtech dev-kit. However, I did the TEST 2 with an HL7812 that was soldered onto a board with a microcontroller, and I obtained approximately the same results.

I can see the RI signal is working fine with the following test:


+CREG: 1,"C672","0188A9DF",9
AT+KCNXCFG=1,"GPRS","nbiot"
OK
AT+KCNXPROFILE=1
OK
AT+KTCPCFG=1,0,"123.123.123.123",5044
+KTCPCFG: 1

OK
AT+ktcpcnx=1
OK

+KCNX_IND: 1,1,0

+KTCP_IND: 1,1
at+kric=64,0,5,0,1
OK

AT+KTCPSND=1,5
CONNECT

OK

+KTCP_DATA: 1,2
at+ktcprcv=1
+CME ERROR: 3
at+ktcprcv=1,2
CONNECT
aa--EOF--Pattern--
OK

+KTCP_DATA: 1,2
at+ktcprcv=1,2
CONNECT
aa--EOF--Pattern--
OK

+KTCP_DATA: 1,1
at+ktcprcv=1,1
CONNECT
a--EOF--Pattern--
OK
ati3
HL7812.5.7.3.0

OK
at+cedrxs?
OK
AT+CEDRXRDP
+CEDRXRDP: 0

OK

Okay, thank you. In your tests, did you try switching to low power mode (sleep or lite-hibernate) with edrx and waiting for the RI notification to wake up the HL and process the message?

Because what I describe in my tests is mainly during operation with edrx. In normal mode without edrx or low power mode, it works perfectly well and normally.

didn’t you mentioned that it has problem in test1?

I have also tried cedrx mode, no problem is found:


at+cedrxs=0
OK
at+cedrxs=1
OK
at+cedrxs?
+CEDRXS: 4,"0101"
+CEDRXS: 5,"0010"

OK
AT+CEDRXRDP
+CEDRXRDP: 5,"0010","0010","0000"

OK
ati3
HL7812.5.7.3.0

OK
at+Cereg?
+CEREG: 5,1,"C672","0188A9DF",9

OK
AT+KCNXCFG=1,"GPRS","nbiot"
OK
AT+KCNXPROFILE=1
OK
AT+KTCPCFG=1,0,"123.123.123.123",5048
+KTCPCFG: 1

OK
AT+ktcpcnx=1
OK

+KCNX_IND: 1,1,0

+KTCP_IND: 1,1
at+kric=64,0,5,0,1
OK
AT+KTCPSND=1,5
CONNECT

OK

+KTCP_DATA: 1,1
aat
OK
at+ktcprcv=1,5
CONNECT
1--EOF--Pattern--
OK

+KTCP_DATA: 1,1
at+ktcprcv=1,5
CONNECT
2--EOF--Pattern--
OK

+KTCP_DATA: 1,2
at+ktcprcv=1,5
CONNECT
34--EOF--Pattern--
OK

+KTCP_DATA: 1,1
at+ktcprcv=1,5
CONNECT
5--EOF--Pattern--
OK
at+ksleep=1,1,10
OK

//here the module goes to sleep mode.
//And I can see the RI pin toggled when receiving TCP data

+KTCP_DATA: 1,7

Okay, thank you for your help. Test #1 just shows that the ring indicator mechanism works normally when the edrx is not implemented.
Regarding your tests, how long after sleep do you send TCP data ? And does it work even if you repeat the sleep cycles after reading the data and restarting the operation ?

Because in my tests, after the first sleep phase, the RI works, and after receiving the first packet, if I go back to sleep, the next ring indicator often has problems, etc.
It’s as if it doesn’t reset correctly.
It only works fairly well when I space out my TCP transmissions by about 2-3 minutes. But sending a message a few tens of seconds after falling asleep doesn’t always work (with a 20-second eDRX cycle in my case).

Have you contacted distributor on this issue?

I tried to receive TCP data during sleep mode twice times, no problem is found on RI pin.
i.e.
sleep → server sends TCP data → RI toggles → wake up and read the TCP data → sleep → server sends TCP data → RI toggles