feat: initial bluetooth support (#9)

* Enable Bluetooth LE radio support
* Build our own bccmd which we need to setup/enable this BT chipset sadly
* Use our own tool we build to interface with the ubnt eeprom, so we can not rely on their custom kernel module
* Also fix HDDs not spinning down on shutdown, doing something similar to how unifi does it but a tad more generic.
This commit is contained in:
Chris Blake 2024-06-12 20:38:37 -05:00 committed by GitHub
parent fe3b4cd76f
commit 9ef1a72228
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 678 additions and 20 deletions

View file

@ -1,13 +1,7 @@
#!/bin/bash
if [ "$1" == "id" ]; then
BOARD_SYSID=$(grep systemid /proc/ubnthal/system.info | sed 's|systemid=||g')
BOARD_SERIALNO=$(grep serialno /proc/ubnthal/system.info | sed 's|serialno=||g')
# BOM is in SPI on EEPROM part, offset D000 is start of TlvInfo. BOM starts with 113-
BOARD_BOM=$(dd if=/dev/mtd4 bs=64 skip=832 count=1 status=none | strings | grep 113-)
echo "board.sysid=0x${BOARD_SYSID}"
echo "board.serialno=${BOARD_SERIALNO}"
echo "board.bom=${BOARD_BOM}"
ubnteeprom -tools
else
echo "Unknown ubnt-tools cmd: $@" >> /tmp/ubnt-tools-unknown.log
fi