Connecting a Blutronium serial Bluetooth adapter to Linux
How to connect a Blutronium serial to Bluetooth adapter to Raspberry Pi
(or any other Linux distribution).
The following actions are performed in a console window on Raspberry Pi. The Blutronium serial to Bluetooth adapter is not attached physically to the Raspberry Pi, it is only connected to the Raspberry Pi over Bluetooth.
- Edit the file /etc/systemd/system/dbus-org.bluez.service to configure the serial port profile. Issue the command:
sudo nano /etc/systemd/system/dbus-org.bluez.service
and add -C to the line ExecStart=/usr/lib/bluetooth/bluetoothd, and add the line ExecStartPost=/usr/bin/sdptool add SP, so that we end up with:
ExecStartPost=/usr/bin/sdptool add SP
in the file. Write the file out (CTRL-O) and exit the editor (CTRL-X). Reboot the computer.
- Using the bluetoothctl utility, pair and trust the Blutronium device. Note that the device is seen as one device, not two. Take note of the Bluetooth address of the Blutronium, which will be needed in the next step.
- Perform the following command, and leave it running it its own console window:
sudo rfcomm connect 0 <bdaddr>
where <bdaddr> must be replaced by the Bluetooth address of the Blutronium seen in step 2 above.
- At this point, any terminal emulator or other serial-port-capable program that can be configured to talk with /dev/rfcomm0 will be able to communicate with the Blutronium device attached to the other computer.
You can use Putty or Minicom on the Raspberry Pi to talk to the computer attached to the Blutronium device.