I am starting to use a Seeeduino GPRS shield (please see note), which is essentially an Arduino Leonardo that, among other things, can be used as a mobile 'phone for sending and receiving texts. I have successfully tried the "blink an led" and "fade an led" sketches, so the compiling and uploading are ok

I am using a desktop computer with Linux Fedora 20.

Now I want to go on to use the cell phone network to communicate with my mobile 'phone. However I am puzzled by something I assume everybody else understands already, and that is the references to "select either software serial port or hardware serial port to be connected to GPRS Shield". Please could someone explain what "software or hardware serial port" is, in simple terms, or point me to a web site that does so? Do I need any wired connection with my PC other than the USB link I use for uploading sketches?

Note: I bought a discounted GPRS shield labelled version 1.0a2. All the information on the 'net is of version 1.0 or 2.0 (with no "a2") and photos and diagrams do not correspond with what I have. I am awaiting official documentation, but meanwhile treating it as an Arduino Leonardo seems to be working.

  • The Seeeduino GPRS shields version 1.0 and 2.0 are just shields. They do not contain an Arduino MCU and don't have a USB, and so will not function as an Arduino. As you say, yours is a bit different and does function as an Arduino. This may be the source of your confusion with the guides, as they assume you are plugging the GPRS shield into another Arduino. Please post a picture of the board. Nov 11, 2014 at 1:47

3 Answers 3


Most small micro controllers, AVR's included, have dedicated hardware for communicating with different serial devices. In arduino these are referenced with "Serial", "Serial1", "Serial2" and so on, depending on how many hardware serial ports your particular arduino has.

Leonardo's are an exception, the first hardware port is "Serial1" and "Serial" refers to the PC's usb connection. On the other arduinos that I know of "Serial" is hardware serial used for PC comms, so using it for other hardware requires sacraficing your PC link.

Software serial ports use the processors more generic pin-change interrupt system to communicate on any pins that support said interrupts, but they have a higher processing overhead and often cannot support the same high speeds as the hardware serial. There are different libraries for Software Serial that have different approaches giving different advantages and drawbacks.

To use a software Serial port you will need to make one to be used in your code, which will look something like this, depending on the type name the library you include uses:

SoftwareSerial softSerial( txPinNumber, rxPinNumber);

So in short, your processor has dedicated hardware for communicating over serial that should be used first, but if you need more ports the processor can simulate some extras which is referred to as "Software Serial". The documentation to your GPRS shield implies that either will work just fine. You should look at the arduino documentation for your board to see how many ports you have and which pins can be used for serial.

The documentation does not imply you will need any special link to your computer outside of the USB connection.

  • 1
    Yes - if this were at ATmega328p-based board like an Uno, the hardware serial is already used for the PC connection, so serial peripherals usually go on a software serial if they cannot be permitted to block PC communication. But on a Leonardo type board as in this question the hardware UART is free and so can be "used first" as you recommend. Similarly, if the board were a Mega, there would be multiple hardware UARTs, some possibly free. Nov 10, 2014 at 20:30

The hardware serial port is the serial port which connects to the computer this takes up pins 1 and 2 I believe. You can read about this here http://arduino.cc/en/reference/serial.

Software serial ports are only on digital IO pins. You can read more about this here http://arduino.cc/en/Reference/softwareSerial

You should not need anything other the USB connection port.

  • 1
    The question concerns a Leonardo-type board, where the computer connection is not via the UART pins, but rather via the on-chip USB interface. Nov 10, 2014 at 20:27

A SoftwareSerial connection is created using the UART pins 7 and 8.

Having the device in HardwareSerial mode allows the device to connect to pins 0 and 1, allowing direct control from the serial connection to the computer.

In SoftwareSerial, you can communicate with the Arduino Via serial, and the Arduino controls the GPRS shield via uart.

  • Software serial can be on any GPIO pins. And the Leonardo-type board in this question does not connect to the computer via a UART on pins 0 and 1, but rather via the on-chip USB interface. Nov 10, 2014 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.