hello !
i have a 4 line USB 2.0 switch that shows up as a USB HID device to all non-connected devices, that when issued a specific report will connect on that line
you can find a similar device documented by searching "danman USB switch", mine is a 4 line-switch where danman's is 2 line, but they seem to operate similarly
using info from danman's blogpost i wrote the following script on my linux-based setups that works to switch the line (see below)
i took a look at the available ps2dev homebrew toolchain but i'm afraid i'm out of my depth there, and so was curious if anyone here might have the know-how to
!/bin/bash
FILES=/dev/hidraw*
for f in $FILES
do
FILE=${f##*/}
DEVICE="$(cat /sys/class/hidraw/${FILE}/device/uevent | grep HID_NAME | cut -d '=' -f2)"
echo "$DEVICE" | grep "HID 1a86:e041" && echo -ne "\x55\x02\x00\x00\x00\x00\x00\x00" | dd of="/dev/$FILE" bs=8
done
i have a 4 line USB 2.0 switch that shows up as a USB HID device to all non-connected devices, that when issued a specific report will connect on that line
you can find a similar device documented by searching "danman USB switch", mine is a 4 line-switch where danman's is 2 line, but they seem to operate similarly
using info from danman's blogpost i wrote the following script on my linux-based setups that works to switch the line (see below)
i took a look at the available ps2dev homebrew toolchain but i'm afraid i'm out of my depth there, and so was curious if anyone here might have the know-how to
- confirm or deny this is possible to achieve with ps2 homebrew
- assist in authoring an app to trigger the switch for my (and perhaps others
?) benefit
!/bin/bash
FILES=/dev/hidraw*
for f in $FILES
do
FILE=${f##*/}
DEVICE="$(cat /sys/class/hidraw/${FILE}/device/uevent | grep HID_NAME | cut -d '=' -f2)"
echo "$DEVICE" | grep "HID 1a86:e041" && echo -ne "\x55\x02\x00\x00\x00\x00\x00\x00" | dd of="/dev/$FILE" bs=8
done