Anyone on here good with USB device code - descriptors etc?
I have this C++ / C (linked) which started life as an ARM mbed example for Raspberry Pi Pico. It's the firmware for the "Bat Detector" USB microphone and the "Griff" USB microphones, when installed on a Raspberry Pi Pico the Pico is recognised by WIndows (I have been told, I'm Mac only), MacOS, iOS and Linux (VMWare Fusion + Ubuntu 64 on a Mac host) as a USB microphone, but it isn't recognised by Android. My USB experience is zero, my Android experience is zero, and it would be SO valuable for the community if this coould be made to work for Android hosts, unlocking Bill Krauss's "Bat Recorder" for people with tiny budgets - the Bat Detector and Griff USB mics can be built for £10.
Thsi needs to be dropped into your pico-examples tree in your pico development environment, drop an add_subdirectory(pipistrelle-usb-mic) into your Cmakelists.txt and you can build it and install onto a Pico.
If anyone can help, I will owe you multiple beers.
8 November 2024 2:40pm
I saw in your code that you're using UAC2. As far as I understand, support for UAC2 is heavily dependent on the specific device and even then I'm not sure if they fully implemented UAC2 yet in Android. Are you able to use UAC1? I can imagine that you might need the increased sampling rate in UAC2.
10 November 2024 7:12am
I guess, you know USB digital audio | Android Open Source Project. from which I conclude it should be possible, however, my Android experience is also zero.
28 June 2026 3:19pm
Hi — I came across this thread just joining the community. I'm an electronics and embedded systems engineer with 30 years of firmware and hardware design experience, mostly on STM32 and similar ARM Cortex-M targets.
The UAC2/Android issue is a known pain point. Android's UAC2 support has been inconsistent across vendors and API levels — it was only partially addressed in Android 5.0 and many OEMs never fully implemented it. Phil is right that if TinyUSB only exposes UAC2 descriptors, most Android devices will simply ignore the device.
A possible path forward without abandoning TinyUSB: some versions of TinyUSB do allow building a composite device or overriding the audio class descriptor manually. If you can post the relevant section of your usb_descriptors.c (specifically the audio function descriptor and the bcdADC field), I can take a look and see if there's a way to force UAC1 compatibility at the descriptor level without breaking the existing hosts.
Alternatively — and this might be the simpler path — have you considered a small STM32F0 or STM32G0 as the USB bridge? They have mature HAL USB audio support with UAC1 out of the box, cost under £1 in volume, and would leave your Pico firmware untouched.
Happy to help either way.
28 June 2026 4:02pm
Love this advice down to the chip level 😀
Ivan Herrera Olivares