From 2ffcc61a750a2bf4598662b4612283fdc9d2a4e4 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Thu, 14 Sep 2017 12:14:59 +0200 Subject: Add automatic advertisement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Bollo --- btle-advise.service | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 btle-advise.service (limited to 'btle-advise.service') 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" + -- cgit 1.2.3-korg