Configuring H5 Devices: Using AT RUN, Setting Up Digital Voice Interface and Configuring Ports Reference Guide
Configuring H5 Devices: Using AT RUN, Setting Up Digital Voice Interface and Configuring Ports Reference Guide
Configuring H5 Devices: Using AT RUN, Setting Up Digital Voice Interface and Configuring Ports Reference Guide
Copyright
This publication may not be reproduced, in whole or in part, without prior expressed written permission from Multi-Tech Systems, Inc. All rights reserved.
Copyright © 2012, by Multi-Tech Systems, Inc.
Multi-Tech Systems, Inc. makes no representations or warranty with respect to the contents hereof and specifically disclaim any implied warranties of
merchantability or fitness for any particular purpose. Furthermore, Multi-Tech Systems, Inc. reserves the right to revise this publication and to make
changes from time to time in the content hereof without obligation of Multi-Tech Systems, Inc. to notify any person or organization of such revisions or
changes.
Revisions
Revision Level Date Description
A 11/28/12 Initial release.
Trademarks
Multi-Tech and the Multi-Tech logo are registered trademarks of Multi-Tech Systems, Inc.
Contacting Multi-Tech
Knowledge Base
The Knowledge Base provides immediate access to support information and resolutions for all Multi-Tech
products. Visit http://www.multitech.com/kb.go.
Support Portal
To create an account and submit a support case directly to our technical support team, visit: https://support.multitech.com
Technical Support
Business Hours: M-F, 9am to 5pm CT
World Headquarters
Multi-Tech Systems, Inc.
2205 Woodale Drive
Mounds View, Minnesota 55112
Phone: 763-785-3500 or 800-328-9717
Fax: 763-785-9874
Warranty
To read the warranty statement for your product, please visit: http://www.multitech.com/warranty.go.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 2
CONTENTS
Contents
Document Overview .................................................................................................................................................... 5
Abbreviations and acronyms .............................................................................................................................................. 5
Using AT Run Services and Event Monitor Services ....................................................................................................... 6
AT Run Services Overview ................................................................................................................................................... 6
SMS AT Run Service Overview .......................................................................................................................................................... 8
TCP AT Run Service Overview ........................................................................................................................................................... 9
Event Monitor Service Overview ...................................................................................................................................... 12
Configuring Event Monitor Service ................................................................................................................................................. 12
AT Command Log to H5 .................................................................................................................................................................. 12
Using the Digital Voice Interface ................................................................................................................................ 13
Overview of Where and How Digital Voice Interface is Used ........................................................................................... 13
DVI Overview .................................................................................................................................................................................. 13
DVI Configurations .......................................................................................................................................................................... 14
Application Examples ........................................................................................................................................................ 15
Normal Mode (I2S) .......................................................................................................................................................................... 16
Module is Slave ............................................................................................................................................................................... 19
Burst Mode (PCM)............................................................................................................................................................. 21
Module is Master ............................................................................................................................................................................ 21
Module is Slave ............................................................................................................................................................................... 24
2
I S Overview ...................................................................................................................................................................... 26
DVI Timings ....................................................................................................................................................................... 28
Normal Master Mode ..................................................................................................................................................................... 28
Normal Master Mode Parameters .................................................................................................................................................. 28
Normal Slave Mode......................................................................................................................................................................... 29
PCM Master Mode .......................................................................................................................................................................... 30
PCM Slave Mode ............................................................................................................................................................................. 31
Schematic .......................................................................................................................................................................... 31
Arranging Ports and Avoiding Contended Resources .................................................................................................. 33
Port Arrangements and Virtual Serial Device ................................................................................................................... 33
Factory Ports Arrangement with no USB cable................................................................................................................. 36
Factory Ports Arrangement with USB cable ...................................................................................................................... 39
GPS/NMEA sentences on USB0 ....................................................................................................................................................... 40
AT#PORTCFG Command ................................................................................................................................................................. 41
USIF0 and AT+CMUX Command ....................................................................................................................................... 52
USB and AT+CMUX Command .......................................................................................................................................... 55
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 3
CONTENTS
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 4
DOCUMENT OVERVIEW
Document Overview
This guide describes the following for the radio module running on many MultiTech H5 devices:
Using the SMS AT Run, TCP AT Run and Event Monitor Services
Using the digital voice interface
Arranging ports to avoid resource conflicts
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 5
USING SMS AT RUN, TCP AT RUN AND EVENT MONITOR SERVICES
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 6
USING SMS AT RUN, TCP AT RUN AND EVENT MONITOR SERVICE
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 7
USING SMS AT RUN, TCP AT RUN AND EVENT MONITOR SERVICE
+PACSP0 #MWI: 1,1,1 #MONI: AT&T BSIC:06 RxQual:0 LAC:7D09 Id:2AF5 ARFCN:178 PWR:-81dbm TA:5 OK
Notes:
The device sending the SMS to the H5 must have its phone number listed in the H5’s White List.
You only need to issue the commands AT#SMSATRUN=0, AT#TCPATRUNL=0, AT#TCPATRUND=0 and
AT#ENAEVMONI=0 if the commands were previously enabled in the device.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 8
USING SMS AT RUN, TCP AT RUN AND EVENT MONITOR SERVICE
AT Command Log to H5
AT#REGMODE=1
OK
AT#SMSATRUN=0
OK
AT#TCPATRUNL=0
OK
AT#TCPATRUND=0
OK
AT#ENAEVMONI=0
OK
AT#SMSATRUNCFG=3,1,5
OK
AT#SMSATWL=0,1,0,"6124241372"
OK
AT#SMSATRUN=1
OK
When SMS is received from device specified via command AT#SMSATWL the following appears:
#SMSATRUN: AT#MONI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 9
USING SMS AT RUN, TCP AT RUN AND EVENT MONITOR SERVICE
Note:
This feature requires obtaining an account, SIM, and APN from carrier which allows the H5 to obtain a public IP
address and which does not block the connection to the port specified in the AT#TCPATRUNCFG command.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 10
USING SMS AT RUN, TCP AT RUN AND EVENT MONITOR SERVICE
AT Command Log to H5
AT#REGMODE=1
OK
AT#SMSATRUN=0
OK
AT#TCPATRUNL=0
OK
AT#TCPATRUND=0
OK
AT#ENAEVMONI=0
OK
AT#TCPATRUNCFG=1,2,1024,12345,"",1,5,1,5,2
OK
AT#TCPATRUNFRWL=2
OK
AT#TCPATRUNFRWL=1,"204.26.122.49","255.255.255.255"
OK
AT#TCPATRUNAUTH=2
OK
AT#TCPATRUNAUTH=1, "username","password"
OK
AT+CGATT?
+CGATT: 1
OK
AT#SGACT=1,1
#SGACT: 155.163.88.49
OK
AT#TCPATRUNL=1
OK
TCPATRUN: <204.26.122.49>
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 11
USING SMS AT RUN, TCP AT RUN AND EVENT MONITOR SERVICE
AT Command Log to H5
AT#REGMODE=1
OK
AT#SMSATRUN=0
OK
AT#TCPATRUNL=0
OK
AT#TCPATRUND=0
OK
AT#ENAEVMONI=0
OK
AT#ENAEVMONICFG=3,1,5
OK
AT#EVMONI="RING",0,0,"ATA"
OK
AT#EVMONI="RING",1
OK
AT#ENAEVMONI=1
OK
RING
#EVMONI: ATA
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 12
USING THE DIGITAL VOICE INTERFACE
The information is intended for users who need to develop applications dealing with signal voice in digital format.
This section describes the configurations of the Digital Voice Interface, for example, selecting the voice sampling
frequency, the bit number of the voice sample, the audio formats, and so on. In addition, the configuration of a
popular audio codec connected to the module is described. These activities are accomplished through I2S and I2C
buses.
The voice coming from the downlink, in digital format, is captured by the dedicated software running on the
module and directed to the Digital Voice Interface. The audio codec decodes the voice and sends it to the speaker.
Conversely, the voice captured by the microphone is coded by the audio codec and directed through the Digital
Voice Interface to the module that collects the received voice, in digital format, and sends it on the uplink.
DVI Overview
The physical DVI interface is based on the I2S Bus provided by the module to perform digital audio transfer. The I2S
is further described in the section “I2S Overview.” Table 1 describes the DVI signals.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 13
USING THE DIGITAL VOICE INTERFACE
The figures that follow show the two basic configurations of the DVI interface relating the Word alignment and
Clock signals. These configurations are derived from the concepts of the first I2S bus design described in the
section “I2S Overview.” When the module is master the Clock and Word alignment signals (also called Word
alignment Output WAO) are generated by the module itself. When the module is slave, both signals are generated
by the connected device: the codec.
For example, before establishing a call you can use AT commands to select one of the two configurations and
properly set the module and the codec.
DVI Configurations
The following tables describe several DVI audio bus configurations that are available through the AT#DVI and
AT#DVIEXT commands.
AT#DVI =<mode>,<dviport>,<clockmode>
<mode> <dviport> <clockmode>
0 Ædisable DVI 2 Æ select DVI port 2 0 Æ DVI slave
1 Æ enable DVI 1 Æ DVI master
2 Æ reserved
Table 2 DVI configuration via AT#DVI command
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 14
USING THE DIGITAL VOICE INTERFACE
AT#DVIEXT=<config>,<samplerate>,<samplewidth>,<audiomode>,<edge>
<samplerate> <samplewidth>
0 Æ 8 [KHz] sampling frequency 0 Æ 16 bits per sample
1 Æ 16 [KHz] sampling frequency 1 Æ 18 bits per sample
2 Æ 20 bits per sample
3 Æ 24 bits per sample
4 Æ 32 bits per sample
Table 3 DVI configuration via AT#DVIEXT command
Application Examples
Application examples show some audio formats supported by the DVI audio bus in master and slave
configurations. All the examples use the ideas presented in Figure 4.
I2C bus is used to configure the MAX9867 codec. For examples in this guide, the MAX9867 codec is used. See the
section “Schematic” for a reference design. You can choose your own codec, as long as it complies with the
technical characteristics of the module.
You can use AT commands to completely control the codec. The DVI bus provides the voice connection between
the two devices. For a reference design see the section “Schematic.”
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 15
USING THE DIGITAL VOICE INTERFACE
The following AT commands cause the module to enter master configuration/I2S-compatible audio format and
configure the codec according to the current module settings. The meaning of the used parameters appears after
each command, for your convenience.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 16
USING THE DIGITAL VOICE INTERFACE
1 Enable DVI
2 Use DVI port 2 (mandatory)
1 DVI master (factory setting)
AT#DVIEXT=1,0,0,1,0
OK
where:
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 17
USING THE DIGITAL VOICE INTERFACE
>00109000
AT#I2CWR=x,y,30,17,1
>8A
OK
where:
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 18
USING THE DIGITAL VOICE INTERFACE
The following figure shows the timing diagram, captured by an oscilloscope, for the preceding example. The clock
generated by the module is 384 KHz.
Module is Slave
For basic timing diagram, see Figure 5.
The following AT commands cause the module to enter slave configuration/I2S audio format and configure the
codec according to the current module setting.
0 DVI slave
AT#DVIEXT=1,0,3,1,0
OK
1 Normal mode (factory setting)
0 I2C
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 19
USING THE DIGITAL VOICE INTERFACE
Note: The used codec, in master configuration, generates a clock equal to 384 KHz therefore the selected number
of bits per sample on module is 24. For more information, see Table 4.
AT#I2CWR=x,y,30,17,1
>8A
OK
x GPIO number used as SDA
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 20
USING THE DIGITAL VOICE INTERFACE
The following figure shows the timing diagram, captured by an oscilloscope, concerning the preceding example.
The clock generated by the codec is 384 KHz.
Figure 8 Timing diagram of PCM audio format (burst mode) /mono mode
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 21
USING THE DIGITAL VOICE INTERFACE
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 22
USING THE DIGITAL VOICE INTERFACE
The following AT commands cause the module to enter master configuration/PCM audio format (burst mode).
Configure the Module to operate with PCM audio format (burst mode)
AT#DVI=1,2,1
OK DVI bus
1 Enable DVI
AT#DVIEXT=0,0,0,0,1
OK
0 Burst mode
0 Mono mode
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 23
USING THE DIGITAL VOICE INTERFACE
Module is Slave
In PCM audio format the MSB of the channel is clocked on the second CLK falling edge after the WAO pulse rising
edge.
Figure 9 Timing diagram of PCM audio format (burst mode) /mono mode
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 24
USING THE DIGITAL VOICE INTERFACE
The following AT commands cause the module to enter slave configuration/PCM audio format (burst mode) and
configure the codec according to the current module setting.
Configuring the Module to operate with PCM audio format. DVI bus
AT#DVI=1,2,0
OK
1 Enable DVI
0 DVI slave
AT#DVIEXT=0,0,0,0,1
OK
0 Burst mode
0 Mono mode
AT#I2CWR=X,Y,30,17,1
>8A
OK
x GPIO number used as SDA
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 25
USING THE DIGITAL VOICE INTERFACE
The following figure shows the timing diagram, captured by an oscilloscope, for the preceding example. The clock
generated by the codec is 384 KHz.
I2S Overview
This section describes the I2S bus so you can better understand the digital audio transmission.
The I2S is an electrical serial bus designed for connecting digital audio devices. Developed by Philips in 1986, this
popular serial bus is a 3-wire bus for interfacing to audio chips such as codecs. It is a simple data interface, without
any form of address or device selection.
The I2S design handles audio data separately from clock signals. On an I2S bus, there is only one bus master and
one transmitter. Figure 11 illustrates these concepts.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 26
USING THE DIGITAL VOICE INTERFACE
In high-quality audio applications involving a codec, the codec is typically the master so that it has precise control
over the I2S bus clock.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 27
USING THE DIGITAL VOICE INTERFACE
DVI Timings
Normal Master Mode
The following diagram shows the timings on the main DVI signals when in normal master mode.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 28
USING THE DIGITAL VOICE INTERFACE
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 29
USING THE DIGITAL VOICE INTERFACE
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 30
USING THE DIGITAL VOICE INTERFACE
Schematic
The following illustration shows a schematic example of an interface between the modules and the MAX9867
codec.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 31
USING THE DIGITAL VOICE INTERFACE
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 32
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
It describes the virtual serial device and services implemented on the module.
The items involved in connections management—physical serial ports, logical access points, AT parser and TT
utility, services and protocols—appear in the table that follows. The VSD supports several configurations of these
items. The section that follows describes these configurations.
Physical Serial Ports Logical Access Points AT Parsers and TT Services Protocols
Utility
USIF0 AT0 Instance 1 Python CMUX (VC1-VC4)
USIF0 and USIF1 are 4 channels: VC1-
called respectively VC4
Modem Serial Port 1
and Modem Serial
Port 2.
USIF1 AT1 Instance 2
USB (USB0-USB5) AT2 Instance 3
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 33
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
6 channels: USB0-
USB5
SPI TT TT
VHWDTE0
VHWDTE1
PYSER
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 34
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
It is useful to review instances and their relationships with the Access Points. There are three AT command parser
instances that are logically independent. Each one is managed by the same control software block and is
connected to an Access Point as shown in the figure that follows.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 35
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Power on the module. The factory arrangement of the internal connections between physical ports and “access
points” is depicted in Figure 14.
Table 7 summarizes the factory arrangement. USBX is the generic channel provided by the USB port.
AT0 AT1 AT2 TT GPS/NMEA
USB0
USB1
USB2
USB3
USB4
USB5
USIF0 X
USIF1
SPI X
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 36
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Using the USIF0 port, you enter the AT$GPSP=1 and AT$GPSNMUN=1, … commands.
The just entered command is elaborated by AT0 parser and the module enters the configuration shown in Figure
15. Table 8 summarizes the new internal ports configuration.
AT0 AT1 AT2 TT GPS/NMEA
USB0
USB1
USB2
USB3
USB4
USB5
USIF0 X X
USIF1
SPI X
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 37
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
USB0
USB1
USB2
USB3
USB4
USB5
USIF0 X
USIF1
SPI X X
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 38
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Connect the USB cable to the module. The module recognizes the event and assumes the factory arrangement
that is shown in Figure 17. Table 10 summarizes the new factory configuration.
AT0 AT1 AT2 TT GPS/NMEA
USB0 X
USB1 MA
USB2 3G
USB3 X
USB4
USB5
USIF0 X
USIF1
SPI
The entire port configurations list follows. Two trace routes are shown on the following figures:
MA (Mobile Analyzer) Trace is addressed to Base Band, Real Time Operating System, Telit AT Parser;
3G-Trace is addressed to Layer 1 and Layer 3.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 39
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Enter the AT$GPSP=1 command through USB port, channel USB0. The AT1 parser elaborates and the module
enters the configuration shown in Figure 18. Table 11 summarizes the new internal ports configuration.
AT0 AT1 AT2 TT GPS/NMEA
USB0 X X
USB1 MA
USB2 3G
USB3 X
USB4
USB5
USIF0 X
USIF1
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 40
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
USB
The mechanism, shown in the examples of the previous sections, concerning the activation of the GPS/NMEA
sentences on one physical port is applicable on the entire configuration covered by the present document. It can
be reassumed as follows: NMEA sentences are sent on the physical port used by the operator to enter the
AT$GPSP and AT$GPSNMUN commands.
AT#PORTCFG Command
The AT#PORTCFG command manages several internal ports arrangements by means of its parameter value. The
tables and figures that follow show the various ports configurations you can achieve by changing the parameter
value of the command and connecting the USB cable to the module. Use the following sequence to make the
entered AT#PORTCFG command active:
Assume that you are starting from the configuration shown in Figure 14, the factory setting of #PORTCFG is 0.
Refer to Table 12.
Enter, for example, the AT#PORTCFG=1 command through USIF0 port, AT0 parser elaborates the just entered
command. No actions are taken.
Power down the module.
Power on the module. The command is executed and the ports arrangement described in Table 14 is
implemented.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 41
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
AT#PORTCFG=0
USB
cable
not
connected
USIF0 X
USIF1
SPI X
AT#PORTCFG=0
USB0 X
USB1 MA
USB2 3G
USB3 X
USB4
USB5
USIF0 X
USIF1
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 42
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
AT#PORTCFG=1
USB
cable
no
connected
USIF0 X
USIF1 MA
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 43
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
AT#PORTCFG=1
USB0 X
USB1
USB2 3G
USB3 X
USB4
USB5
USIF0 X
USIF1 MA
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 44
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
AT#PORTCFG=2
USB
cable
not
connected
USIF0 X
USIF1
SPI X
AT#PORTCFG=2
USB0 X
USB1 MA
USB2 3G
USB3
USB4
USB5
USIF0 X
USIF1
SPI X
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 45
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
AT#PORTCFG=3
USB
cable
not
connected
USIF0 X
USIF1 X
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 46
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
AT#PORTCFG=3
USB0 X
USB1 MA
USB2 3G
USB3
USB4
USB5
USIF0 X
USIF1 X
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 47
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
AT#PORTCFG=4
USB
cable
no
connected
USIF0 X
USIF1
SPI X
AT#PORTCFG=4
USB0 X
USB1 MA
USB2 3G
USB3 X
USB4
USB5
USIF0 X
USIF1
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 48
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
AT#PORTCFG=5
USB
cable
not
connected
USIF0
USIF1
SPI X
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 49
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
AT#PORTCFG=5
USB0 X
USB1 MA
USB2 3G
USB3 X
USB4
USB5
USIF0
USIF1
SPI X
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 50
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
AT#PORTCFG=6
USB
cable
not
connected
USIF0 X
USIF1
SPI X
AT#PORTCFG=6
USB0 X
USB1 MA
USB2 3G
USB3 X
USB4
USB5
USIF0
USIF1
SPI X
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 51
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
USB5
Enter the AT+CMUX=0 command through USIF0 port. The parser AT0 recognizes the command, and according to
it, changes the module configuration that is shown in Figure 14 into the configuration shown in Figure 26. Table 26
summarizes the new configuration.
AT0 AT1 AT2 TT GPS/NMEA
USB0- USB5
USIF0-VC1 X
USIF0-VC2 X
USIF0-VC3 X
USIF0-VC4
USIF1
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 52
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
If TT feature is needed, start from the following configuration: #PORTCFG=1 / no USB cable. Refer to Table 14.
Enter the AT+CMUX=0 command through USIF0 port. The parser AT0 recognizes the command and according to it
changes the current module configuration into the configuration shown in Figure 27. Table 27 summarizes the
new configuration.
AT0 AT1 AT2 TT GPS/NMEA
USB0- USB5
USIF0-VC1 X
USIF0-VC2 X
USIF0-VC3 X
USIF0-VC4
USIF1 MA
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 53
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 54
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Enter the AT+CMUX=0 command through USB0 or USB3. According to the parser used, (AT1 or AT2), the involved
parser recognizes the command and changes the module configuration indicated by the Figure 17 into the
configuration shown in Figure 28.
It is worth noting that the AT0 (instance # 1) is disconnected from USIF0 and connected to USB3-VC1, the TT stays
on USB1. Table 28 summarizes the new configuration shown in Figure 28.
AT0 AT1 AT2 TT GPS/NMEA
USB0
USB1 MA
USB2 3G
USB3-VC1 X
USB3-VC2 X
USB3-VC3 X
USB3-VC4
USB4
USB5
USIF0
USIF1
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 55
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 56
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Enter the AT$GPSP=1 command through USB3-VC3 port. It is elaborated by AT2 parser and the module enters the
configuration shown in Figure 29. Table 29 summarizes the new internal ports configuration.
AT0 AT1 AT2 TT GPS/NMEA
USB0
USB1 MA
USB2 3G
USB3-VC1 X
USB3-VC2 X
USB3-VC3 X X
USB3-VC4
USB4
USB5
USIF0
USIF1
SPI
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 57
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
There are two ways to change the ports arrangement without turning the module off and on:
For most devices you can connect/disconnect the USB cable. However, for devices that receive power through
the USB, you are effectively turning the module off and on when you unplug the USB cable.
Enter the AT+CMUX=0 command.
Note: To put the entered AT#PORTCFG command into action, to change ports arrangement, you need to turn the
module off and on.
The following priority policy is implemented on the module: Regardless of the actions or commands sequence that
you implement to set the module into the desired ports configuration, the module must always enter the last
requested configuration.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 58
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
To help you better understand what is going on, some examples follow.
Example 1
Actor Action
Module Assume that its configuration is shown in Figure 14.
User User enters AT+CMUX=0 command through USIF0.
Module According to the command just entered, the AT0 Parser starts the CMUX protocol. The
module enters the configuration shown in Figure 26.
User User runs on the PC the CMUX counterpart application.
PC Provides four virtual “com” (for example, COM3, COM4, COM5, COM6) required by the
CMUX counterpart application running on PC.
User User connects USB cable.
Module Enters the configuration shown in Figure 17.
PC Provides six new “COM” logically connected to the six USB channels. The CMUX
application running on PC is no longer connected to the module and is closed. COM1
and COM2 are ready for new applications.
User User disconnects USB cable.
Module: Enters again the configuration shown in Figure 14.
Example 2
Actor Action
Module Assume the module is configured as shown in Figure 14.
User User connects USB cable.
Module Responding to user action, the module enters the configuration shown in Figure 17.
PC Provides six virtual “COM” required by USB drivers to logically connect the six USBX
channels.
User User enters AT+CMUX=0 command through USB1 or USB2 channels.
Module According to the command just entered, the AT1 or AT2 Parser (in accordance with the
USBX channel used by the user) starts the CMUX protocol. The module enters the
configuration shown in Figure 28.
User User runs on the PC the CMUX counterpart application.
User User disconnects USB cable.
Module Enters the configuration shown in Figure 14.
PC Discards the six “COM” logically connected to the six USBX channels. The CMUX
counterpart application running on PC is no longer connected to the module, it is closed.
In the preceding examples, you can infer that the last required port configuration discards the previous one.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 59
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Services
Python
The modules provide the Python programming language. This gives you a tool to develop control scripts based on
your communication and hardware resources. This section assumes that you are familiar with the Python
language.
As shown in Figure 30 the VSD provides two access points called VHW DTE0 and VHW DTE1. MDM and MDM2
Python modules are logically connected respectively to VHW DTE0 and VHW DTE1 access points.
Assume that the module’s factory setting (AT#PORTCFG=0) is not changed and the USB cable is not connected.
Next power on the module.
The factory arrangement of the internal connections between physical ports and “access points” is shown
in Figure 14. Table 7 summarizes the factory arrangement.
When the Python script runs the Python instruction import MDM, the VSD disconnects the USIF0/AT0 logical
connection and establishes the logical connection VHW DTE0/AT0. Consequently the Python script can access the
AT0 parser.
In the same way, import MDM2 instruction forces the VSD to establish the logical connection VHW DTE1/AT1. As
shown in Figure 30 it is possible to infer that USIF0 is disconnected and un-used from external module side.
Python script can run another Python software module to use the USIF0 port using the instruction import
SER. Figure 31 shows the new connection: through the physical port USIF0 it is possible to be connected with the
Python script.
The three Python software modules (MDM, MDM2 and SER) make use of three independent resources: USIF0
physical port; AT0 and AT1 Access Point. No resources contention can arise among them. As a rule, the MDM,
MDM2 and PRINT instructions take and use the resources regardless of the current owner.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 60
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 61
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 62
ARRANGING PORTS AND AVOIDING CONTENDED RESOURCES
The Python script runs: import MDM, import MDM2, import SER and print instructions. The figure that follows
shows the actions of the first tree instructions, plus the action of the last one that makes available print messages
on the generic terminal application connected to USIF1 port.
Using AT RUN, Setting up Digital Voice Interface and Configuring Ports Reference Guide 63