############################# # # # Bluetooth configuration # # # ############################# create_missing_dir "/etc/bluetooth/" cat << __EOF__ > "${TARGET_DIR}/etc/bluetooth/main.conf" [General] Class = 0x200428 DiscoverableTimeout = 0 PairableTimeout = 0 [Policy] AutoEnable=true __EOF__ # Accept any code from any connexion echo "* *" > "${TARGET_DIR}/etc/bluetooth/pins" enable_service "bt-agent.service" create_missing_dir "/etc/dbus-1/system.d/" cat << __EOF__ > "${TARGET_DIR}/etc/dbus-1/system.d/bluetooth.conf" __EOF__ # Set permission to 755 in the directory /var/lib/bluetooth/ (prevent a # permission error) sed --in-place "s/0555/0755/" ${TARGET_DIR}/usr/lib/systemd/system/bluetooth.service ## The same for the bluetooth, as bluetoothd keep a track for each paired device create_missing_dir "/var/lib/bluetooth/" #if ! grep -qE '/var/lib/bluetooth' "${TARGET_DIR}/etc/fstab"; then # cat << __EOF__ >> "${TARGET_DIR}/etc/fstab" #tmpfs /var/lib/bluetooth tmpfs rw 0 0 #__EOF__ #fi