I am trying to send a HTTP GET operation using the SIM5218 modem via 3G. I have already managed to send that request while using minicom. Here is the command I used :
at+netopen=,,1
at+chttpact="mywebsite.com",80
GET /myscript.py?var=varTest HTTP/1.0
<ctrl-m><ctrl-j><ctrl-m><ctrl-j> <ctrl-Z>
Now I want the SIM5218 to do the same request with a lua script.
printdir(1)
str='GET /myscript.py?var=Testlua HTTP/1.0\r\n\r\n'
sio.send('at+chttpact="mywebsite.fr",80')
rtc=sio.recv(5000)
sio.send(str);
sio.send(string.char(0x1A))
sio.send(string.char(0x00))
rtc=sio.recv(5000)
print(rtc);
This is not working, I know that I have to send my GET in a different way but I don't know how.
Thanks in advance.