Hi
Can anyone advise me on how to connect to a website subdirectory using the A6 board? I have searched extensively online but cannot find an answer.
For example, this is a website I would want to connect to:
https://forum.arduino.cc/**index**
Thanks for your help
These are the commands and responses when I successfully connected to Google:
at+cipstatus
+CIPSTATUS:0,IP INITIAL
1,IP INITIAL
2,IP INITIAL
3,IP INITIAL
4,IP INITIAL
5,IP INITIAL
6,IP INITIAL
7,IP INITIAL
OK
at+creg?
+CREG: 1,5
OK
at+cgatt?
+CGATT:0
OK
at+cgatt=1
OK
at+cgdcont=1,IP,hologram
OK
at+cgact?
+CGACT: 0,0
OK
at+cgact=1,1
OK
at+cipstatus?
+CIPSTATUS:0,IP GPRSACT
1,IP INITIAL
2,IP INITIAL
3,IP INITIAL
4,IP INITIAL
5,IP INITIAL
6,IP INITIAL
7,IP INITIAL
OK
at+cipstart=TCP,google.com,80
CONNECT OK
OK.
From my research, I have heard you have to do an HTTP 'GET' request to go to a subdirectory, but I don't understand how.
For example, if I wanted to get to Google Maps from the above code, how would I do that?
all these run in setup() after your gsm initializes
AT+CGATT=1
AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"
AT+SAPBR=3,1,\"APN\",\"internet\" // 'internet' is your ISP APN
AT+SAPBR=1,1
AT+HTTPINIT
AT+HTTPPARA=\"CID\",1
you need to add 2 secs delay to each AT and have some error checking after each print
and these run somewhere in your loop()
AT+HTTPPARA=\"URL\",\"http://mywebsite.com // here goes your website URL from which page data is to be polled
AT+HTTPACTION=0 // send get request, give enough delay here , downloading...
AT+HTTPREAD // read the downloaded data
again you need to provide some error checking function after each serial print
refer to sim A6 gsm modem AT doc to understand what each of the above commands really mean