start bluetooth serial port server with agetty
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 24 Sep 2016 17:55:34 +0000 (19:55 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 24 Sep 2016 17:55:34 +0000 (19:55 +0200)
bt-serial-server.sh [new file with mode: 0755]

diff --git a/bt-serial-server.sh b/bt-serial-server.sh
new file mode 100755 (executable)
index 0000000..cc158bf
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh -xe
+hciconfig -a
+hciconfig hci0 up
+hciconfig hci0 piscan
+sdptool add --channel=3 SP
+test -e /dev/rfcomm0 || mknod -m 666 /dev/rfcomm0 c 216 0
+rfcomm watch /dev/rfcomm0 3 /sbin/agetty rfcomm0 115200 linux
+