-1

I am trying to connect GPRS GSM A6 to arduino. Everything works fine, but there is a slight problem. And its that AT+CIPSTART only accepts IP or domain name.

For example this,

AT+CIPSTART="TCP", "xxx.xx.x.xxx", 80

works fine, Or this,

AT+CIPSTART="TCP", "www.google.com", 80

also works fine, but what I am looking for is something like this.

AT+CIPSTART="TCP", "xxx.xx.x.xxx/trackerCode/", 80

That is I want to specify directory along with the ip. But it does not allow me to do this and returns a +CME Error. Is there a way to do this?

Muzahir Hussain
  • 1,009
  • 2
  • 16
  • 35

1 Answers1

1

The only way would be direct support in your GPRS module firmware. So start with available AT commands with something like HTTP in it.

If there is none, you have to send HTTP request over TCP connection openned by examples 1 or 2. How the HTTP protocol looks like is defined in RFC 2612. Request name, path and http version on the first line are mandatory, few more headers might be needed (for the server with virtual domains it'll be Host header)

And line endings must be "\r\n"

Community
  • 1
  • 1
KIIV
  • 3,534
  • 2
  • 18
  • 23