I'm trying to transmit binary data using Ai-Thinker A6 GPRS module.The problem is that it does not support the AT+CIPSEND=[length] command (looks like a firmware bug). If you use a simple AT+CIPSEND command without length, CTRL-Z (also as a zero byte) is interpreted as input completion, which means that, for example, not all numbers can be passed as data. I did not find any information about escaping in these commands. What can I do with this?
In addition to that, be advised to check examples from this link too [link3].
Example bellow is just a fragment copied/edited from this page, so I believe that can be good starting point. Be advised not to use specific commands related to the manufacturer in order to keep yours code reusable.
GPRS users can activate or deactivate a socket. Then user can establish a TCP or UDP connection to a remote server using the AT command tester.
Once a TCP or UDP connection is established through a socket, users can use other application services such as HTTP, FTP, SMTP etc.
Command: AT+CREG? Success Result: +CREG=1,1 OK Note: This means the SIM is ready and has connected to the network. Command: AT+CGATT? Response: +CGATT: 1 Note: Check if the SIM has Internet access. Command: AT+CIPSTATUS Response : OK Note: Query the IP settings. Command: AT+CIPMUX=0 Response: OK Note: Configure modem to make a single port open for connections. Command: AT+CSTT="www.server.com","","" Response: OK Note: Connect to Internet (Parameters are as follows; "APN","USERNAME","PASSWORD", have in mind that both the Username and Password are blank in the above instance. Command: AT+CIICR Response: OK Note: Bring up wireless network. Ensure that the modem has a SIM with credit and/or has a data plan is activated. Command: AT+CIPSTART="TCP","584.287.743.894","80" Response: OK CONNECT OK Note: Make a TCP Connection to the server at 584.287.743.894 on Port 80, the Default TCP and HTTP port. Command: AT+CIPSEND Response: > Note: This command allows you to make request of the server. You enter your request after the prompt (>). Commands may either be GET, PUT or POST. Each command has a specific manner in which the command is to be written. GET request to the server example is below. -------- GET /my_page.html HTTP/1.1 Host: 124.456.798:80 Connection: keep-alive .... Connection Successful! Command: AT+CIPCLOSE --------