[Unit]
Description=Attach /dev/ttyS0 to BlueZ stack using %I type
Wants=bluetooth.service
Before=bluetooth.service
After=dev-ttyS0.device

[Service]
Type=simple
ExecStartPre=/usr/sbin/rfkill unblock bluetooth
ExecStart=/usr/bin/hciattach -n -s 115200 ttyS0 %I
ExecStopPost=/usr/sbin/rfkill block bluetooth
