Étape 3: Configurer Bluetooth Low Energy sur Démarrer
Instructions originales pour activer Bluetooth :
rfkill unblock bluetooth killall bluetoothd hciconfig hci0 up
Vous devez créer un fichier dans "/ init.d" pour activer le Bluetooth Low Energy au démarrage.
Le fichier s’appelle « ble ».
Créez un répertoire
cd /etc mkdir init.d cd init.d
Puis modifiez fichier « ble ».
vi ble
Copiez le fichier contenu ci-dessous dans le fichier « ble ».
#! / bin/sh start() {} #!/bin/sh start(){ rfkill unblock bluetooth killall bluetoothd hciconfig hci0 up echo "ble up" } stop(){ hciconfig hci0 down echo "ble down" } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; esac exit 0
Activez « ble » fichier soit exécutable :
chmod +x ble
Puis lancez le fichier :
/etc/init.d/ble start
Pour lancer le fichier à bord de démarrage :
update-rc.d ble defaults