USB Host Board – Modem Software

This software download is for our USB Host Board. It allows you to connect a USB GSM Modem to the Host Board and send and receive SMS text messages.

See below for supported devices.

This is a free software download for our USB Host Board and USB Host IC’s (SOICDIPSSOP).

Please note: This software is free to download but only works on one of our USB boards or chips which must be bought separately.
To order, simply select which of our boards or IC products you wish to have the software loaded onto. See the USB Host Board and IC product pages for details on pricing and installing this software.

Supported Modems

HUAWEI E270

Works straight out of the box
HUAWEI E173

This modem includes USB Flash drive features which needs disabling.

Install this modem on a Windows PC which will also give you 2x serial port connections. Then connect to the first serial port (at 115200 baud) and issue the command

AT^U2DIAG=0

This will enable the device for serial port function only and you can then use it with the USB Host boards.
HUAWEI E160

This modem includes USB Flash drive features which needs disabling.

Install this modem on a Windows PC which will also give you 2x serial port connections. Then connect to the first serial port (at 115200 baud) and issue the command

AT^U2DIAG=256

This will enable the device for serial port function only and you can then use it with the USB Host boards.

Currently this modem does not work with the AUTORCV functionality (see below)
Sierra Wireless 885

This modem includes USB Flash drive features and comes as standard to load as a Flash Drive.

To make the Serial Port and modem available you need to plug this modem into a Windows PC and run the program sierra_wireless_disable_sd.exe. This program is included in the download above.
 

What can you do?

Sending and Receiving SMS Text messages via a microcontroller can be very useful for remote control or monitoring. You can use it for

  • Alarm System – Send an SMS Text Message to your mobile phone if an alarm is tripped
  • Remote Monitoring – Send remote data by SMS for monitoring say temperature  in a remote location
  • Control Equipment  – Send an SMS Text message to it to turn on/off an appliance
  • GPS Location – connect to a GPS receiver and be able to request the current position via text message (Lost your Drone?)

USB Host Board Configuration

The following Commands are available to configure the USB Host Board

These commands are used to configure the USB Host board and will only function when no device is plugged into the board. If a device is plugged in, these commands will be sent to the device

COMMAND 
BAUD <value>Set Serial Port Baud Rate (default 9600)
[2400|4800|9600|14400|19200|38400|57600|115200]
ECHO ON|OFFTurn local Echo On or Off (Default ON)
AUTORCV ON|OFFTurn AUTO Receive mode On or Off (Default ON)
HELP or ?Display help

BAUD

The baud rate for communication with the board.

ECHO

This determines whether data sent to the board is echoed back by the board. This is useful when initially testing communication using a terminal program to issue commands.

When connected to a microcontroller you may not want the data sent to be echoed back. The default is ON

AUTORCV

This is a very useful setting and we recommend leaving this turned on.
Receiving a text message is a multistep process..

  • Get a new message alert or check for new messages
  • Download the message
  • Split up the message into it’s constituent parts
  • Delete the message

We have automated all of this on the USB Host when AUTORCV is set to ON.

When a new message alert is received, the message is automatically downloaded, split into its constituent parts, stored and then deleted from the sim card. The SDO (A) pin on the board is set high to indicate a new message has been received. To then display the message simply send the command

AT+READ

See the full details for AT+READ below

Connections required

  • 5V power in
  • 0V
  • TX out
  • RX in
  • SS pin – this pin goes high when modem is attached and configured
  • SDO (A) pin – optional for AUTORCV mode

You can use the SS pin output in your code to detect whether the modem is successfully attached before sending commands –  see example arduino code below

Example Communication with USB Modem

The following examples show how you can send and receive sms text messages.

First test communication by issuing the AT command. The modem will send an OK response. E.g.

	AT
	OK

To stop the modem echoing your commands you can turn echo off with

	ATE0

Reading SMS Messages

The following commands are useful for reading text messages

	AT+CMGF=1              set to text mode
	
	AT+CMGL="REC UNREAD"   list all received unread 
                               - listing them marks them as read
	AT+CMGL="REC READ"     list all received read
	AT+CMGL="STO UNSENT"   list all stored unsent
	AT+CMGL="STO SENT"     list all stored sent
	AT+CMGL="ALL"          list all sms present
	
	AT+CMGR=1              read message number 1
	
	AT+CMGD=1              delete message 1
        AT+CMGD=0,4            delete ALL messages

Example Communication

	ATE0
	ATE0
	OK
	AT+CMGF=1
	OK
	AT+CMGL="REC READ"
	+CMGL: 823,"REC READ","+447891123456"
	Hello there
	OK

Sending SMS Messages

To send an SMS message we use the AT+CMGS command to indicate the phone number to send the text to. The modem will respond with a > prompt. We can then send the text part of the message. Carriage returns sent will genereate another > prompt on a new line.

Complete sending the message by sending a Control-Z character

Example Communication

	ATE0
	ATE0
	OK
        AT+CMGF=1
	OK
	AT+CMGS="+447891123456"
	> Hello this is a text
	> Next line
	+CMGS: 249

	OK

Deleting SMS Messages

Use AT+CMGL="REC READ" to list messages

Delete a specific message using

	AT+CMGD=x    x=message number

Check on modem status

	AT+CIND?

Check Modem Model and Info

	ATI

Get Date and time

 AT+CCLK?

Additional Commands

We have added two additional non-standard AT commands to make using the modem easier

AT+SEND

Use this command to simplify sending a text message. You no longer need to wait for the > prompt before adding the message line. Use the following command format

AT+SEND,tel_no,message

E.g.

AT+SEND,+441234123456,Hello

Terminate the command with a carriage return character

AT+READ

This command is available only if you have AUTORCV turned on

With AUTORCV turned on, the USB Host will automatically receive and process the text message for you. It then sets the SDO (A) pin high to indicate a new message is ready.

Send the command AT+READ to display the message. The message is displayed in the following way

  TEL:+447891123456
  DAT:16/12/06
  TIM:09:44:31+00
  MSG:Hello from my phone

Sending the AT+READ command turns off the new message indicator pin SDO (A)

 

Shopping Basket
Scroll to Top