Gemalto is now part of the Thales Group, find out more.

You are here

Audio Codec Board for 2G/3G/4G Terminal PCM Interface

Tutorial, October 12, 2016 - 10:31am, 2170 views

Codec Board

Introduction

This tutorial is about the opportunity to have audio with our Gemalto terminals so that next to the data transfere voice calls become possible.

  • no programming is needed
  • only a few AT commands to setup the right connection
  • only 5 GPIOs are needed
  • schematics and eagle design files for the codec boards can be downloaded below

supported terminals:

  • BGS5T USB
  • EHS6T USB
  • EHS6T LAN
  • ELS61T E2 LAN Rel.2

The 2G/3G and 4G Gemalto terminal have two GPIO "Weidmüller" connectors which provide access to a lot of module signals including a Digital Audio Interface (DAI).

The DAI can be used to connect audio devices capable of pulse code modulation (PCM).

The PCM functionality allows the use of an external audio codec like the one used in this example. 

Features

The audio codec board is small in its footprint (3cm x 2,3 cm). It integrates a 3.3V single channel PCM codecchip (AK2300), has a fixed terminal block (green connector) in order to connect easily to the  terminal (EHS6T, BGS5T...) and a 3.5 mm 4 pin audio jack connector for the headphones.

The DAI Interface supports following configurations:

  • 256 kHz long frame synchronization master mode
  • 16 Bit linear
  • 8 kHz sample rate
  • The most significant bit MSB is tranferred first
  • Data write at rising edge / data read at falling edge
  • Common frame sync signal for transmit and receive

Audio Encoder Board

Connecting Terminal to Audio Codec Board

The following pictures shows the pinout of the GPIO connector(Terminal). Please check the pinout for the other terminals in the related HID. 

pinout Luna LANThe pinout of the codec board is aligned in that way that no cables crosses another.

LUNA LAN Terminal with Audio Encoder Board

For proper usage of the DAI interface the GPIOs has to be configured.

There are two options: 

  • use the Java MIDlet (coming soon)
    Download the zip file with the MIDlet inside. Unpack it and copy the jad and jar file to the module. Install and start the MIDlet via At-commands:

    at^sjam=4                                                  // installed midlets
    at^sjam=0,"name_of_midlet.jad",""           // install midlet
    at^sjam=1,"name_of_midlet.jad",""           // start midlet
    at^smso                                                     // restart module

  • do it manually via AT-Commands

    Therefore connect the terminal with the PC via ASC0/USB.

LUNA LAN connected to PC and Encoder Board

Open for instance an HTerm and open port (115200, 8N1, no flowcontrol).  

Following commands are needed:

  • at^scfg="Gpio/mode/DAI","std"                                  // set GPIOs in the module to DAI functionality
  • at^sspi=                                                                      // open I2C connection
  • <aD41601>                                                                // set GPIO 22 to output (TFSDAI)
  • <aD41701>                                                                // set GPIO 23 to output (SCLK)
  • <aD41800>                                                                // set GPIO 21 to input (RXDDAI)
  • <aD41901>                                                                // set GPIO 20 to output (TXDDAI)
  • #                                                                                 // close I2C connection
  • AT^SNFS=3                                                               // configure

The configuration is non-volatile and becomes active after a module restart. 

  • AT+CFUN=1,1                                                              // restart

HTerm Configure GPIOs

Voice Call

After configuring the terminal put in a SIM card into the terminal. Via the serial interface request the mobile phone number with AT+cnum. Call this phone number and accept call in HTerm with the command ATA.

For more commands see the ATC related to the terminal module.

HINT: If the DAI Interface is active a blue LED is shining on the codec board.

antero.markkula@enkom.fi's picture
antero.markkula...

Hi !

This is a great example of the versatility of the EHS-terminals.

The idea could be used to make a simple telephony connect device for field
service personnel, who could make service and support calls through the terminal.
With a simple Java+AT software a simple DTMF keyboard could be connected to the keyboard, as well.
This kind of combination could be connected to the terminal with two connectors.

How could we obtasin such a DAI module?

Best Regards, Antero

Antero Markkula
Communication and Mechatronics

Enkom Active Oy – www.enkom-active.fi
Upseerinkatu 3 A, 02600 Espoo, Finland
Mobile: +358 400 411368
Office: +358 10 204 0000
Fax: +358 10 204 0010
E-mail: antero.markkula@enkom-active.fi

mullengers's picture
mullengers

To configure the Terminal for PCM/DAI output, using Java, please see this link:
https://developer.gemalto.com/tutorial/conceptboard-java-gpio-lib

E Strauss

Contributors

Profile Picture
Florian.Hinrichs
Profile Picture
David Martens