itbrainpower.net
THE ALPHABET PROJECT - professional Arduino, BeagleBone & Raspberry PI shields

LTE 4G SHIELD VOICE OVER USB HOWTO

 

About this tutorial

Our l-LTE v1.07 4G/LTE CAT 1 shield and l-LTE v 1.07 4G/LTE CAT 4 shield embeddes Voice over USB capability. Lot of people asked me for support related to this.

 

WARNING: We just reveals to you the basic guidelines [address only the setup tasks]. Most of the hard work must be fulfiled by you! YOUR HELP IS NEEDED - I will appreciate if you will share with us the results of your test and scripts/solutions.
This tutorial IT IS NOT recommended to beginners!

 

Platforms: BEAGLEBONE BLACK, RASPBERRY PI [any] or other LINUX [Debian] based SBC.

 

Basic tasks time: around 30 minutes.

 

Previous knowledges or skills required: LINUX, scripting and programming [advanced/good], soldering [optional].

 

l-LTE shield - Voice over USB - Some PCM digital voice info, first

* the l-LTE chipsets supports only 8KHz, 16bit, Mono PCM data transfer standard.
* PCM data processing [both ways] it is quite time sensitive and must be processed "near real time", else the voice flux will have errors.
* the l-LTE module send to the SBC 640 bytes of data each 40ms.
* the l-LTE module should receive from SBC [MIC or voice source] 1600 bytes of data each 100ms.

 

l-LTE shield - Voice over USB - hardware and drivers

a. Using one USB mini B to USB A cable, connect the l-LTE shield to your Raspberry PI USB port, or read next paragraph.

b. In order to have the USB driver support enabled, be sure you have following lines added to the "/etc/rc.local" script:
/sbin/modprobe --first-time usbserial > /dev/null 2>&1
echo 2C7C 0121 > /sys/bus/usb-serial/drivers/generic/new_id
echo 2C7C 0125 > /sys/bus/usb-serial/drivers/generic/new_id


The l-LTE USB ports will be mapped to devices named as: "/dev/ttyUSBm". "tail /var/log/messages" or "dmesg" will help you to find them.

 

l-LTE shield - USB pads reference [how to connect shields with cable wo. USB plugs...]


l-LTE shield - 4G/LTE CAT1 and CAT4 shield - UPB pads

Identify the USB GND, V+, D+ and D- pads / soldering islands on your SBC. Solder the USB cable, pairing the signals, with extreme care!!
Good quality solder tool [temperature controlled], proper solder tip and SMD flux must be used!!!
WARNING:
* doing this you may have the chances to damage your boards!
* proceed to ONLY if you know what are you doing!
* anyway, this procedure will void the warranty of your shield!
WE RECOMMEND TO SKIP THIS STEP and TO CONNECT THE BOARDS WITH REGULAR USB CABLE [as described in previous paragraph, letter a!!!!


l-LTE shield - Voice over USB - enable voice routing over USB

Identify the USB port used for AT commands [/dev/ttyUSBx] and the USB port used for NMEA output [/dev/ttyUSBy]. Configure the voice routing entering following AT commands to the /dev/ttyUSBx:
AT+QPCMV=1,0
AT+QGPSCFG="outport","none"
#[use this command if you have enabled the NMEA stream output via USB]

The voice PCM stream will be available trough the /dev/ttyUSBy. The PCM stream and the NMEA output cannot be used at same time. The setting will take effect immediately, but will not be available at l-LTE reboot. You may use the Python script example to write your own one and to run it at module boot.

You may like to call/answer calls [to have some voice data exchange between]: use ADTyournumber; or ATA.... and ATH for hangup call. Those AT commands must be performed over /dev/ttyUSBx ;)

Good to know: AT+QPCMV=0 will disable voice routing over USB

 

l-LTE shield - Voice over USB - some PCM LINUX utilities

You may like to try following:
* sox package [sox, record and play commands...]
* cat
* redirecting output / input

HINTS [some suggestions]:
* "[sudo] cat /dev/ttyUSBy > mySoundCapture.raw" ....to capture the inbound voice channel.
* "[sudo] play -r 8000 -c 1 -t raw -e signed-integer -b 16 /dev/ttyUSBy" .... play the inbound voice channel
* "[sudo] rec 'codec transform options' /dev/ttyUSBy" ...upload MIC???
Read: sox documentation.

 

l-LTE shield - Voice over USB - what to do next

I'm looking back for your contribution. Share your scripts with us and with other l-LTE users. Thank you.

 

 

TUTORIAL PROVIDED WITHOUT ANY WARRANTY!!! USE IT AT YOUR OWN RISK!!!!

 

 

 

Original how to written by Dragos Iosub & itbrainpower.net team

 

 

 

 

document version 0.9 / 2018-02-13 © R&D Software Solutions srl