aboutsummaryrefslogtreecommitdiffstats
path: root/btle-advise.service
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-09-14 12:14:59 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-09-14 12:14:59 +0200
commit2ffcc61a750a2bf4598662b4612283fdc9d2a4e4 (patch)
treea729627f5474a4f5c84f3c7bf08bad6f71e44a73 /btle-advise.service
parent0bbf447e05691d6d14bae65bdbcfaef3c668bb1a (diff)
Add automatic advertisement
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'btle-advise.service')
-rw-r--r--btle-advise.service8
1 files changed, 8 insertions, 0 deletions
diff --git a/btle-advise.service b/btle-advise.service
new file mode 100644
index 0000000..1a34237
--- /dev/null
+++ b/btle-advise.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=activates advertising of BlueTooth Low-Energy on hci0
+
+[Service]
+Type=oneshot
+ExecStart=/bin/bash -c "rfkill list|sed '/[bB]luetooth/!d;s/:.*//'|xargs -n1 rfkill unblock"
+ExecStart=/bin/bash -c "hcitool dev|tail -n+2|cut -f2|xargs -n1 -IX hciconfig X leadv"
+