# \[8548-G\] http sample code

**URL:** <https://forum.sierrawireless.com/t/8548-g-http-sample-code/7590>\
**Category:** Legacy HL Series\
**Created:** [November 27, 2014, 8:54am UTC](https://forum.sierrawireless.com/t/8548-g-http-sample-code/7590 "2014-11-27T08:54:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![janeczko](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@janeczko](https://forum.sierrawireless.com/u/janeczko)\
**Post date:** [November 27, 2014, 8:54am UTC](https://forum.sierrawireless.com/t/8548-g-http-sample-code/7590/1 "2014-11-27T08:54:07Z")

</div>

Hi,

the Hilo starter development tool (V1.9.5 & V 1.9.11.0) used an old script originally write for HL6528.  
So we can’t test the http feature because script timeout after

```auto
+CME ERROR: 916
```

of the command

```auto
AT+KCNXCFG=0,"GPRS","APN","username","password"\r
```

because of the first parameter “0” who can’t be accept by HL8548.  
And the “AirPrime\_HL6\_and\_HL8\_Series\_AT\_Commands\_Interface\_Guide\_Rev7\_0.pdf” give sample for the HL6528 with the same problem.  
Can you tell me where to find examples of the use of http ?

Regard,

---

<div class="post-metadata">

**Author:** ![krima919](https://avatars.discourse-cdn.com/v4/letter/k/94ad74/32.png) [@krima919](https://forum.sierrawireless.com/u/krima919)\
**Post date:** [November 27, 2014, 10:31am UTC](https://forum.sierrawireless.com/t/8548-g-http-sample-code/7590/2 "2014-11-27T10:31:04Z")

</div>

Take a look in the at command guide section 20.10. There is an example for http client. Of course you need to change the the first parameter of the AT+KCNXCFG command to 1.

---

<div class="post-metadata">

**Author:** ![janeczko](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@janeczko](https://forum.sierrawireless.com/u/janeczko)\
**Post date:** [November 27, 2014, 10:54am UTC](https://forum.sierrawireless.com/t/8548-g-http-sample-code/7590/3 "2014-11-27T10:54:13Z")

</div>

It’s not enough. 8548 block after AT+KHTTPHEADER=1. I tried with different servers and the same thing happens. Any idea ?  
My logs:

```auto
SET Flow Control: Hardware

+GPSEVINIT: 1
AT&K3

OK
AT+KCNXCFG=1,"GPRS","orange.fr","orange","orange"

OK
AT+KCNXTIMER=1,60,2,70

OK
AT+KCNXPROFILE=1

OK
AT+CPIN="0000"

OK
AT+CGATT=1

+CME ERROR: 148
AT+KHTTPCFG=1,"www.google.com",80,1

+KHTTPCFG: 1
OK

+KCNX_IND: 1,4,1

+KCNX_IND: 1,1,0

+KHTTP_IND: 1,1
AT+KHTTPHEADER=1

CONNECT
```

---

<div class="post-metadata">

**Author:** ![krima919](https://avatars.discourse-cdn.com/v4/letter/k/94ad74/32.png) [@krima919](https://forum.sierrawireless.com/u/krima919)\
**Post date:** [November 27, 2014, 11:51am UTC](https://forum.sierrawireless.com/t/8548-g-http-sample-code/7590/4 "2014-11-27T11:51:37Z")

</div>

Using this command will switch at command port to data mode so it is not possible to use at commands. See the comment in the example below:

Set the header of the request  
CONNECT Send HTTP data after “CONNECT”. Do not  
forget the PATTERN characters. For  
example :  
“Data flow  
–EOF–Pattern–"
