USB Host Board - CDC Class Software

HobbyTronics USB Host Board - CDC Class Software
Cliquer pour agrandir
Modèle : USBHOST-CDC
Fabricant : HobbyTronics
Évaluation : 5 sur 5 Étoiles !

HobbyTronics

USB Host Board - CDC Class Software

This software download is for our USB Host Board. It allows you to connect a CDC class device to the Host Board and send and receive data to the device via a serial TTL connection

This is a free software download for our USB Host Board and USB Host IC's (SOIC, DIP, SSOP).
To buy - See the USB Host Board and IC product pages (links on the pictures below) for details on pricing and installing this software.

Download Software
Click Here to Download V1.10
USB Host BoardUSB Host Mini
USB Host Boards
USB Host IC SOIC  USB Host IC DIP  USB Host IC SSOP
USB Host IC's


What is the CDC Class

The USB communications device class (or USB CDC) is a composite Universal Serial Bus device class. The class is used primarily for modems, but also for ISDN, fax machines, mobile phones and two way radios. The CDC class allows serial communication with these devices over a USB connection.

Now Supports Ublox USB GPS units

The CDC Class and Mobile Phones

Mobile phones (but excluding all modern smart phones) that connect to a computer via a USB cable do so over a serial connection. Many of these phones supported  the USB Communications Device Class (CDC) ACM connection using standard Hayes type AT modem commands. We couldn't find a list of supported phones on the internet but Motorola, Samsung and Sony Ericsson phones supported this protocol (although we cannot guarantee a particular model will work)

We used a Motorola V3x to test mobile phone connectivity

Non Supported Phones

All modern smartphones. That includes iPhones, Android, Blackberry. These phone use a proprietory communication system and will not work.

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

The USB Host Board will also charge your phone while it is plugged in so no worries about the battery going flat.

Documents

AVR323: Interfacing GSM modems


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|OFF
Turn local Echo On or Off
INTERFACE
CDC Communication settings (default 0)
This is for transmission TO the attached USB CDC device.

0 - TEXT mode. Data is transmitted once carriage return is received
1 - BYTE mode. Each character is transmitted as it is received
2 - PACKET mode.
HELP or ? Display help


BAUD

The baud rate for communication with the board. Note that this does not effect the communications speed with the attached device.

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

INTERFACE

This determines the type of communication with the CDC device.

This is for transmission TO the attached USB CDC device only. Data FROM the CD device is not affected by these settings.

0 - TEXT mode

Data is transmitted once carriage return is sent

1 - BYTE mode

Each character is transmitted as it is received

2 - PACKET mode

Similar to byte mode, but data is sent once a complete packet of data is received. This is useful for binary data transfer.

The first byte of the packet data is the data length (excluding itself). This is not transmitted.

For instance to transmit the four bytes 0x0A 0x0B 0x0C 0x0D you would send

0x04 0x0A 0x0B 0x0C 0x0D

The packet of data is transmitted once all data bytes have been received.


Connections required

  • 5V power in
  • 0V
  • TX out
  • RX in
  • SS pin goes high when CDC device inserted, low when removed

Example Communication with Mobile Phone

The following examples show how you can send and receive sms text messages using a Motorola mobile phone. Different models may have different commands so you should check online for the command list for your phone

First test communication by issuing the AT command. The mobile phone will normally echo the command sent and then send an OK response. E.g.

	AT
	AT
	OK

To stop the phone 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
	

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 phone 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 phone status

	AT+CIND?

Get Date and time

	AT+CCLK?

 

Écrire un avis
Votre nom :


Votre avis : N.B. : Le HTML n'est pas pris en charge !

Évaluation : Mauvais            Bon

Saisir le code ci-dessous :

Il n'y a aucune image supplémentaire pour ce produit.
USB Host Board - CDC Class Software
$ 00€ New In Stock
Panier
Aucun article
 
Frais de Livraison

France & EU - poste aerienne de 3.47€ +VAT
Plus d'informations...

 
Marques
 
 Check out our videos
Follow us on:
acebook