HL6528RD-2.8 vs HL6528RD-G2.8 problem with TCP

Hi,

I have an application that uses HL6528RD-2.8 and it connects via TCP to send data to a server. This works well, and we have built 60+ devices which are all working in the field. I have now exchanged the HL6528RD-2.8 for an HL6528RD-G2.8 in the same PCB and it no longer makes a TCP connection. I am using the same FW as I use for the HL6528RD-2.8 (i.e. no GPS/GNSS commands are being issued so the GNSS module is booting on its default settings and I am not using it yet).

The following commands execute correctly with the expected responses from the module over the UART1:
AT&K3
AT+KCNXCFG=1 …
AT+KTCPCNX=1
AT+KCNXTIMER=1…
AT+KTCPCNX=1
then nothing further from HL6528RD-G…
HL6528RD-2.8 continues by responding with +KTCP_IND:"1,1 and goes on to post data correctly.

I had imagined that simply swapping the RD-2.8 version with a RD-G2.8 would not affect the TCP side of things. I must be missing something.

Any help would be appreciated.
Many thanks

Hi @andy.link,
Basically, HL6528RD-G2.8 should work as HL6528RD-2.8 does. Please help to check your module following below and make sure you don’t miss any configuration:

at&k3
at+cgatt=1//Attach PS

OK
at+cgdcont=1,“IP”,“your-APN” //Define PDP context

OK
at+cgact=1 //Activate PDP context

OK
at+kcnxcfg=1,“gprs”,“your-APN” //Set GPRS parameter

OK
at+ktcpcfg=1,0,“google.com”,80 //Set IP address and port. It returns session ID

+KTCPCFG: 1

OK
at+ktcpcnx=1 ======= Initiate the connection

OK

Thanks

Thank you for your reply. I have been trying this and I am finding that when I send AT+CGATT=1 the module responds with ERROR.

Hi @andy.link,
Since your module cannot attach PS so it fails to initiate TCP connection. Please check your SIM following
1- Check whether your SIM is ready at+cpin?

+CPIN: READY

OK

2- Check GPRS Network Registration Status

AT+CGREG?
0: Not registered, ME is not currently searching an operator to register to.
The MS is in GMM state GMM-NULL or GMM-DEREGISTERED- INITIATED.
The GPRS service is disabled, the MS is allowed to attach for GPRS if requested by the user.
1: Registered, home network
The MS is in GMM state GMM-REGISTERED or GMM-ROUTING-AREA- UPDATING-INITIATED INITIATED on the home PLMN.
2: Not registered, but ME is currently trying to attach or searching an operator to register to.
The MS is in GMM state GMM-DEREGISTERED or GMM-REGISTERED- INITIATED. The GPRS service is enabled, but an allowable PLMN is currently not available. The MS will start a GPRS attach as soon as an allowable PLMN is available.
3: Registration denied
The MS is in GMM state GMM-NULL. The GPRS service is disabled, the MS is not allowed to attach for GPRS if requested by the user.
4: Unknown
5: Registered, roaming
The MS is in GMM state GMM-REGISTERED or GMM-ROUTING-AREA- UPDATING-INITIATED on a visited PLMN.

2- If your SIM has not been attached to network. Please try
Check Operator selection:

at+cops?

+COPS: 0,0,“Your operator”

OK

If your module is not registered. Please set Operator selection automatic as below command
AT+COPS=0 then check again
AT+COPS?
In other hand, Please make sure your SIM is not running out of cash. That reason makes your module fails to attach PS :slight_smile:
Please feel free share any concern and tick Solution if your question is answered
Thanks

Hi,

Thanks for your reply.

at+cpin?
returns
+CPIN: READY
OK

at+cgreg?
returns
CGREG:0:2
OK

at+cops?
returns
+COPS:0
OK

Then if we send
at_cops=0
returns
+COPS:0,0,“Vodafone UK”

It seems we have a connection to the operator. It still fails to make a TCP connection after this.

It seems strange that the non-gps version HL6528RD-2.8 works 100%, but if I replace the module in the same PCB with the gps version HL6528RD-G2.8 it fails to create the TCP connection. Are there any differences between the 2 modules that affect normal GPRS comms?

Hi @andy.link,
I would like to clarify here. The main issue is your module cannot register to network so you fail to initiate TCP connection
From your CGREG response: CGREG:0:2. It means the module has not registered, it is trying to attach or searching an operator to register to
The error may be caused by: Band or APN is set incorrectly
Please try below commands and share your result:
at+creg?

