How to pair a Bluetooth dongle on arduino Yun?

On my Arduino Yun (openwrt-yun, updated to latest version), I have a bluetooth dongle in the usb port; I have installed bluez-libs and bluez-utils (and python-bluez). They show up as version 5.13. hciconfig and hcitool work properly. There does not seem to be any utility installed to pair with a device, nor can I figure out how to get pairing to work by editing config files.

I can find the device with hciconfig and hcitool, but rfcomm can't connect without the pin. If I try the same sequence on my Linux laptop after pairing with the gui, rfcomm is able to connect, so I know the device is working properly (JY-MCU HC-06 on another Arduino).

All the recommendations I can find on the web indicate I should be able to use simple-agent or bluez-simple-agent, but they are not installed with these packages (there is no bluez-tools package for this distro). If I manually copy the python script for the agent to the device and run it, it fails, saying that org.bluez can't be found with dbus. There is no bluetoothd running, and no init script for any bluetooth demon. None of the bt* tools are available.

I also found a description of how to set a pin code in /var/lib/bluetooth/[bt-addr]/pincodes (where bt-addr is my dongle address) containing a line of the form:

[device-addr] [pincode]

but this seems to have no effect.

I have also tried settings in /etc/bluetooth/main.conf and /etc/bluetooth/rfcomm.conf, but I think they may only be for incoming connections.

Any help would be greatly appreciated.

Pairing is mentioned here http://linino.org/doku.php?id=wiki:lininobluetooth

Thanks, Heggood; I read that and played around with hcid.config for a while, but that apparently only applies to pairing incoming connections; I'm trying to pair an outgoing connection.

Also, on that page they mention trying
/etc/init.d/bluez-utils restart
but I have no bluez-utils script in init.d! I wonder why?

Thanks again; I remain perplexed.

Hi,

I trying same thing as you tried but without success. I am trying to follow the steps of Openwrt wiki:
http://wiki.openwrt.org/doc/howto/usb.bluetooth

But there are several problems I am finding:

  1. I can not install "kmod-usb-uhci" package, it says that package doesn't exist.
  2. I have to bluez-utils scrips on my /etc/init.d/ folder, so I can not start, restart or enable as the wiki says.

My hciconfig detects the USB-dongle and gave me next output:

hciconfig -a
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 00:15:83:45:28:43  ACL MTU: 310:10  SCO MTU: 64:8
        UP RUNNING
        RX bytes:1255 acl:0 sco:0 events:43 errors:0
        TX bytes:181 acl:0 sco:0 commands:43 errors:0
        Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: 'CSR8510 A10'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Version: 4.0 (0x6)  Revision: 0x22bb
        LMP Version: 4.0 (0x6)  Subversion: 0x22bb
        Manufacturer: Cambridge Silicon Radio (10)

I don't know what else can I do, I read lot of documentation on internet, but sometimes I don't know if it can be applied into Arduino Yun.

Any help pleaseee???