Audio USB passthrough on WP7611

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:

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


!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.

1 Like

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

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)

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:

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);

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.

There’s already a profile set up:

!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:


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.

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.

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?

Here is my testing:

  1. type the following in AT command channel:

  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

  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.