+CREG: 1,1 //This result shows that your module success to register 2G network

OK
at+cgreg?

+CGREG: 1,1 /////This result shows that your module success to register GPRS

OK
If your module shows different from abow. Please check band as below command
AT*PSRDBS?

*PSRDBS: 29 ////If this value is set, your module is going to use all supported bands (include: band 1,2,4,8,16).

OK
The operator (Vodafone)that you’re using working on band 8. If your module is not set band =8 or 29. Please change it by command:
AT*PSRDBS=1,29 (or AT*PSRDBS=1,8). Recommend, you set at+cops=0 already

If you still get the same error after changing band. Please check APN as below command. The APN should be the correct value. You can compare this value with the module HL6528RD-2.8 which is working fine

at+cgdcont?

+CGDCONT: 1,“IP”,“your-APN”,“0.0.0.0”,0,0

OK
The last thing, don’t forget input your antenna into your dev kit
Please feel free if you have any concern and tick solution if your question is answered
Thanks

1 Like

Hi Vianney,

Thanks for your reply. Here are the results:

at+creg?
+CREG:0,2
OK

at+cgreg?
+CGREG:0,2
OK

…so it looks like not registering.

AT*PSRDBS?
*PSRDBS: 29
OK

I will continue on Monday…

Hi,

I have more information that may shed some light on this:

a) after issuing the commands as per my first post (as follows)
AT&K3
AT+KCNXCFG=1 …
AT+KTCPCNX=1
AT+KCNXTIMER=1…
AT+KTCPCNX=1
I am then waiting for the +KTCP_IND response (TCP Status) from the module before I continue to send it data. This (+KTCP_IND) is the unsolicited response and is always received when using the HL6528RD-2.8, but never received when using the HL6528RD-G2.8. I am receiving the “OK” after the AT+KTCPCNX=1, but then I don’t receive the +KTCP_IND on the HL6528RD-G2.8 .

b) given the above, I changed my code to issue the send command and then send the data block. This resulted in a successful post of the data to the server via the TCP.

So, I guess my question is: why do I not receive the +KTCP_IND from the GPS enabled HL6528RD-G2.8 device?

I really appreciate your help so far Vianney. Do you know why this variation betwen models could be happening?

…and additionally a further problem encountered:

now that the TCP connection is successful and we are posting data, I can see the data on the Microsoft Azure server, so I know for sure it is there, however the Azure server returns a string of data back to the GPRS module via the open connection. But with the GPS enabled module it does not.

Normally after the:
CONNECT
…Data send …
OK

… I would receive +KTCP_DATA:1,number of bytes returning

This is not received on the GPS enabled module, but it is on the non GPS module.

So - it seems that the module is not responding as it should. As detailed in my previous post, the +KTCP_IND is not received and nor is the +KTCP_DATA response. Why would this be?

in short: I am not receiving “unsolicited notifications” from the module, which is where the problem lies.

Hi @andy.link,

It looks like URC from protocol has been not enabled on your device. Please follow the procedure
Check URC enable:
at+kurccfg?

+KURCCFG: “TCPC”,1,1
+KURCCFG: “TCPS”,1,0
+KURCCFG: “UDPC”,1,1
+KURCCFG: “UDPS”,1,1
+KURCCFG: “FTP”,0,0
+KURCCFG: “HTTP”,0,0
+KURCCFG: “HTTPS”,0,0
+KURCCFG: “POP3”,0,0
+KURCCFG: “SMTP”,0,0
+KURCCFG: “CNX”,0

OK

Let enable it as below then you will get URC

at+kurccfg=“TCPS”,1,1

OK
at+ktcpcfg=1,1

+KTCPCFG: 1

OK
at+ktcpcnx=1

OK

+KTCP_IND: 1,1

You can refer to the link to download relating document. The information that you need is under 18.8.3. +KURCCFG Command: Enable or Disable the URC from Protocol https://source.sierrawireless.com/resources/airprime/software/airprime_hl6528rdx_at_commands_interface_guide/#sthash.DShgNtZB.dpbs
Please share any concerns you have. Help us tick Solution if your question is answered
Thanks

Fantastic! problem solved. Thanks so much.

The solution was that

+KURCCFG: “TCPC”,1,0 needs to be +KURCCFG: “TCPC”,1,1
so by issuing

at+kurccfg=“TCPC”,1,1

it turns the client TCP service on. Now it works perfectly.