doc:appunti:hardware:qnap_ts-120
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:hardware:qnap_ts-120 [2022/02/12 08:04] – [Serial Console] niccolo | doc:appunti:hardware:qnap_ts-120 [2025/01/10 11:15] (current) – [USB audio dongle] niccolo | ||
---|---|---|---|
Line 107: | Line 107: | ||
^ 4 | GND | | ^ 4 | GND | | ||
- | This is the boot process captured from the serial line: | + | This is the boot process captured from the serial line. At the end of the bootstrap you will get a **login prompt**. |
< | < | ||
Line 252: | Line 252: | ||
Now try to reboot. If the problem is fixed, you may remove the file **/ | Now try to reboot. If the problem is fixed, you may remove the file **/ | ||
+ | |||
+ | ===== USB audio dongle ===== | ||
+ | |||
+ | I use the QNAP also as a **media player** because it stores all my audio files. I attached it to my HiFi amplifier through an **USB audio dongle** and an **audio cable** (3.5 mm jack - RCA stereo plugs). | ||
+ | |||
+ | I faced a problem with that audio USB interface, because at every reboot the device is not working and it does not show in **lsusb** output. The manual workaround was to unplup and re-plug the device into the USB port. | ||
+ | |||
+ | Fortunately it is possibile to force the re-initialization of the USB controller with the following script: | ||
+ | |||
+ | <code bash> | ||
+ | #!/bin/sh | ||
+ | # If the USB audio device is missing, try to reset the USB controller. | ||
+ | # USB 2.0 devices may be under / | ||
+ | PATH="/ | ||
+ | lsusb | grep -q ' | ||
+ | RET=$? | ||
+ | if [ " | ||
+ | echo "USB audio device missing, trying to reset the bus." | ||
+ | cd / | ||
+ | echo -n " | ||
+ | sleep 1 | ||
+ | echo -n " | ||
+ | fi | ||
+ | </ | ||
+ | |||
+ | So I created a systemd service to be run when the host reaches the multi-user target. Create the file **/ | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | # | ||
+ | # Service executed once the system has reached the multi-user status. | ||
+ | # | ||
+ | # Type=oneshot | ||
+ | # RemainAfterExit=yes | ||
+ | # when all its processes exited. | ||
+ | # | ||
+ | # Eanble the service with: | ||
+ | # | ||
+ | |||
+ | [Service] | ||
+ | Type=oneshot | ||
+ | RemainAfterExit=yes | ||
+ | ExecStart=/ | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </ | ||
+ | |||
+ | Enable and start the service with: | ||
+ | |||
+ | < | ||
+ | systemctl --now enable usb-audio-dongle-reset.service | ||
+ | </ | ||
doc/appunti/hardware/qnap_ts-120.1644649462.txt.gz · Last modified: 2022/02/12 08:04 by niccolo