web analytics
July 20, 2015

Sim908 – Introduction

header_sim908

The Sim908 module can do phone things. It connects to the provider with the help of the sim card, to then make use of the provider network. The GPRS allows you to call, text and generally perform data packet sending and receiving. Included is also a GPS module, with which you can read your coordinates and other information provided by the GPS satellites orbiting the earth.

 

sim908_components

Setting up

Before you can make full use of the module, a sim card has to be inserted and the antennae need to be connected.

Slide the sim card holder open and slide the card inside. Make sure to insert the card in the right orientation: the contacts must face the contacts of the holder when closed, and the notch of the card has to line up. Close the holder and slide the lock back. sim908_card
Connecting the GSM and GPS antenna can be difficult, because the connectors have to line up perfectly. Press against the connector firmly until it clicks shut. Labeling on the sim908 shows what connector is GPS/GSM. The flat antenna is the GSM, the bigger fatter antenna is GPS. sim908_antennae
To safely connect the antenna without risking damage to the screen, hold the Phoenard in one hand supporting by the edges, and press down on the connector with the other hand. Do not press on the connector with the screen laying on a rough surface. sim908_connectorpress

 

Disclaimer

Before we move into what this module can do, we should first inform you of the things you should not do. Your telecom provider has terms of use you need to abide. There are local or federal laws that restrict your use of the module that might apply. In particular, be careful when building auto dialers or other automations that have the potential to ‘spam‘. As well, make sure to limit the amount of text messages sent by the program, since spam might result in a huge phone bill. This can happen accidentally as well while debugging. Adding a long delay after sending a text message comes a long way preventing such trouble.

We are not responsible for any (financial) damages, legal issues or otherwise resulting in your use of this module and software. Please read the license terms before use.

 

Software Library

The Sim908 is controlled using Serial AT-Commands, for which the Phoenard library includes a basic implementation. Everything is based around the sendATCommand key function, which can be used to execute any of the AT Commands available. A full list of AT Commands can be found in the manual. Below is a basic code example showing this function in action:

#include "Phoenard.h"

void setup() {
  // Start Serial
  Serial.begin(9600);
  
  // Start up the SIM, wait for it to initialize
  sim.begin();

  // Send the AT test command, check if it succeeded
  if (sim.sendATCommand("AT")) {
    Serial.println("AT Successful");
  } else {
    Serial.println("AT Failed");
  }

  // Read the sim pin status into a buffer of characters
  char responseArr[200];
  if (sim.sendATCommand("AT+CPIN?", responseArr, sizeof(responseArr))) {
    Serial.print("Pin status: ");
    Serial.println(responseArr);
  } else {
    Serial.println("Failed to read pin status");
  }
}

void loop() {
}


For basic operation, you don’t have to use any AT Commands at all. The library includes many functions that you can use right away, with the command formatting done for you. Software documentation can be found here.

  • Receiving, reading and sending text messages (read more…)
  • Receiving and starting voice calls
  • Reading sim status information
  • Reading and writing sim contacts