feat(bluetooth): add script to turn on UE Boom speaker
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
5fdf0d98ed
commit
e65fdd95eb
1 changed files with 24 additions and 1 deletions
|
@ -1,4 +1,27 @@
|
|||
{...}: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "turnOnUE";
|
||||
|
||||
runtimeInputs = [config.hardware.bluetooth.package];
|
||||
|
||||
text = ''
|
||||
cmd=0x0003
|
||||
bt_device_addr=88:C6:26:93:4B:77
|
||||
|
||||
# This is the MAC address on the first line of `bluetootctl show`
|
||||
# without the `:` and with `01` added at the end
|
||||
bt_controller_addr=E848B8C8200001
|
||||
|
||||
exec gatttool -b $bt_device_addr --char-write-req --handle=$cmd --value=$bt_controller_addr
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
# Setup Bluetooth
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
|
|
Loading…
Reference in a new issue