mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2025-06-05 22:19:21 +02:00
MycroftOS: Add Bluetooth Speaker functionality.
This commit is contained in:
@@ -7,6 +7,7 @@ menu "Mycroft A.I. Personal Assistant"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/wifi-ap/Config.in"
|
||||
menu "Additional drivers, libraries and/or applications"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/alsa-plugins/Config.in"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/btspeaker/Config.in"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/fann/Config.in"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/respeaker/Config.in"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/spotifyd/Config.in"
|
||||
|
||||
@@ -54,7 +54,6 @@ BR2_PACKAGE_ALSA_UTILS_ASEQNET=y
|
||||
BR2_PACKAGE_ALSA_UTILS_BAT=y
|
||||
BR2_PACKAGE_ALSA_UTILS_IECSET=y
|
||||
BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
|
||||
BR2_PACKAGE_BLUEZ_ALSA=y
|
||||
BR2_PACKAGE_FAAD2=y
|
||||
BR2_PACKAGE_FFMPEG_GPL=y
|
||||
BR2_PACKAGE_FFMPEG_NONFREE=y
|
||||
@@ -205,6 +204,7 @@ BR2_PACKAGE_LIBSIDPLAY2=y
|
||||
BR2_PACKAGE_OPUSFILE=y
|
||||
BR2_PACKAGE_PORTAUDIO=y
|
||||
BR2_PACKAGE_PORTAUDIO_OSS=y
|
||||
BR2_PACKAGE_SBC=y
|
||||
BR2_PACKAGE_SPEEXDSP=y
|
||||
BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING=y
|
||||
BR2_PACKAGE_LIBARCHIVE=y
|
||||
@@ -253,6 +253,11 @@ BR2_PACKAGE_PCRE2_32=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_BLUEZ_TOOLS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_OBEX=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_DNSMASQ=y
|
||||
# BR2_PACKAGE_DNSMASQ_TFTP is not set
|
||||
@@ -314,6 +319,7 @@ BR2_PACKAGE_MYCROFT_SERVICE=y
|
||||
BR2_PACKAGE_MYCROFT_SPLASH=y
|
||||
BR2_PACKAGE_WIFI_AP=y
|
||||
BR2_PACKAGE_ALSA_PLUGINS=y
|
||||
BR2_PACKAGE_BTSPEAKER=y
|
||||
BR2_PACKAGE_FANN=y
|
||||
BR2_PACKAGE_RESPEAKER=y
|
||||
BR2_PACKAGE_SPOTIFYD=y
|
||||
|
||||
6
buildroot-external/package/btspeaker/Config.in
Normal file
6
buildroot-external/package/btspeaker/Config.in
Normal file
@@ -0,0 +1,6 @@
|
||||
config BR2_PACKAGE_BTSPEAKER
|
||||
bool "btspeaker"
|
||||
help
|
||||
Service to start a BT Speaker daemon.
|
||||
|
||||
https://www.j1nx.nl
|
||||
24
buildroot-external/package/btspeaker/btspeaker.mk
Normal file
24
buildroot-external/package/btspeaker/btspeaker.mk
Normal file
@@ -0,0 +1,24 @@
|
||||
################################################################################
|
||||
#
|
||||
# btspeaker
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BTSPEAKER_VERSION = 0.1.0
|
||||
BTSPEAKER_SITE = $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/btspeaker
|
||||
BTSPEAKER_SITE_METHOD = local
|
||||
BTSPEAKER_LICENSE = Apache License 2.0
|
||||
BTSPEAKER_LICENSE_FILES = LICENSE
|
||||
|
||||
define BTSPEAKER_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 644 $(@D)/btspeaker.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/btspeaker.service
|
||||
|
||||
mkdir -p $(TARGET_DIR)/etc/bluetooth
|
||||
$(INSTALL) -D -m 644 $(@D)/main.conf \
|
||||
$(TARGET_DIR)/etc/bluetooth/main.conf
|
||||
$(INSTALL) -D -m 600 $(@D)/pin.conf \
|
||||
$(TARGET_DIR)/etc/bluetooth/pin.conf
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
13
buildroot-external/package/btspeaker/btspeaker.service
Normal file
13
buildroot-external/package/btspeaker/btspeaker.service
Normal file
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Bluetooth Auth Agent
|
||||
After=bluetooth.service
|
||||
PartOf=bluetooth.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/usr/bin/bt-adapter -s Powered on
|
||||
ExecStartPre=/usr/bin/bt-adapter -s Discoverable on
|
||||
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput -p /etc/bluetooth/pin.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=bluetooth.target
|
||||
4
buildroot-external/package/btspeaker/main.conf
Normal file
4
buildroot-external/package/btspeaker/main.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
[General]
|
||||
Name = MycroftOS
|
||||
Class = 0x41C
|
||||
DiscoverableTimeout = 0
|
||||
1
buildroot-external/package/btspeaker/pin.conf
Normal file
1
buildroot-external/package/btspeaker/pin.conf
Normal file
@@ -0,0 +1 @@
|
||||
* 0000
|
||||
@@ -1,2 +1,2 @@
|
||||
|
||||
mycroft -1 mycroft -1 =mycroft /home/mycroft /bin/sh input,i2c,spi,gpio,audio,video,pulse,pulse-access Mycroft user
|
||||
mycroft -1 mycroft -1 =mycroft /home/mycroft /bin/sh input,i2c,spi,gpio,audio,video,pulse,pulse-access,lp Mycroft user
|
||||
|
||||
Reference in New Issue
Block a user