Posts Tagged ‘GSM’

AirPi – It Texts!

Saturday, February 7th, 2015

Well, it’s been longer than expected since my last post about the Snootlab AirPi – which I closed with, “the next step will be to get communication going with a PC, and send & receive text messages…”

So here we go!

I’m using Windows-7 Professional (64-bit). Plug in the AirPi’s USB, and Windows does its thing with installing the drivers:

airpi-nstall-usb-1

airpi-nstall-usb-2

airpi-nstall-usb-3

And, finally:

airpi-nstall-usb-4

As the last line says, the AirPi AT Commands can now be accessed on COM23 (the number will vary according to what’s available on the particular PC in question).

The Sierra Wireless SL8082T module on the AirPi supports both standard GSM AT Commands, and proprietary Sierra Wireless commands. The full AT Command set is described in the AT Commands Interface Guide – downloadable from the Sierra Wireless site.

To access the AirPi AT Command interface on the COM port, a terminal application is required – here, I’ll use PuTTY. The default baud rate is 115200.

The first command to try with any modem is always “AT” – it should just reply with “OK“.

Another standard command is “ATI” – which should reply with some identification of the device.

The SL8082T supports the “ATI9” command, which gives some detailed information about the module – see the AT Commands Interface Guide for details.

This is how it all looks in the PuTTY screen:

airpi-at-0

 

A couple of other useful commands:

  • AT+COPS? – requests the current network registration state, and the network operator name.
    The reply is something like: +COPS 0,2,23430,2
    In order, those numbers mean:
    0 – the module is currently using automatic operator selection;
    2 – the module is currently using numeric operator format;
    23430 – the current network operator code, T-Mobile UK;
    2 – the module is currently using 3G technology.
  • AT+CNUM – requests the telephone number of the SIM, if available.
    Whether this actually gives a useful answer depends on the SIM – not all SIMs are configured for it.
    When supported, the reply is something like: +CNUM: “”,”07xxxxxx103″,129
    This means:
    “” – if the number had a name associated with it, that would go here;
    “07xxxxxx103” – the phone number (of course I’m not going to post it online!);
    129
    – the phone number is in National format (it’s a UK number).

And now we can actually try sending & receiving a text message; on the left is the PuTTY screen for the AirPi, and my phone to the right:

airpi-at-sms-0

 

Sending the text is done in three stages:

  1. at+cmgs=07******122 – tells the AirPi we want to send a text to the given phone number;
  2. When it’s ready to accept the body of the message, the AirPi gives a ‘>‘ prompt, and we can type away. Hit Ctrl+Z to finish the text entry and send the message;
  3. When the message has been successfully sent, the AirPi confirms with +CMGS: 204 and then OK
    The number (204 here) is a reference which changes for each message.

As you can see in the phone screenshot, the message arrived, and I sent back a reply.

The AirPi indicates that a new text message has arrived with the +CMTI: “SM”,1 unsolicited response:
“SM” – indicates that the message has gone into SIM storage (the default);
1 – indicates that it is message number 1 in that storage.

AT+CMGL=”ALL” requests a list of all messages in the current default storage. The reply is:

+CMGL: 1,”REC UNREAD”,”+447******122″,,”14/12/31,16:31:53+00″
And hello to you, too, AirPi!

Which means:
1 – This is message number 1 in the store;
“REC UNREAD” – it’s a received message, and has not yet been read;
“+447******122” – the sender’s phone number;
,, – the phonebook name for the sender’s number would appear here, if available;
“14/12/31,16:31:53+00” – the date & time the message was sent.

And thus we have achieved the goal of sending & receiving text messages using the AirPi.

Q.E.F.

The AirPi Has Landed!

Monday, January 5th, 2015

This is about the Snootlab AirPi 2G/3G+GPS Shield for Raspberry Pi – not to be confused with the AirPi Raspberry Pi weather station.

I first came across the AirPi when it was announced at the June 2014 Sierra Wireless Developer Day:

Snootlab present AirPi at Sierra Wireless Developer Day 2014

Snootlab present AirPi at Sierra Wireless Developer Day 2014 (with thanks to @vrmvrm for the photo)

It is an add-on board – a “shield” – for the Raspberry Pi featuring a Sierra Wireless SL8082T cellular (2G/3G) module with GPS. The ‘T’ suffix indicates that this module supports the Open AT Framework – allowing a user application to be embedded within the module.

It was a long time in coming, but the production versions eventually went on sale in November, and I was finally able to get my hands on one:

AirPi Kit

AirPi Kit

As shown, a certain amount of self-assembly is required (a fully-assembled option is also available).

Most of the assembly is straightforward, although some instructions on the GPS antenna would have been helpful:

The GPS antenna is supplied with a paper mask on its underside:

AirPi GPS Antenna - As Supplied

AirPi GPS Antenna – As Supplied

This must be removed to reveal the adhesive coating:

AirPi GPS Antenna with Mask Removed

AirPi GPS Antenna with Mask Removed

Noting the correct orientation – as indicated by the AirPi PCB silkscreen – the antenna can then be stuck to the board, and its contact soldered in place (from the underside of the board):

AirPi GPS Antenna Fitted

AirPi GPS Antenna Fitted

And the assembly is complete:

AirPi Completed

AirPi Completed

The next step will be to get communication going with a PC, and send & receive text messages…