Connect Your Arduino To Cellular Via Hologram’s Network

/ Written By Pat Hogan

NOTE: An updated version of this tutorial is available in our Documentation.

So far we’ve written a couple tutorials for connecting your Raspberry Pi and BeagleBone to a cellular network. Behold, the final microcontroller in this epic three part series: the Arduino.

If you backed our Kickstarter, you’re probably aware that we offered an Arduino package. For those that selected that package, this is the tutorial for you – taking you from out-the-box, to requesting web pages over cellular, all in a single how-to.

Some differences between the Arduino and BeagleBone/Raspberry Pi:

  • The Arduino communicates via a USB A to B cable (provided in Kickstarter package), not via micro-USB or SD card.
  • The provided cell modem comes as a separate GPRS shield that mounts completely on top of the Arduino, it’s not connected as a USB peripheral.

A major caveat I came across in my testing:

  • The power consumed by the GPRS shield, in conjunction with the Arduino, may exceed the available power provided by USB connection alone – especially during spikes of cellular activity. This would cause my GPRS shield to power off in the middle of HTTP requests on some occasions. As a result, we will be providing a 12V 1A power adapter in each Arduino package, which should be more than enough to satisfy any power-hungry Arduino projects, while being within the limits of recommended power specifications.


Items with a * are included in the Konekt Dash Kickstarter Arduino Maker Kit


Note: If you are using a different cellular shield than the one provided in our Kickstarter package, these instructions should still be compatible, so long as the modem can be controlled using the standard AT command set: GSM 07.07 & 07.05 and Enhanced – SIMCOM AT Commands.

  1. Unpack your beautiful new hardware
  1. Register your SIM on the portal here
    • The SIM number is the long number printed on the back of the white card (also printed directly on the SIM itself).


  1. Punch out the Konekt SIM and slide it into the slot on the back of the GPRS shield
    • To open the slot, you may need to slide the case slightly horizontal, in the direction of the “OPEN” arrow.
    • Make sure the SIM is inserted so that the metal connectors will touch when the case is closed.
    • After shutting the case, make sure to lock it by sliding it slightly horizontal in the direction of the “LOCK” arrow.

    arduino_sim_open arduino_sim_close

  1. Stack and connect the GPRS shield on top of the Arduino
    arduino_stack_open arduino_stack_close
  1. Connect your computer to the Arduino via USB
    • A green light should illuminate on top of the GPRS shield.
    • You may also want to plug in the power adapter at this time.


  1. Power on the GPRS shield (tiny button on the side)
    • Hold the button down for 2 seconds, then release. A red light will illuminate to tell you that the shield is on.
    • A green light will start flashing next to the red light, about once every second – this flash rate tells us that the device is attempting to connect to the cell network.
    • After about 5-10 seconds, the green light should slow down to a flash rate of about once every 3 seconds – this tells us that the device has connected to a cell network.

    button_off arduino_button_on

  1. Boot up the Arduino Software
    • For help getting the Arduino software up and running with your device, detailed step-by-step installation instructions can be found here.
  1. Copy and paste the demo sketch I’ve provided below
    • This is a modified sketch of the Seeed Studio GPRS source code example found here (reference this for an additional example of how to send an SMS). My modified sketch has simply filled in the Konekt APN and test url for you.
      • For additional modem debugging with AT commands, use the sketch here to manually enter troubleshooting commands found here.
    Note: this code is a demo for how to use a gprs shield to send
    an http request to a test website (using the Konekt APN).
    In order to communicate with the Arduino via terminal, make sure
    the outgoing baud rate is set to 19200, and that a carriage return
    is appended to the end of each command.
    Then, in order to initiate the demo http request, simply enter:
    'h' into the terminal at the top of the serial monitor.
    #include <SoftwareSerial.h>
    SoftwareSerial mySerial(7, 8);
    void setup()
      mySerial.begin(19200); // the GPRS baud rate
      Serial.begin(19200); // the GPRS baud rate
    void loop()
      // Input 'h' to run the test HTTP program
      if (Serial.available())
          case 'h':
      if (mySerial.available())
    // SubmitHttpRequest()
    // Note: the time of the delays are very important
    void SubmitHttpRequest()
      // Query signal strength of device
      // Check the status of Packet service attach. '0' implies device is not attached and '1' implies device is attached.
      // Set the SAPBR, the connection type is using gprs
      // Set the APN
      // Set the SAPBR, for detail you can refer to the AT command manual
      // Init the HTTP request
      // Set HTTP params, the second param is the website to request
      //Set the context ID
      // Submit the request
      // The delay is very important, the delay time is base on the
      // return time from the website, if the return data is very
      // large, the time required might be longer.
      // Read the data from the accessed website
      // Close the HTTP connection and display the data
    // ShowSerialData()
    // This is to show the data from gprs shield, to help
    // see how the gprs shield submits an http request.
    void ShowSerialData()
  1. Upload the sketch to the Arduino and open the serial monitor
    • Make sure the baud rate is set to 19200, with a carriage return appended to the end of each command.


  1. Enter ‘h’ into the terminal at the top of the serial monitor to run the test-HTTP script
  1. Watch your Arduino request our test http page over cellular connectivity!
    • Note: Some of the commands may take up to 10s to complete.
    • Final output should look something like this:
    +CSQ: 10,0
    +CGATT: 1
    <html><head><title>It works</titleAT+HTTPTERM

I hope this was helpful. As always, leave any comments or questions down below or on our community forum. You can also view all of our additional tutorials here. Thanks!

  • condew

    You can concatenate most but not all the AT commands with ‘;’; so fetching the konekt test page can be 2 commands:


    (This all goes on one line with no internal spaces or carriage returns.)

    This will immediately return “OK”. Then, after a few seconds, the sim900 will provide an unsolicited message, “+HTTPACTION:0,200,79”. At this point, issue the second command:


    This will give you the response “+HTTPREAD:79” followed by the actual retrieved data, “It worksIt works” and “OK”

    Fortunately, the sim900 doesn’t care whether the file contains valid html, so if you are providing a file for the arduino to fetch, you need not put all the standard html tags in it or even name it with a “.html”; a file containing only “It works” can be fetched just fine.

    Finally, you can skip programming the arduino and command the sim900 directly from your PC by popping the ATmega328 off the arduino and then just jumpering the sim900 differently. If the I/O jumper area pins are numbered like:

    2 4 6
    1 3 5

    For software serial, you’d connect 1 to 3 and 2 to 4 with the provided jumpers. To command the sim900 from your PC directly, use your own jumpers to connect 3 to 6 and 4 to 5. You can then use a tool like PuTTY to communicate with the sim900. I set PuTTY to 115,200 baud. Power up the sim900 with the button on the shield, then type “AT” followed by carriage return and you should get “OK” as a response.

    The sim900 comes to you in autobaud mode where it figures out the baud rate from the “AT”; but since it doesn’t know the baud rate you want to use, it doesn’t give you the status messages as the modem connects to the cellular network. Sending it the command “AT+IPR=115200” sets the baud rate to 115,200; and if you are listening at 115,200 the next time you power up the shield, you will get the trash characters the sim900 deliberately puts out followed by status like:

    +CFUN: 1
    +PACSP: 0
    Call Ready

    You should then check the connection further with commands like “AT+CREG?” and “AT+CSQ” before requesting a file.

    Note: When you set the baud rate with AT+IPR, the sim900 will remember the setting until you set it to something else, even if you power it off. “AT+IPR=?” will list your options. “AT+IPR?” will tell you the baud rate it’s set to, but only if you are already connected to it at that rate, so kind of silly to ask at that point.