Bluetooth connection to HC-05 paired but not connected

The suggestion from ubfan1 is complete and uses rfcomm to establish a connection with a bluetooth device. If it doesn't work you should try what follows:

I am using rfcomm and minicom to exchange data between a bluetooth device Hc-06 connected to an Arduino and Ubuntu.

Scan for bluetooth devices:

hcitool scan
Scanning ...
    20:15:12:08:62:95   HC-06

Bind using rfcomm

sudo rfcomm bind 0 20:15:12:08:62:95 1

NB: bind 0 refers to device number 0 (rfcomm0) and 1 is the channel. The red led should now stop blinking.

Then use minicom with sudo and save a configuration in which you specify the baudrate and the port. You can find more informations on this tutorial.

Hope it helps!


Here's my (working) example of using the rfcomm for hooking up a bluetooth gps -- a bit of a pain I must say! Hope this helps, I used it with viking and openstreetmaps.

#!/bin/bash
# Manually start a gps receiver outputting on bluetooth
# Then determine if the gps daemon is already running
xxx=`ps auxww |grep [g]psd`
if [ -n "$xxx" ]; then 
  set `echo $xxx`
  pidgpsd=$2
fi

# the /etc/bluetooth/rfcomm.conf must have the gps MAC
MYGPS=`grep "^[^#].*device.*;" /etc/bluetooth/rfcomm.conf |cut -f2 -d" "|cut -f1 -d";"`

#Determine if the rfcomm0 device has been created
if [ ! -e /dev/rfcomm0 ]; then
  # kill the old gpsd
  if [ -n "$pidgpsd" ]; then
    echo "Killing the old gpsd"
    # for icon invocation, use gksudo
    gksudo kill $pidgpsd
    unset pidgpsd
  fi
  sdptool add --channel=1 OPUSH
  #gksudo rfcomm bind /dev/rfcomm0 00:0A:3A:2C:BC:44
  gksudo rfcomm bind /dev/rfcomm0 $MYGPS
  sleep 5
fi

# Start the new gpsd if necessary
if [ ! -n "$pidgpsd" ]; then
  #sudo gpsd -n -N -D2 /dev/rfcomm0
  gksudo -- gpsd -n -D2 /dev/rfcomm0
  echo "gpsd started"
  sleep 5
fi

# Create a ttyUSB0 link for broken viking
if [ ! -e /dev/ttyUSB0 ]; then
  sudo ln -s /dev/rfcomm0 /dev/ttyUSB0
  # ensure viking (you) can read the device ????
  sudo chmod 666 /dev/rfcomm0
fi