This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hidapitester -q --vidpid 1038:2202 --usagePage 0xFF00 -l 3 -t 30000 --open --read-input-forever | while read -r -a data | |
do | |
[ ${data[0]} = 45 ] && osascript -e "set volume output volume $(( (0x${data[1]} + 0x64 - 0x${data[2]}) / 2 ))" & | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This SSDT is essentially sending "CAP_EXP+10.w=0052" as well as a RST() call | |
// in order to switch the Fibocom WWAN card to USB mode. | |
// This is fully working on my ThinkPad T490s (20NX*), but I cannot guarantee | |
// that this code will work for you as well. Read below for instructions for other brands. | |
// There might be issues when going out of sleep mode? I vaguely recall | |
// having rare issues in these cases. Going in sleep mode and going out fixed it. | |
// There are probably better ways to do something like this... |