From 7a107f269536940ab318f1879ffea3a08fdec935 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Thu, 6 Aug 2020 23:09:57 +0200 Subject: [PATCH] tibluetooth: Restart on failure It can happen that hciattach fails because of timeout. Reexecuting the service in this case makes sure that the bluetooth device is handled by bluetoothctl. BugzID: 65391 --- .../tibluetooth/tibluetooth/am335x-nmhw21/tibluetooth.service | 2 ++ .../tibluetooth/tibluetooth/am335x-nmhw24/tibluetooth.service | 2 ++ .../tibluetooth/tibluetooth/am335x-nrhw16/tibluetooth.service | 2 ++ .../tibluetooth/tibluetooth/am335x-nrhw20/tibluetooth.service | 2 ++ 4 files changed, 8 insertions(+) diff --git a/recipes-connectivity/tibluetooth/tibluetooth/am335x-nmhw21/tibluetooth.service b/recipes-connectivity/tibluetooth/tibluetooth/am335x-nmhw21/tibluetooth.service index 4489bc3..0e3a0e6 100644 --- a/recipes-connectivity/tibluetooth/tibluetooth/am335x-nmhw21/tibluetooth.service +++ b/recipes-connectivity/tibluetooth/tibluetooth/am335x-nmhw21/tibluetooth.service @@ -12,5 +12,7 @@ ExecStart=/usr/bin/hciattach /dev/ttyS5 texas 3000000 flow ExecStopPost=/bin/sh -c "/bin/echo 0 > /sys/class/gpio/gpio52/value" +Restart=on-failure + [Install] WantedBy=multi-user.target diff --git a/recipes-connectivity/tibluetooth/tibluetooth/am335x-nmhw24/tibluetooth.service b/recipes-connectivity/tibluetooth/tibluetooth/am335x-nmhw24/tibluetooth.service index 4489bc3..0e3a0e6 100644 --- a/recipes-connectivity/tibluetooth/tibluetooth/am335x-nmhw24/tibluetooth.service +++ b/recipes-connectivity/tibluetooth/tibluetooth/am335x-nmhw24/tibluetooth.service @@ -12,5 +12,7 @@ ExecStart=/usr/bin/hciattach /dev/ttyS5 texas 3000000 flow ExecStopPost=/bin/sh -c "/bin/echo 0 > /sys/class/gpio/gpio52/value" +Restart=on-failure + [Install] WantedBy=multi-user.target diff --git a/recipes-connectivity/tibluetooth/tibluetooth/am335x-nrhw16/tibluetooth.service b/recipes-connectivity/tibluetooth/tibluetooth/am335x-nrhw16/tibluetooth.service index a4bba19..ed808e6 100644 --- a/recipes-connectivity/tibluetooth/tibluetooth/am335x-nrhw16/tibluetooth.service +++ b/recipes-connectivity/tibluetooth/tibluetooth/am335x-nrhw16/tibluetooth.service @@ -13,5 +13,7 @@ ExecStart=/usr/bin/hciattach /dev/ttyS5 texas 3000000 flow ExecStopPost=/bin/sh -c "/bin/echo 0 > /sys/class/gpio/gpio100/value" +Restart=on-failure + [Install] WantedBy=multi-user.target diff --git a/recipes-connectivity/tibluetooth/tibluetooth/am335x-nrhw20/tibluetooth.service b/recipes-connectivity/tibluetooth/tibluetooth/am335x-nrhw20/tibluetooth.service index 4489bc3..0e3a0e6 100644 --- a/recipes-connectivity/tibluetooth/tibluetooth/am335x-nrhw20/tibluetooth.service +++ b/recipes-connectivity/tibluetooth/tibluetooth/am335x-nrhw20/tibluetooth.service @@ -12,5 +12,7 @@ ExecStart=/usr/bin/hciattach /dev/ttyS5 texas 3000000 flow ExecStopPost=/bin/sh -c "/bin/echo 0 > /sys/class/gpio/gpio52/value" +Restart=on-failure + [Install] WantedBy=multi-user.target