DigiRig Lite Not Recognized - RPI4B

Just plugged in the new Lite version to the RPI 4B and ran LSUSB:
steve@SparePi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Obviously, nothing showed up. I realize it wouldn’t be shown as a USB port but it is, after all, a USB device, right?

I had similar issues with my DigiRig lite. While troubleshooting I tried different versions of the OS and different SD cards to no avail. Consider using a USB Hub between your rPi 4 and the DigiRig lite (this did work for me) or try using an older version of the rPi ( v 3b worked for me).

Thanks.

I’ve been using a powered hub for a couple days with no noticeable difference, however, I tried the isolator again yesterday and ran arecord -l and it appeared!

Thanks for the reminder.

Steven

Thanks for the update, I hope that it continues to appear as I have continued to have spotty connection issues with my digirig lite on my raspberry pi 4.

I see that here too now.

I’ve gone back to the Mobile version. It works fine with a single radio but, when adding a second identical digirig, its a calamity. The PI wants to reset the device numbers…which is a disaster for Direwolf. Ugh.

I think that using something like the following you would be able to connect the device to a specific permission and destination based off of the command

devadm info -a -n /dev/sdb

Should be able to find something like serial number to map a device to a specific end point.

https://unix.stackexchange.com/questions/141255/give-a-specific-user-permissions-to-a-device-without-giving-access-to-other-user

Additional information that I found that might apply

One might think that. Digirigs have no serial numbers however.

@Akasonny I did some looking and on my digirig lite I have the following attributes that I would look into seeing if they’re different.

looking at parent device '/devices/platform/soc/3f980000.usb/usb1':
...
ATTRS{serial}=="3f980000.usb"```

looking at parent device '/devices/platform/soc/3f980000.usb':
...
ATTRS{guid}=="GUID = 0x2708a000"



and for my DigiRig Moblie

I ran the following command find /sys/bus/usb/devices/usb*/ -name dev

and got this output which seems to indicate something like a mac address difference between my devices, maybe this is enough to help you find the difference in your DigiRig devices.

/sys/bus/usb/devices/usb1/dev
/sys/bus/usb/devices/usb1/1-1/1-1.5/dev
/sys/bus/usb/devices/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.0/gpiochip3/dev
/sys/bus/usb/devices/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.0/ttyUSB0/tty/ttyUSB0/dev
/sys/bus/usb/devices/usb1/1-1/1-1.5/1-1.5.1/dev
/sys/bus/usb/devices/usb1/1-1/1-1.5/1-1.5.2/dev
/sys/bus/usb/devices/usb1/1-1/1-1.5/1-1.5.2/1-1.5.2:1.0/sound/card1/pcmC1D0c/dev
/sys/bus/usb/devices/usb1/1-1/1-1.5/1-1.5.2/1-1.5.2:1.0/sound/card1/pcmC1D0p/dev
/sys/bus/usb/devices/usb1/1-1/1-1.5/1-1.5.2/1-1.5.2:1.0/sound/card1/controlC1/dev
/sys/bus/usb/devices/usb1/1-1/1-1.5/1-1.5.2/1-1.5.2:1.3/0003:0D8C:0012.0003/input/input3/event2/dev
/sys/bus/usb/devices/usb1/1-1/1-1.5/1-1.5.2/1-1.5.2:1.3/0003:0D8C:0012.0003/hidraw/hidraw2/dev
/sys/bus/usb/devices/usb1/1-1/1-1.3/1-1.3:1.3/0003:0D8C:0012.0002/input/input2/event1/dev
/sys/bus/usb/devices/usb1/1-1/1-1.3/1-1.3:1.3/0003:0D8C:0012.0002/hidraw/hidraw1/dev
/sys/bus/usb/devices/usb1/1-1/1-1.3/dev
/sys/bus/usb/devices/usb1/1-1/1-1.3/1-1.3:1.0/sound/card0/controlC0/dev
/sys/bus/usb/devices/usb1/1-1/1-1.3/1-1.3:1.0/sound/card0/pcmC0D0c/dev
/sys/bus/usb/devices/usb1/1-1/1-1.3/1-1.3:1.0/sound/card0/pcmC0D0p/dev
/sys/bus/usb/devices/usb1/1-1/1-1.1/dev
/sys/bus/usb/devices/usb1/1-1/dev

I would be looking to create perhaps some sort of mapping based on the USB port that a digirig is connected to gets mapped to a specific device number “/dev/hidraw1”… “/dev/hidraw2”

To ensure a USB sound card always appears as the same /dev/ device on a Linux system based on the USB port it’s plugged into, you can use udev rules to map the device to a consistent device file. This can be achieved by identifying the USB port’s unique attributes and creating a persistent symlink. Below is a step-by-step guide to accomplish this:

Step 1: Identify the USB Sound Card and Port Details

  1. Plug in the USB Sound Card to the desired USB port on the motherboard.

  2. Check the Device Information: Run the following command to list USB devices and their attributes:

bash

lsusb

This will display a list of USB devices, including your sound card. Note the vendor ID and product ID (e.g., 1234:5678).

  1. Get Detailed USB Port Information: Use lsusb -t to see the USB device tree and identify the port path:

bash

lsusb -t

This shows the USB hierarchy, including bus and port numbers (e.g., Bus 01.Port 3). Note the bus and port number for your sound card.

  1. Find the Device in /sys: Run udevadm info to get detailed information about the device:

bash

udevadm info -a -p $(udevadm info -q path -n /dev/snd/controlC0)

Replace /dev/snd/controlC0 with the actual device node of your sound card (check /dev/snd/ to find the correct one, e.g., controlC0, controlC1, etc.). Look for attributes like:

  • ATTRS{idVendor} (matches the vendor ID from lsusb)

  • ATTRS{idProduct} (matches the product ID from lsusb)

  • ATTRS{port} (the USB port number)

  • KERNELS (shows the USB port path, e.g., 1-3 for Bus 1, Port 3)

The KERNELS or DEVPATH will include the USB port path, which is critical for identifying the specific port.

Step 2: Create a udev Rule

  1. Write a udev Rule: Create a new udev rule file, e.g., /etc/udev/rules.d/90-usb-soundcard.rules:

bash

sudo nano /etc/udev/rules.d/90-usb-soundcard.rules
  1. Add a Rule Based on USB Port: Use the USB port path and device attributes to create a persistent symlink. For example:

bash

SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS=="1-3", ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", SYMLINK+="snd/mysoundcard"
  • SUBSYSTEM==“sound”: Targets sound devices.

  • KERNEL==“controlC*”: Matches the sound card control device (adjust if needed, e.g., controlC0, controlC1).

  • KERNELS==“1-3”: Matches the USB port path (replace 1-3 with the port path from udevadm info, e.g., 1-3 for Bus 1, Port 3).

  • ATTRS{idVendor}==“1234”, ATTRS{idProduct}==“5678”: Matches the sound card’s vendor and product IDs.

  • SYMLINK+=“snd/mysoundcard”: Creates a symlink at /dev/snd/mysoundcard for the device.

Save and close the file.

  1. Test the Rule: Reload udev rules and trigger them:

bash

sudo udevadm control --reload-rules
sudo udevadm trigger
  1. Verify the Symlink: Unplug and replug the USB sound card into the same port, then check if the symlink appears:

bash

ls -l /dev/snd/

You should see something like:

bash

lrwxrwxrwx 1 root root 12 Jun  9 12:57 mysoundcard -> controlC0

Step 3: Verify Consistency

  • Plug the sound card into a different USB port to ensure the symlink only appears when connected to the specified port.

  • If the symlink doesn’t appear or points to the wrong device, double-check the KERNELS, idVendor, and idProduct values in the udev rule.

Additional Notes

  • Port Path Specificity: The KERNELS attribute ensures the rule applies only to the specific USB port. If the motherboard has multiple USB controllers, the Bus number might change, so verify the port path with lsusb -t or udevadm info.

  • Multiple Sound Cards: If you have multiple USB sound cards, use unique idVendor and idProduct values or additional attributes like ATTRS{serial} to differentiate them.

  • Dynamic Device Nodes: The actual device node (controlC0, controlC1, etc.) may change based on the order devices are detected. The symlink ensures your application always references the same path (/dev/snd/mysoundcard).

  • Debugging: If the rule doesn’t work, check udev logs:

bash

sudo udevadm monitor

Then plug in the device to see how udev processes it.

Example for Clarity

Suppose your USB sound card has:

  • Vendor ID: 0d8c

  • Product ID: 013c

  • USB port path: 1-2 (Bus 1, Port 2)

Your udev rule would look like:

bash

SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS=="1-2", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="013c", SYMLINK+="snd/mysoundcard"

This creates a consistent /dev/snd/mysoundcard symlink whenever the sound card is plugged into the specified port.

Troubleshooting

  • No Symlink: Ensure the KERNELS value matches the exact port path from udevadm info.

  • Wrong Device: Verify the idVendor and idProduct are correct and unique to your sound card.

  • Permissions: If the symlink is created but inaccessible, add a MODE=“0660”, GROUP=“audio” to the udev rule to set appropriate permissions:

bash

SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS=="1-2", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="013c", SYMLINK+="snd/mysoundcard", MODE="0660", GROUP="audio"

This approach ensures your USB sound card is consistently mapped to the same /dev/ device based on the USB port, making it reliable for applications that require a fixed device path.

@K0TX is a serial number something that might be able to be added to the DigiRig devices in the future or is this up to the “C-Media Electronics Inc.”

Yes however when you have two or more identical sound cards, such as Digirig Mobile, there is no discernible, separate device identification. The only possibility, as I see it, is to map the actual USB ports.

Steven