Phison based flash drives have various modes that dictate how they operate;
- as a regular flash drive (mode 3)
- as a dual-volume flash drive (mode 7)
- as a single volume flash drive + cdrom (mode 21)
| curl -LO https://github.com/sbingner/llvm-project/releases/download/v10.0.0-1/linux-ios-arm64e-clang-toolchain.tar.lzma | |
| TMP=$(mktemp -d) | |
| tar --lzma -xvf linux-ios-arm64e-clang-toolchain.tar.lzma -C $TMP | |
| pushd $TMP/ios-arm64e-clang-toolchain/bin | |
| find * ! -name clang-10 -and ! -name ldid -and ! -name ld64 -exec mv {} arm64-apple-darwin14-{} \; | |
| find * -xtype l -exec sh -c "readlink {} | xargs -I{LINK} ln -f -s arm64-apple-darwin14-{LINK} {}" \; | |
| popd | |
| mkdir -p $THEOS/toolchain/linux/iphone | |
| mv $TMP/ios-arm64e-clang-toolchain/* $THEOS/toolchain/linux/iphone/ | |
| rm -rf $TMP linux-ios-arm64e-clang-toolchain.tar.lzma |
| This first example assumes two usb serial port adapters are connected to the host machine. They enumerate as ttyUSB0 and ttyUSB1. | |
| We want data coming into ttyUSB0 to be piped right back out of ttyUSB1 (so our host sits as a man in the middle). | |
| We want an application running on the host to be able to connect to a com port and monitor the traffic. | |
| # create the fifo | |
| sudo mkfifo -m 777 /tmp/fifo | |
| # stream serial data on /dev/ttyUSB0 to the fifo AND a virtual com port /tmp/relay | |
| sudo socat /dev/ttyUSB0,raw,echo=0 system:'sudo tee /tmp/fifo | sudo socat - "pty,raw,echo=0,link=/tmp/relay"' & |