I want to read a microphone (class 1 from NTi), which is connected to auxiliary power source (Phantom 48V power supply) and then the output is teed through it. The sensor has a XLR connector and I got a XLR to USB cable and connected it Pi 4.

It shows under /dev/hidraw3. I don't know how to read hidraw and I could barely find any information on internet about it.

lsusb shows this for the mic:

Bus 001 Device 006: ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)

ls - l shows this:

crw------- 1 root root 244, 3 Mar  1 14:09 /dev/hidraw3

I am able to change the permission and at first I thought its a serial port and tried reading it with a serial read script but it throws error. I found that this is a completely different connection and not serial.

I am wondering can I somehow read this microphone as a serial device on Pi, maybe with a usb to serial converter or writing a script for that? Is that even possible or the sensor output itself is not serial? Any guidance regarding this is helpful.

Edit 1: I tried to use it on windows, it records voice. Then, I thought of trying it on raspberry for voice recording and to my surprise, it is able to record voice on pi i.e. it is being read as an audio device.

  • just do cat /dev/hidraw3 and make a sound ... see if anything happens
    – jsotola
    Mar 1, 2021 at 21:33
  • I tried that, it's not showing up anything for some reason. Mar 2, 2021 at 22:29
  • if you have access to a computer with MS windows OS, then try the hardware on that, to see if it actually works
    – jsotola
    Mar 3, 2021 at 1:03
  • It works on windows, I tried recording voice with it and it is recording. Then I tried to record voice on Pi, it is able to record voice there too. I just want to be able to read it as a serial device. Mar 3, 2021 at 18:12
  • that's good ... look through the /dev directory ... it may be available in another location, other than /dev/hidraw3 .... you'll probably have to write a driver that converts audio data to serial
    – jsotola
    Mar 3, 2021 at 20:23

1 Answer 1


I figured it out, if all you want in the end is audio information in whatever format (which is my use case), you can use follow the steps here and here, make sure you change the files according to your OS and rasp Pi model. After making the default card number change in the config file, you should be able to save a recording in whatever format and duration with the help of arecord command. Feel free to contact me if you need help with any of this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.