# Audio USB passthrough on WP7611

**URL:** <https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302>\
**Category:** WP Series\
**Created:** [May 11, 2020, 7:59pm UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302 "2020-05-11T19:59:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben1](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@ben1](https://forum.sierrawireless.com/u/ben1)\
**Post date:** [May 11, 2020, 7:59pm UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302/1 "2020-05-11T19:59:02Z")

</div>

I have a Mangoh green board with WP7611 module. I’d like to use the microphone/speaker as USB devices on an attached host. I’ve set up the following through the AT interface:

AT!USBCOMP?  
Config Index: 1  
Config Type: 1 (Generic)  
Interface bitmask: 0009010D (diag,nmea,modem,rmnet0,audio,ecm)

OK

AT!AVCFG?  
!AVCFG: 0,1,3  
!AVCFG: 1,1,3  
!AVCFG: 2,1,3  
!AVCFG: 3,1,3  
!AVCFG: 4,1,3  
!AVCFG: 5,1,3  
!AVCFG: 6,1,2  
!AVCFG: 7,1,2  
!AVCFG: 8,1,2  
!AVCFG: 9,1,2

Index 5 is the active profile, and my understanding is that “5,1,3” should connect audio to USB

And I see audio input and output devices on the host (Ubuntu 18.04):

ghost@vnuc:~$ arecord --list-devices  
\*\*\*\* List of CAPTURE Hardware Devices \*\*\*\*  
card 1: WP7611 [Sierra Wireless WP7611], device 0: USB Audio [USB Audio]  
Subdevices: 1/1  
Subdevice #0: subdevice #0

It’s not clear to me if I need to do anything else. Can the firmware do this without software running on the application processor, or do I need to write a Legato application? I’ve tried modifying the StreamMedia example application, but now matter what I do, I can’t get sound on the speaker or anything I say into the microphone to record to a file.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [May 11, 2020, 11:08pm UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302/2 "2020-05-11T23:08:51Z")

</div>

You can dial a voice call from your mobile to the wp76 module.  
After that you can record the conversation in pc.

> [@How to do USB audio playback on WP7607 modem](https://forum.sierrawireless.com/t/how-to-do-usb-audio-playback-on-wp7607-modem/16925):
>
> Hi, I am using WP7607 module and able to do USB audio record with audacity without any issue.But, at the time of doing the playback of recorded file, it throws error as: “Error while opening sound device. Please check the playback device settings and the project sample rate.” Do anyone know how can I do playback of recorded USB audio files? Thanks a lot Regards Shatrughan

---

<div class="post-metadata">

**Author:** ![ben1](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@ben1](https://forum.sierrawireless.com/u/ben1)\
**Post date:** [May 11, 2020, 11:28pm UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302/3 "2020-05-11T23:28:14Z")

</div>

Thanks, but that’s not what I’m trying to do. I want to use the microphone and speaker without involving wireless. Is this possible? (microphone -\> USB) and (USB -\> speaker)

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [May 12, 2020, 12:16am UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302/4 "2020-05-12T00:16:42Z")

</div>

Have you set the at! avsetprofile ?  
Then you can use at! avplay to play an audio file.  
In pc you can arecord to see if anything can be recorded.

If you want to do (microphone -\> USB) and (USB -\> speaker), you need to use the legato app StreamMedia, in this case, audio data will be sent in UDP packet, that is nothing related to usb audio.

You can have a look on this document:

> **[audio streaming using sample streamMedia.docx](https://drive.google.com/file/d/1kNi7mMIJvmeUSGc2riRZ9P5qGrAUYcoa/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![ben1](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@ben1](https://forum.sierrawireless.com/u/ben1)\
**Post date:** [May 12, 2020, 3:19am UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302/5 "2020-05-12T03:19:18Z")

</div>

Thanks again for replying. I don’t want to do anything over TCP/IP, only basically use the WP7611 as a USB headset. Is this not possible using firmware alone? I tried modifying the StreamMedia app as follows. I still don’t see anything happening, though. I’m not sure what a connector is. Do I need to run a loop that samples the PCM? All error checking is left out to make this clearer.

> // Set up input path  
> MicAudioRef = le\_audio\_OpenMic();  
> UsbOutputAudioRef = le\_audio\_OpenUsbTx();  
> AudioInputConnectorRef = le\_audio\_CreateConnector();  
> le\_audio\_Connect(AudioInputConnectorRef, MicAudioRef);  
> le\_audio\_Connect(AudioInputConnectorRef, UsbOutputAudioRef);  
> // Set up output path  
> SpeakerAudioRef = le\_audio\_OpenSpeaker();  
> UsbInputAudioRef = le\_audio\_OpenUsbRx();  
> AudioOutputConnectorRef = le\_audio\_CreateConnector();  
> le\_audio\_Connect(AudioOutputConnectorRef, SpeakerAudioRef);  
> le\_audio\_Connect(AudioOutputConnectorRef, UsbInputAudioRef);

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [May 12, 2020, 3:36am UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302/6 "2020-05-12T03:36:00Z")

</div>

StreamMedia is using UCP/UDP stuff to communicate.

If you use WP76 as USB headset, I suggest you trying the AT!AVPLAY command first to make sure you can hear something on the host.

---

<div class="post-metadata">

**Author:** ![ben1](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@ben1](https://forum.sierrawireless.com/u/ben1)\
**Post date:** [May 12, 2020, 4:54am UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302/7 "2020-05-12T04:54:41Z")

</div>

There’s already a profile set up:

> at!avsetprofile?  
> !AVSETPROFILE: 5,0,0,0,3,0

I don’t see an **avplay** command in the AT reference manual, and it it’s a hidden command, it is hidden well:

> at!avplay  
> ERROR  
> at!avplay=/tmp/m  
> ERROR  
> at!avplay  
> ERROR  
> at!avplay?  
> ERROR  
> at!avplay=5,/tmp/mictest2.wav  
> ERROR

There’s a command called **avaudio** , and with it I can record from the microphone, and play a .wav file out the speakers, but nothing goes out USB to the host.  
I guess I don’t understand the USB audio path.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [May 12, 2020, 4:57am UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302/8 "2020-05-12T04:57:30Z")

</div>

sorry, I typed wrong command, should be AT!AVAUDIO.

do you use arecord in ubuntu? or you can try voice call to make sure the USB audio is working first.

---

<div class="post-metadata">

**Author:** ![ben1](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@ben1](https://forum.sierrawireless.com/u/ben1)\
**Post date:** [May 12, 2020, 5:28am UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302/9 "2020-05-12T05:28:49Z")

</div>

I don’t have a working SIM card right now so can’t try a call. Yes, I was running arecord in Ubuntu. My goal is to make the WP7611 like a USB handset for another computer, but I’m using Ubuntu for testing. Like I said before, we’ll use the WP7611 for LTE data, but I want to use the PCM codec for analog input and output. Is there a way I can play a .wav file on the WP7611 and make it seem like USB microphone data on Ubuntu?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [May 12, 2020, 6:44am UTC](https://forum.sierrawireless.com/t/audio-usb-passthrough-on-wp7611/20302/10 "2020-05-12T06:44:01Z")

</div>

Here is my testing:

1. type the following in AT command channel:  
at!avcfg=5,1,3  
AT!AVSETPROFILE=5

2. in ubuntu PC

arecord -D front:CARD=WP7607,DEV=0 -r 8000 --format S16\_LE /home/owner/Downloads/record.wav

1. type the following in WP76  
AT!AVAUDIO=1,1,/home/root/0-to-9.wav

2. after some time after the playback, type at!avaudio=1,0 in AT command channel in WP76

3. now you can playback record.wav in Ubuntu PC, and it is proven that the 0-to-9.wav is recorded to PC.
