1

I am using GPRS GSM A6 with arduino uno to post data to web server. After sending AT commands to module I get OK response after every command,

AT+CIPMUX=0
OK
AT+CGATT=1
OK
AT+CSTT="internet","",""
OK
AT+CIICR
OK
AT+CIFSR
10.65.87.210
OK
AT+CIPSTART="TCP","xxx.xxx.xxx.xxx", 80
CONNECT OK
OK
AT+CIPSEND
> POST http://xxx.xxx.xxx.xxx/Code/ HTTP/1.1
Host: xxx.xxx.xxx.xxx
Content-Type: application/x-www-form-urlencoded
Content-Length: 18
Data=GPS Data Sent
AT+CIPCLOSE
> 

To terminate AT+CIPSEND you have to send CTRL-Z. I am sending CTRL-Z using this statement in code,

Serial.write(0x1A)

But the module doesnot respond to this, and treats the next command (AT+CIPCLOSE) as data.

Please Help... Thanks in Advance!!!

asked Jan 9, 2018 at 19:44
1
  • Also just so you know x-www-form-urlencoded requires + instead of spaces and any non-alphanumeric characters must be percent encoded en.wikipedia.org/wiki/Percent-encoding Commented Jan 10, 2018 at 2:44

3 Answers 3

1

RTFM: https://github.com/espressif/esp8266_at/wiki/CIPSEND

You need to close the input steam with "+++" to return to command mode.

answered Jan 10, 2018 at 2:39
0

To terminate AT + CIPSEND just apply the next command:

Serial.write(26);

or

gsm.write(26);

where gsm is the UART channel of gsm module.

answered Jan 30, 2018 at 14:53
0

You can use AT+CIPSEND= instead of AT+CIPSEND

answered Mar 3, 2024 at 18:21

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.