Closed Bluscream closed 2 years ago
You need to create another service for rfcomm since it needs to be run as root.
For example /etc/systemd/system/rfcomm0.service could look like:
[Unit]
Description=rfcomm0
After=bluetooth.target
[Service]
Type=oneshot
ExecStart=/usr/bin/rfcomm bind 0 BLUETOOTH_ADDRESS_HERE
ExecStart=/usr/bin/chown YOUR_USER: /dev/rfcomm0
ExecStop=/usr/bin/rfcomm release 0
RemainAfterExit=yes
Restart=no
[Install]
WantedBy=multi-user.target
And of course systemctl enable rfcomm0.service
Thanks a lot :) This worked for me:
[Unit]
Description=rfcomm0
After=bluetooth.target
[Service]
Type=oneshot
User=root
ExecStart=/usr/bin/rfcomm bind 0 00:16:A6:00:1C:E3
ExecStart=/usr/bin/chown root:dialout /dev/rfcomm0
ExecStop=/usr/bin/rfcomm release 0
RemainAfterExit=yes
Restart=no
[Install]
WantedBy=multi-user.target
Since the readme states ``
i would like to create a service that ensures proper operation after a reboot;
this is what i have to far but sadly it does not seem to be able to start everything; especially the bluetooth connection and serial binding. Could you provide some help with this?