1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-24 05:17:06 +02:00
dockerfiles/hass/arm/ibeacon.service

31 lines
1.0 KiB
SYSTEMD
Raw Normal View History

2017-04-23 11:24:50 +08:00
# /etc/systemd/system/ibeacon.service
[Unit]
Description=iBeacon Service
Requires=bluetooth.service
After=dbus-org.bluez.service sys-subsystem-bluetooth-devices-hci0.device
[Service]
Type=oneshot
Environment="UUID=88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88"
Environment="MAJOR=00 00"
Environment="MINOR=00 00"
2017-04-23 14:06:54 +08:00
Environment="POWER=C8"
2023-12-30 12:31:05 +08:00
Environment="MIN_INTERVAL=A0 00"
Environment="MAX_INTERVAL=40 06"
Environment="ADV_MODE=03"
ExecStart=/bin/hciconfig hci0 reset
2017-04-23 11:24:50 +08:00
ExecStart=/bin/hciconfig hci0 noscan
2017-04-23 14:06:54 +08:00
ExecStart=/usr/bin/hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 $UUID $MAJOR $MINOR $POWER 00
2023-12-30 12:31:05 +08:00
ExecStart=/usr/bin/hcitool -i hci0 cmd 0x08 0x0006 $MIN_INTERVAL $MAX_INTERVAL $ADV_MODE 00 00 00 00 00 00 00 00 07 00
2017-04-23 11:24:50 +08:00
ExecStart=/usr/bin/hcitool -i hci0 cmd 0x08 0x000a 01
2024-01-03 21:15:15 +08:00
2017-04-23 11:24:50 +08:00
# See: http://stackoverflow.com/questions/21124993/
2023-12-30 12:31:05 +08:00
# ExecStart=/bin/hciconfig hci0 leadv 3 # IT WILL OVERWRITE ADV RATE
2024-01-03 21:15:15 +08:00
#ExecStop=/bin/hciconfig hci0 noleadv
#ExecStop=/bin/hciconfig hci0 reset
#RemainAfterExit=yes
2017-04-23 11:24:50 +08:00
2024-01-03 21:15:15 +08:00
#[Install]
#WantedBy=multi-user.target