HL8548 TCP server

Hi all,

I have two SIMs with static IP. When I configure the module as a TCP client, so it works fine. But when I configure a TCP Server, no Client can connect it. The SIMs works in an USB stick, made of Huawei, correct. Both SIM show the same behavior. Also at any time, the module responds to pings.

After power up:

+CREG: 2

+SIM: 1

+KSUP: 0

+PBREADY

+CREG: 1,“07DC”,“00707E85”,6

at&v

ACTIVE PROFILE:
E0 Q0 V1 X4 &C1 &D1 &R1 &S0 +IFC= 0,0 &K0 +FCLASS0
S00:0 S01:0 S03:13 S04:10 S05:8 S07:50 S08:2 S10:14
STORED PROFILE 0:
E0 Q0 V1 X4 &C1 &D1 &R1 &S0 +IFC= 0,0 &K0 +FCLASS0
S00:0 S01:0 S03:13 S04:10 S05:8 S07:50 S08:2 S10:14
STORED PROFILE 1:
E1 Q0 V1 X4 &C1 &D1 &R1 &S0 +IFC= 0,0 &K0 +FCLASS0
S00:0 S01:0 S03:13 S04:10 S05:8 S07:50 S08:2 S10:14

OK

at+kcnxcfg=1,“GPRS”,“xxx.xxx”

OK

at+ktcpcfg=1,1,12345

+KTCPCFG: 1

OK

at+ktcpcnx=1

OK

+KCNX_IND: 1,4,1

+KCNX_IND: 1,1,0

+KTCP_IND: 1,1

at+kcgpaddr

+KCGPADDR: 1,“XXX.XXX.XXX.XXX”

OK

can someone please tell me what I’m doing here maybe wrong?

Hi,
Are you getting any notification/error at the client side when you are trying to connect?
Is it working with any other SIM with dynamic IP?

Thanks,
Alex

Hi Alex,

THX for answer.
Yes, I have tryed with other SIMs. With and without static IPs and I’m sure all firewalls and NATs are removed at service provider. So the same SIMs are working in an USB-stick on any PC. But I’ve only the problem on HL8548 module at TCP server mode.
Clients throw after a short time of time out the exception error 10061.
That means:
“Connection refused.
No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.”

Hiya,

Have you ensured that the server and client on the HL8 are bound to different ports?

Just a thought…

ciao, Dave

Hi Dave,

Currently I need only a running server in the first steps.

thx
Willi

Hi,

Not actually seeing you starting up a sever when you have connected to the network.

I have attached a teraterm script (rename it to ttl) I have used in the past to create a socket on the HL8.

Regards

Matt
HL8 IP socket server.txt (794 Bytes)

Hi Matt,

Thx for script. But the server mode is not working as before.

ati
HL8548
OK
at+cgmr
RHL85xx.5.5.8.0.201411141939.x6250_1
OK
at+cops?
+COPS: 0,0,"3 AT",2
OK
at+creg?
+CREG: 0,1
OK
at+cgreg?
+CGREG: 0,1
OK
at+csq
+CSQ: 18,99
OK
at+cimi
232106605194612
OK
at+kcnxcfg=1,"GPRS","static.drei.at"
OK
at+cgdcont=1,"IP","static.drei.at"
OK
at+ktcpcfg=1,1,,5001
+KTCPCFG: 1
OK
at+ktcpcnx=1
OK
+KCNX_IND: 1,4,1
+KCNX_IND: 1,1,0
+KTCP_IND: 1,1
at+kcgpaddr
+KCGPADDR: 1,"77.246.119.226"
OK

Now I have soldered a second pcb and see the same behavior. All functions, except the server mode, work well. When I try to connect to HL8 from an Winsocket client, client report error 10061. When I try from one HL8, configured as client, to connect to the other HL8, configured as server, client report this:
+KCNX_IND: 1,4,1
+KCNX_IND: 1,1,0
+KTCP_NOTIF: 1,5
+KCNX_IND: 1,5,30
+KCNX_IND: 1,3

The message +KTCP_NOTIF: 1,5 says there is a server found but I can not connect to him.

I do not understand why…

First thing you have to do is get the unit upgraded to the commercial firmware, there were some big improvements between 5.5.8 and 5.5.14 (which is the commercial release).

http://source.sierrawireless.com/resources/airprime/software/hl8548-firmware-5,-d-,5,-d-,14,-d-,0/#

Regards

Matt

THX mlw for hint.

After upgrade, TCP-Server mode is now working.

I am surprised that unaudited firmware has left the factory. Because a faulty TCP server is a big lack. Which is the same as if cars are delivered which can only turn left and not turn right and nobody notices it.

Where is a list of histories?
Where is a errata sheet?
That would have saved time and money.

:frowning:
Willi

Hi,

The unit you had was obviously an early sample, the 5.5.8 firmware was a pre release version.

There are currently no release notes available because there is a single commercial version 5.5.14 at the moment, this is what all future release notes will be using as a reference re change description.

