Cellular Modem library development

[Update: Apr-17-2012]

I have a working library for initializing AT-command compatible modems for TCP/IP over cellular.


Protocols: TCP and UDP (both work)

Mode: Transparent Bridge

Rate: 57600 baud

GCS tested: MP and QGCS

HW: APM1 tested, (APM2 testing soon)

Modems Tested: DroneCell (SIM900D module) and Arduino GSM Shield (SIM900 module)

Development continues...

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Andreas, thanks for the patch I would like to try it out with my Arduino Sim900 GSM shield. Unfortunately I'm a bit new with GIT and was wondering if you could point me to somewhere to find out how to convert your patch to code? Earlier the year I started experimenting with connecting an Arduino UNO with the GSM shield to the APM1 through a I2C connection. The setup was chosen to free the APM1 from delays while communicating with the GSM shield. I assume you connect the GSM shield directly to an APM1 serial port?

  • DroneCell has arrived in SATX, so I'm ready for testing.


  • Recently found this

    Could this possible be a new way of thinking? as it includes a camera on the shield itself, and is arduino compatible.
    And best of all, the first 3G shield...

  • Developer

    Latest code, is as a series of three patches on the current code from git. Once installed, change the values in Cellular_Modem.h to match your SIM card and IP address, compile and run on the APM1.

    The code will initialize the modem, set up a TCP or UDP connection to the IP address/port you specified and start sending and receiving telemetry at 57600 baud. It takes about a minute from groundstart before you see packets flowing over the Internet. 

    There's about 1-2 second latency, but no packet loss.



  • Developer

    UPDATE: Here is the first attempt at a library. It is a patch against the most recent commit (as of today), and will apply to ArduCopter *only* (not ArduPlane yet, though it should be trivial to add to ArduPlane). 

    The library will send init strings to the modem to establish a transparent connection. The SIM-specific and network-specific parameters (like destination IP), have to be added to the code for now (there is no configuration interface yet).

    The patch creates a directory and two files, under libraries/Cellular_Modem and adds a few lines to ArduCopter.pde and system.pde to call the library on startup. 

    DISCLAIMER: This is early ALPHA. If it works for you it is a miracle! 

  • Developer


    I think that GSM/GPS tracker *will* work!!

    It seems to be just a GSM/GPRS quad band modem.

    Can you find an AT command set manual?

    Can you see if it has serial pins or pads somewhere? Like "TX", "RX"?

    From the manufacturers specs, it is a full cellphone and supports voice calls, so it must have a serial console somewhere for AT commands. If it does and you can connect it, it will work!

    Ask the manuf. for an AT-command manual and we are in business. If they can't help you, look at the GSM chip (probably on the underside from the photo you sent), and see the model number and brand. It might be a common module like a Telit or SIM800 or something, in which case there will be lots of manuals. If you do not find a manual, we could try standard AT commands and see what happens.

    I can't see from the photo.

  • Developer

    Got the basic init script for "Transparent mode" UDP forwarding on the DroneCell working.

    I also have it incorporated into the APM code so that it happens on startup, cleanly and automatically. 

    DroneCell is responding and setting up the UDP "connection" (yeah, I know...). 

    Possible first field test this weekend

    Is there anyone in this group who has a DroneCell and wants to help with testing?

  • If you look at the developers website of drone cell, he has sketches for tcp/ip and all the like... I would start there... also arduino has some good code snippets on their website... 

This reply was deleted.