Skip to content

Instantly share code, notes, and snippets.

@0
Last active March 16, 2025 19:32
Show Gist options
  • Select an option

  • Save 0/c73e2557d875446b9603 to your computer and use it in GitHub Desktop.

Select an option

Save 0/c73e2557d875446b9603 to your computer and use it in GitHub Desktop.

Revisions

  1. 0 revised this gist Jul 6, 2015. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions bluetooth_serial.md
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,7 @@ The following packages are required:

    1. Start daemon: `systemctl start bluetooth`
    1. Pair using `bluetoothctl`:

    ```
    power on
    agent on
    @@ -21,6 +22,7 @@ The following packages are required:
    scan off
    pair <dev>
    ```

    1. Create serial device: `rfcomm bind 0 <dev>`

    You should now have `/dev/rfcomm0`.
    @@ -30,10 +32,12 @@ You should now have `/dev/rfcomm0`.

    1. Remove serial device: `rfcomm release 0`
    1. Unpair using `bluetoothctl`:

    ```
    remove <dev>
    power off
    ```

    1. Stop daemon: `systemctl stop bluetooth`


  2. 0 created this gist Jul 6, 2015.
    42 changes: 42 additions & 0 deletions bluetooth_serial.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@
    The following are instructions for connecting a Bluetooth device for serial communication on Arch Linux using BlueZ 5.31.


    ## Prerequisites

    The following packages are required:

    * `bluez`: `bluetoothd`
    * `bluez-utils`: `bluetoothctl`, `rfcomm`


    ## Pair

    1. Start daemon: `systemctl start bluetooth`
    1. Pair using `bluetoothctl`:
    ```
    power on
    agent on
    scan on
    ... wait ...
    scan off
    pair <dev>
    ```
    1. Create serial device: `rfcomm bind 0 <dev>`

    You should now have `/dev/rfcomm0`.


    ## Unpair

    1. Remove serial device: `rfcomm release 0`
    1. Unpair using `bluetoothctl`:
    ```
    remove <dev>
    power off
    ```
    1. Stop daemon: `systemctl stop bluetooth`


    ## Troubleshooting

    Check `rfkill list` to make sure that the Bluetooth device is not blocked.