3

I am have Bluno nano and would like to connect it my pc(Ubuntu 16.06) and receive information via blue tooth. some online Q&A but unable to make it work.

  1. I paired Bluno nano my pc (checked via - $ bluetoothctl , [bluetooth]# paired-devices).

  2. After that I ran $ sudo rfcomm bind 0 F4:5E:AB:AA:BB:CC 1

but I am unable to see /dev/rfcomm0 . Do I need to create any config files ?

Connection to blutooth is done by the following commands

$ rfkill list all
$ sudo rfkill unblock bluetooth
$ sudo hciconfig hci0 up
$ sudo bluetoothctl
[bluetooth]# power on
[bluetooth]# discoverable on
[bluetooth]# agent on
[bluetooth]# pairable on
[bluetooth]# scan on
[bluetooth]# scan off
[bluetooth]# connect F4:5E:AB:AA:BB:CC 
[bluno]# pair F4:5E:AB:AA:BB:CC 
[bluno]# trust F4:5E:AB:AA:BB:CC

1 Answers1

3

This method worked for me.

After you paired to the device and connected connected successfully, discover services that are using rfcomm on the remote device:

sdptool browse <remote_dev>
sdptool browse 12:34:56:78:11:22

take note of all the possible rfcomm and their channels (remote_channel)

Now create a virtual rfcomm device on our machine:

rfcomm listen /dev/rfcomm0 2

you can replace 2 with any value. it is our channel

Then bind the remote rfcomm to our virtual rfcomm device:

sudo rfcomm bind <virtual_rfcommdev> <remote_mac> <remote_channel>  
sudo rfcomm bind /dev/rfcomm0 12:34:56:78:11:22 2

if you prefer a one liner

 rfcomm bind 0 12:34:56:78:11:22 1

You can check if it is worked by sending it a test AT command

first install picocom:

sudo apt install picocom

then check if the device is present:

ls /dev/rfcomm*

then start picocom on the rfcomm:

sudo picocom -c /dev/rfcomm0

-c to make the command visible as you type

you get sometime like

picocom v2.2

port is        : /dev/rfcomm0
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,

terminal is ready

now type AT and press enter. If you get OK then it working.

ptetteh227
  • 2,044