HL7802 - KHTTP_ERROR: 1,5 over GSM

Hello,

I’m facing a problem using modem HL7802 with firmware 4.6.9.4.
I use only HTTP connection.

The connection to the serveur works fine when the modem is connected in CAT-M1 but when I’m in GSM (2G) I have the error: “HTTP connection error due to internal trouble”

Log MCU to HL7802
(10:11:06.946) AT+KCNXTIMER=1,30,2,60,0
(10:11:12.351) AT+KHTTPCFG=1,"my_serveur.com",80

Log HL7802
(2025-10-06 10:11:12.366) +KHTTPCFG: 1
(2025-10-06 10:11:16.027) OK
(2025-10-06 10:11:16.027) +KCNX_IND: 1,4,1
(2025-10-06 10:11:16.027) +KCNX_IND: 1,2,1,2,30
(2025-10-06 10:11:46.023) +KCNX_IND: 1,4,2
(2025-10-06 10:11:47.621) +KCNX_IND: 1,2,2,2,30
(2025-10-06 10:11:47.621) +KHTTP_ERROR: 1,5

How can I do to avoid this problem ?

Any help is appreciated :slight_smile:

How about tcp and udp?

I remember it should work in gsm mode

Hi,

Thanks for feddback.
I try another thing but I got an error:

(14:52:35.331) at+ksrat?
  (14:52:35.378) at+ksrat?
  (14:52:35.378) +KSRAT: 2
(14:52:35.378) OK
(14:52:42.974) at+cfun=1,1
  (14:52:43.025) at+cfun=1,1
  (14:52:46.798) OK
(14:52:55.927) at+cgdcont?
  (14:52:55.977) at+cgdcont?
  (14:53:04.337) +CGDCONT: 1,"IP",,,0,0,0,0,0,,0,,,,,
  (14:53:04.337) +CGDCONT: 2,"IPV4V6",,,0,0,0,0,0,,0,,,,,
  (14:53:04.337) OK
(14:53:15.542) at+cgdcont=1,"IP","hkcsl"
  (14:53:15.671) at+cgdcont=1,"IP","hkcsl"
  (14:53:15.671) OK
(14:53:17.655) at+cgdcont=1,"IP","hkcsl"
  (14:53:17.750) at+cgdcont=1,"IP","hkcsl"
  (14:53:17.750) OK
(14:53:27.966) at+cgpaddr=1
  (14:53:28.074) at+cgpaddr=1
  (14:53:28.074) +CGPADDR: 1
  (14:53:28.074) OK
(14:53:38.250) at+creg?
  (14:53:38.350) at+creg?
  (14:53:38.350) +CREG: 0,5
  (14:53:38.350) OK
(14:53:50.712) at+cclk?
  (14:53:50.823) at+cclk?
  (14:53:50.823) +CCLK: "25/10/06,14:53:46+08"
  (14:53:50.823) OK
(14:54:00.139) at+cgdcont?
  (14:54:00.245) at+cgdcont?
  (14:54:00.245) +CGDCONT: 1,"IP","hkcsl",,0,0,,0,,,,,,,,
  (14:54:00.245) +CGDCONT: 2,"IPV4V6",,,0,0,0,0,0,,0,,,,,
  (14:54:00.245) OK
(14:54:33.255) AT+KHTTPCFG=1,"google.com",80
  (14:54:33.383) AT+KHTTPCFG=1,"google.com",80
  (14:54:33.383) +KHTTPCFG: 1
  (14:54:34.778) OK
  (14:54:34.778) +KCNX_IND: 1,4,1
  (14:54:34.778) +KCNX_IND: 1,2,1,2,30
  (14:55:04.781) +KCNX_IND: 1,4,2 
  (14:55:06.300) +KCNX_IND: 1,2,2,2,30
  (14:55:06.300) +KHTTP_ERROR: 1,5

Is something missing to do especially if I’m in GSM ?

I think you use the wrong apn for +cgdcont

Btw, how about trying tcp and udp?

Hi,

Since I have put AT+KCNXCFG=1,“GPRS”,“good APN” it’s now working.
Now, even if I power OFF then power ON the board, it’s still working (without entering command KCNXCFG)

In the AT command I can see this (my developement started with module fw version 4.3.9):

The modem shall works even if the command is not entred.

Btw, I now have to find a way to know precisely how to fix it.
To try to reset the modul I have dowloaded the firmware 4.3.9.0 and it’s still working.
How can I do to restart the module from scratch ?

Isn’t that the root cause is wrong APN is entered?

Hi,

Before yesterday, I never put any APN in the modem and it worked fine with CAT-M1 and NB-IOT. So it should works with GSM too ?

You can make a test to verify in gsm mode

Hi,

Thanks for feedback, I really appreciate your reactivity !
I have another modem and I try to connect in 2G and CAT-M1:

2G:

CAT-M1:

Here I didn’t put anything on APN.

why don’t you put the correct APN in the module?

I remember GSM mode is a bit different from LTE mode.
Even without APN, it can still register circuit switch network for GSM mode.
For for LTE mode, user needs to enter correct when register network.

The product is not delivred with SIM card so I don’t know what will be the APN.
I try AT command to read it from SIM card without success, any idea about how to get the APN ?

of course the user needs to enter the APN by themselves

Or you can check this list:

Hi,

Thanks for the list but I can’t use it because user hadn’t keyboard to enter the APN (note: my apn 1NCE used for tests is not present in the list)

There is a specific AT command to read it from SIM card ?
Why need we to enter the APN for 2G connection ? It’s not needed for CAT-M1 and NB-IOT.

Gsm network is different from lte network …

You might need to update and embed the apn list in your host application

Hi,

Thanks for all.
I will find a solution to manage 2G connection.

Have a nice day.