Skip to content

Instantly share code, notes, and snippets.

@sumanssaurabh
Last active March 31, 2019 22:25
Show Gist options
  • Save sumanssaurabh/d78c9e3c011ab2dd3b0f8a89749b1cf7 to your computer and use it in GitHub Desktop.
Save sumanssaurabh/d78c9e3c011ab2dd3b0f8a89749b1cf7 to your computer and use it in GitHub Desktop.
RFCOMM service with job control, ioctl for rpi 3b/b+ ,serial line comm over bluetooth
[Unit]
Description=RFCOMM service
After=bluetooth.service
Requires=bluetooth.service
[Service]
ExecStartPre=/usr/bin/sdptool add --channel=3 SP
ExecStart=/usr/bin/rfcomm watch hci0 3 setsid /sbin/agetty -L rfcomm0 --keep-baud 115200,38400,9600 xterm -a pi
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment