mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-24 13:36:31 +00:00
Update bluetooth docs & add udev rules (#92)
* Update bluetooth docs * add udev rules * Add cmp to build * Create bluetooth.md
This commit is contained in:
parent
bf69f2e974
commit
173596eec5
12
Documentation/bluetooth.md
Normal file
12
Documentation/bluetooth.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Bluetooth
|
||||
|
||||
We support `bluetoothctl` on host. Later we want also support bluetooth trought UI.
|
||||
All pairs and settings are persistent over reboots and updates.
|
||||
|
||||
If you want setup bluetooth on host, use the *bluetoothctl* utility.
|
||||
|
||||
## Scan devices
|
||||
|
||||
```
|
||||
[bluetooth]# scan on
|
||||
```
|
@ -398,7 +398,7 @@ CONFIG_SHOWKEY=y
|
||||
CONFIG_AWK=y
|
||||
CONFIG_FEATURE_AWK_LIBM=y
|
||||
CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y
|
||||
# CONFIG_CMP is not set
|
||||
CONFIG_CMP=y
|
||||
# CONFIG_DIFF is not set
|
||||
# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
|
||||
# CONFIG_FEATURE_DIFF_DIR is not set
|
||||
|
@ -16,14 +16,17 @@ define BLUETOOTH_BCM43XX_BUILD_CMDS
|
||||
endef
|
||||
|
||||
define BLUETOOTH_BCM43XX_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/hassos-hardware.wants
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants
|
||||
cp -f $(@D)/bluetooth-bcm43xx $(TARGET_DIR)/usr/sbin/
|
||||
cp -f $(@D)/bluetooth-bcm43xx.service $(TARGET_DIR)/usr/lib/systemd/system/
|
||||
ln -fs /usr/lib/systemd/system/bluetooth-bcm43xx.service $(TARGET_DIR)/etc/systemd/system/hassos-hardware.wants/
|
||||
ln -fs /usr/lib/systemd/system/bluetooth-bcm43xx.service $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants/
|
||||
|
||||
mkdir -p $(TARGET_DIR)/lib/firmware/brcm
|
||||
cp -f $(@D)/BCM43430A1.hcd $(TARGET_DIR)/lib/firmware/brcm/
|
||||
cp -f $(@D)/BCM4345C0.hcd $(TARGET_DIR)/lib/firmware/brcm/
|
||||
|
||||
mkdir -p $(TARGET_DIR)/etc/udev/rules.d
|
||||
cp -f $(@D)/bluetooth-bcm43xx.rules $(TARGET_DIR)/etc/udev/rules.d/
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
@ -0,0 +1,22 @@
|
||||
KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
|
||||
ALIASES=/proc/device-tree/aliases; \
|
||||
if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
|
||||
echo 0;\
|
||||
elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
|
||||
echo 1; \
|
||||
else \
|
||||
exit 1; \
|
||||
fi\
|
||||
'", SYMLINK+="serial%c"
|
||||
|
||||
KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
|
||||
ALIASES=/proc/device-tree/aliases; \
|
||||
if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
|
||||
echo 0; \
|
||||
elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
|
||||
echo 1; \
|
||||
else \
|
||||
exit 1; \
|
||||
fi \
|
||||
'", SYMLINK+="serial%c"
|
||||
|
Loading…
x
Reference in New Issue
Block a user