Regards

Mat

… and now the next problem.

Conditions:
Best RF quality
Actual firmware 5.5.14
No handshake on Serial
No sleep mode
Logfile after power up

at
OK

at+cmee=2
OK

at+creg=0
OK

at+creg?
+CREG: 0,1
OK

at+kpattern="^^"
OK

at+kcnxcfg=1,"GPRS","xxxxx.xxx"
OK

at+ktcpcfg=1,1,,18000,,1
+KTCPCFG: 1
OK

at+ktcpcnx=1
OK
+KTCP_IND: 1,1

at+kcgpaddr
+KCGPADDR: 1,"xxx.xxx.xxx.xxx"
OK

+KTCP_SRVREQ: 1,2,"xxx.xxx.xxx.xxx",2079   <--- client connect to HL8
+KTCP_DATA: 2,2,#A                         <--- and send data
at+ktcpsnd=2,3                             <--- I send back to client
CONNECT
ack^^
OK                                         <--- after sending I get a OK
+KTCP_NOTIF: 2,4                           <--- after client has received,
                                                the client closes connection
at+ktcpclose=2                             <--- and I close the session
                                           <--- I miss a OK !!!

+KTCP_SRVREQ: 1,2,"xxx.xxx.xxx.xxx",2090   <--- this session was still ok.
+KTCP_DATA: 2,2,#A
at+ktcpsnd=2,
CONNECT
ack^^
OK
+KTCP_NOTIF: 2,4
at+ktcpclose=2
OK

+KTCP_SRVREQ: 1,2,"xxx.xxx.xxx.xxx",2091
+KTCP_DATA: 2,2,#A
at+ktcpsnd=2,3
ack^^
CONNECT
ack^^
OK
                                           <--- but in this session serial
                                                output seems to stuck for ever


                                           <--- I try to send a "AT" on serial
OK                                         <--- and HL8 answer with "OK"
+KTCP_NOTIF: 2,4                           <--- and suddenly HL8 has sent the
                                                lost notification
at+ktcpclose=2                             <--- now I could close the session
OK

+KTCP_SRVREQ: 1,2,"xxx.xxx.xxx.xxx",2319   <--- this session is still working ok.
+KTCP_DATA: 2,2,#A
at+ktcpsnd=2,3
CONNECT
ack^^
OK
+KTCP_NOTIF: 2,4
at+ktcpclose=2
OK

+KTCP_SRVREQ: 1,2,"xxx.xxx.xxx.xxx",2320
+KTCP_DATA: 2,2,#A
at+ktcpsnd=2,3
CONNECT
ack^^
OK                                         <--- already client has received the 
                                                reply and has closed connection
                                           <--- here HL8 gets stuck and does not
                                                write any message more !!!

                                           <--- at this time I tried to connect 
                                                with client again
                                           <--- client has connected to HL8 and
                                                has send message properly but HL8
                                                does not output any information
OK                                         <--- only when I have sent "AT" HL8
                                                starts output again
+KTCP_NOTIF: 2,4                           <--- and sent the missing notification
+KTCP_SRVREQ: 1,3,"xxx.xxx.xxx.xxx",2448   <--- and sent all other missed events
+KTCP_DATA: 3,2,#A

I think, I need urgent support from Sierra.
Because my development time expires and I will be in default of delivery.

Ok so there are a few things here. For real support (as opposed to me playing on the forum) you need to go through your commercial channel which I presume is a Austrian/German distributor given your location?

Over what period of time are you sending the commands? I presume they are automated so the commands and responses are pretty immediate? Do you have any form of settling time implemented? Since the comms are so much slower than a micro can react it is generally a good idea to have some form of delay.

Re the sequence, there are a few things.

  • The first issue you see where you send at+ktcpclose=2 after receiving the termination from the other side might be causing issues, you need to take note of the unsolicited response, it might be that the reason you do not get the response is because by sending the command you could be triggering the unit to send it own termination out which it is waiting for something back hence the OK later because it has timed out. Difficult to say without timings. Good test would be to send the at+ktcpclose=2 wait for the OK and see of it is a specific time i.e. 64 seconds.
  • For the at+ktcpclose=2 use the second paramter just for good measure.
  • For the second session which seems ‘stuck’ it is unfortunate that you are using OK as a response from the server as there is no way to determine if this OK is from the server or the unit to indicate it has come out of data mode, monitoring DCD is the best way to do this. Since you have set the escape sequence to ^^ it may well be getting out and the OK you are seeing is from the unit.

Anyway that my best guesses at the moment as to what is happening.

Regards

Matt

HL8548 supports only friendly close and it is not necessary to specify a 2nd Parameter.

Now I have a new firmware version of this bug has been fixed. A new feature is also there that you do not need more close command after the notification because of the HL8548 session now closes itself.

When I discover something else then I’ll add it here.

What version number is the new release you are referring to?

Regards

Matt

I just test version 5.5.17. Is running smoothly for days. Is on best way to become a release candidate.