TIR
Posts: 3
Joined: Sun Oct 14, 2012 7:31 pm

Connecting Raspberry Pi With Arduino using Bluetooth

Sun Oct 21, 2012 8:09 pm

This is the setup

I have Raspberry Pi with USB BT dongle. I have installed bluetooth and the service is up.

Code: Select all

hcitool scan
Scanning ...
        00:12:05:11:92:75       linvor
This is the rfcomm file

Code: Select all

root@raspberrypi:/home/pi# cat /etc/bluetooth/rfcomm.conf
#
# RFCOMM configuration file.
#

rfcomm0 {
        # Automatically bind the device at startup
        bind no;

        # Bluetooth address of the device
        device 00:12:05:11:92:75;

        # RFCOMM channel for the connection
        channel 1;

        # Description of the connection
        comment "Linvor Bluetooth Device";
}
But when i try to connect to the device i get:

Code: Select all

root@raspberrypi:/home/pi# rfcomm connect 0
Can't connect RFCOMM socket: Connection refused
The Linvor has passkey of 1234. Where should i entered it? There is no more hcid.conf.

Code: Select all

root@raspberrypi:/home/pi# ls /etc/bluetooth/
audio.conf  main.conf     proximity.conf  serial.conf
input.conf  network.conf  rfcomm.conf
The os is Raspbian “wheezy”

supergiox
Posts: 1
Joined: Wed Feb 20, 2013 3:53 pm

Re: Connecting Raspberry Pi With Arduino using Bluetooth

Wed Feb 20, 2013 4:00 pm

I think you need this command:

Code: Select all

echo "1234" | bluez-simple-agent hci0 [MAC_ADDRESS]

tsh
Posts: 5
Joined: Fri Jun 29, 2012 11:09 am

Re: Connecting Raspberry Pi With Arduino using Bluetooth

Tue Apr 02, 2013 7:24 pm

Another one struggling with this. I can connect using blueman-manager, but I'm trying to get a command line setup working, and getting nowhere fast...

I have to edit /etc/bluetooth/rfcomm.conf, and got some odd syntax errors at first. I ended up cut/pasting the whole file and replacing with my address.

To set the pairing code, I used

Code: Select all

sudo bluetooth-agent 1234 00:12:6F:20:FB:50

Return to “Troubleshooting”