I have a SIM5360 module, with a Vodafone card, and I would like to connect to some web services, to send and receive data in JSON format, which I have implemented on an AWS server.
To execute the AT Commands I use the Putty tool.
I tried to do it first using HTTP functions with the following calls:
AT+CHTTPACT=”XX.XXX.XXX.169″, 8080<CR>
+CHTTPACT:REQUEST
GET /XXXDWP/rest/user/list HTTP/1.1<CR><LF>
Host: XX.XXX.XXX.169:8080<CR><LF>
Content-Type: application/json<CR><LF>
Accept: */*<CR><LF>
<CR><LF>
<CR><LF>
<SUB>
<Ctrl + Z>
Other examples:
GET /XXXDWP/rest/user/list HTTP/1.1\r\nHost: XX.XXX.XXX.169:8080\r\nAccept: */*\r\nContent-Type: application/json\r\n
GET /XXXDWP/rest/user/list HTTP/1.1 Host: XX.XXX.XXX.169:8080 Accept: */* Content-Type: application/json
But the result of my calls is always:
+ CHTTPACT: 227
I have also tried to do it using TCP functions with the following calls:
AT+NETOPEN
AT+CIPOPEN=0,”TCP”,”XX.XXX.XXX.169″,8080
AT+CIPSEND=0,
>GET /XXXDWP/rest/user/list HTTP/1.1<CR><LF>
Host: XX.XXX.XXX.169:8080<CR><LF>
Content-Type: application/json<CR><LF>
Accept: */*<CR><LF>
<CR><LF>
<CR><LF>
<SUB>
<Ctrl + Z>
Other examples:
>GET /XXXDWP/rest/user/list HTTP/1.1\r\nHost: XX.XXX.XXX.169:8080\r\nAccept: */*\r\nContent-Type: application/json\r\n
>GET /XXXDWP/rest/user/list HTTP/1.1 Host: XX.XXX.XXX.169:8080 Accept: */* Content-Type: application/json
But the result of my calls is always:
……..
http/1.1 400 bad request
server: apache-coyote/1.1
transfer-encoding: chunked
……..
If someone could give me a hand and give me the steps to follow to correctly configure the SIM5360 and be able to make GET / POST calls to the server.