Is it possible to use the bluetoothctl write command to send serial data?

For example, I know that I can not do this exactly but can I have something to the effect that writes

btltoothctl write "this is an example"

Or is there another command that can do this within Bluetoothctl. Any information would be helpful. Thanks for the help.

  • 1
    Bluetooth supports emulating a serial port connection between two devices. Then you can send your data as if the were a physical serial cable connecting the two devices. – Hydranix Feb 8 '17 at 23:59

One way to do it is using rfcomm bind ... command.

use bluetoothctl scan and pair the target device, then bind the serial device with:

sudo rfcomm bind 0 C9:5B:CE:A4:97:C7

so it will create a device as

ls /dev/rfcomm0

then you can use any tool (eg dd) to write/read data from this pipe.

When done, you can use to release:

rfcomm release 0

and bluetoothctl to disconnect/unpair the device.

  • Ya, great, thanks. I have been trying for a while but I have been having a problem with that where I keep getting an error saying ` Can't connect RFCOMM socket: Host is down` and I have no idea how to fix it. I explain the problem in more detail at this link. unix.stackexchange.com/questions/343815/… If you have any idea what to do about that that would also be very helpful. Thanks for the help so far though. – Brandon Knape Feb 11 '17 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.