This example shows how to send http requests with a GSM shield. I've tested it on a shield with SIM900 module. This can be very interesting for outdoor IoT solutions where there is no local network.
There are no special libraries involved. The communication with the GSM shield is done by sending AT commands.
I've used an Arduino Mega which have more memory available.
Clicking on a connected button causes the Arduino to send a http request to Firebase push service.
The connections are:
5v and gnd (same pins on the shield)
- Arduino 10 to shield 7
- Arduino 11 to shield 8
(pins 7 and 8 on the Mega cannot be used with SoftwareSerial)
Getting the right sequence of commands was more difficult than expected. You can see it in the GSM module.
You need to update the APN value which should be provided by mobile network provider.
The module sends a POST request. You can change the main code to send a different message to different servers based on your needs.
The AT commands are documented here: http://simcom.ee/documents/SIM900/SIM900_TCPIP_Application Note_V1.02.pdf
There are no special libraries involved. The communication with the GSM shield is done by sending AT commands.
I've used an Arduino Mega which have more memory available.
Clicking on a connected button causes the Arduino to send a http request to Firebase push service.
The connections are:
5v and gnd (same pins on the shield)
- Arduino 10 to shield 7
- Arduino 11 to shield 8
(pins 7 and 8 on the Mega cannot be used with SoftwareSerial)
Getting the right sequence of commands was more difficult than expected. You can see it in the GSM module.
You need to update the APN value which should be provided by mobile network provider.
The module sends a POST request. You can change the main code to send a different message to different servers based on your needs.
The AT commands are documented here: http://simcom.ee/documents/SIM900/SIM900_TCPIP_Application Note_V1.02.pdf
Attachments
Last edited: