Troubleshooting¶
This section lists common problems and possible solutions. If you experience other problems or would like to add a solution for a problem feel free to open an issue in our Github project or send us an email to info@linux-automation.com.
Permission denied when accessing the USB-SD-Mux¶
Problem: When using the control software a PermissionError: Permission denied is raised.
In the following example a user tries to access the sg
-device
without the appropriate permissions:
chris@dauntless:~$ usbsdmux /dev/sg0 get
Traceback (most recent call last):
File "/tmp/usbsdmux/venv/bin/usbsdmux", line 10, in <module>
sys.exit(main())
File "/tmp/usbsdmux/…/usbsdmux/__main__.py", line 77, in main
File "/tmp/usbsdmux/…/usbsdmux/usbsdmux.py", line 55, in get_mode
File "/tmp/usbsdmux/…/usbsdmux/pca9536.py", line 73, in read_register
File "/tmp/usbsdmux/…/usbsdmux/usb2642i2c.py", line 425, in write_read_to
File "/tmp/usbsdmux/…/usbsdmux/usb2642i2c.py", line 337, in _call_IOCTL
PermissionError: [Errno 13] Permission denied: '/dev/sg0'
The user has no sufficient permissions to access the device node for /dev/sg0
.
To fix this issue either run the tool as root
(e.g. using sudo
) or use
udev
to grant access to the device to your user.
The see Chapter Using as non-root user for setup
instructions.
No /dev/sg* device on the host¶
Problem: The Linux sg
kernel module is not automatically loaded when
an USB-SD-Mux is connected to the host computer.
Depending on you Linux distribution and other aspects of you system the sg
module, that is used to communicate with the USB-SD-Mux, may not be loaded when
a new mux is connected.
To check if this is the case you can load the module manually using
sudo modprobe sg
and (if so) add it to /etc/modules
or a a file in
/etc/modules-load.d
:
chris@dauntless:~$ echo "sg" | sudo tee -a /etc/modules
sg
chris@dauntless:~$ sudo systemctl reboot # changes take effect after a reboot
or:
chris@dauntless:~$ echo "sg" | sudo tee /etc/modules-load.d/usb-sd-mux.conf
sg
chris@dauntless:~$ sudo systemctl reboot # changes take effect after a reboot
Access to the SD card fails with timeouts or read errors¶
Problem: Using the USB-SD-Mux introduces an additional load and additional disturbances for the micro SD card of your DUT. This can lead to problems like read errors and timeouts.
There are multiple workarounds for this issue:
This problem mostly affects the USB-SD-Mux Classic. The signal-path in the USB-SD-Mux FAST has been re-designed from the ground up to improve performance with fast SD-cards. You may want to try using an USB-SD-Mux FAST if you are currently using a Classic.
Many users have reported that using a slow micro SD card yields better results than using a fast micro SD card.
Sometimes only ROM-Code (or integrated firmware) has trouble using the micro SD card inside the USB-SD-Mux. If this is the case, depending on your use-case, you may be able to load your bootloader from another media (like NAND-Flash or an eMMC) and afterwards access the SD card from inside this bootloader.
Depending on your setup you are maybe able to change drive-strength or the output-impedance matching of the used pins. This can help to access the micro SD card inside the USB-SD-Mux.
Depending on your setup you may be able to reduce the maximum clock frequency used.