Hi,
you have to emerge the bluez package and start the bluetooth daemon. In /var/lib/bluetooth directory you will have a subdirectory with the name of the MAC or BD address of the bluetooth device you use as you can see with the command

Code:

hciconfig -a

In that subdirectory, you have to create, if not, a file named pincodes. This file must contain one by line, the MAC address of the device you want to connect to and, separated by a space, the pincode used by this device to accept connections.

After you discover for connections the device you want to connect with, you can use severals commands tools to create an association. When the 'remote' device ask for the pincode to provide to accept the connection, you give the one you write in the pincodes file. The association should succeed.

You must have root permissions to work with bluetooth devices. Some graphicals bluetooth interfaces only have the user permissions and cannot associate with devices. They have to be start with root permissions. Maybe there's a group a user can be in that will resolv this problem. There is no bluetooth group._________________Paul

Hi,
you have to emerge the bluez package and start the bluetooth daemon. In /var/lib/bluetooth directory you will have a subdirectory with the name of the MAC or BD address of the bluetooth device you use as you can see with the command

Code:

hciconfig -a

In that subdirectory, you have to create, if not, a file named pincodes. This file must contain one by line, the MAC address of the device you want to connect to and, separated by a space, the pincode used by this device to accept connections.

After you discover for connections the device you want to connect with, you can use severals commands tools to create an association. When the 'remote' device ask for the pincode to provide to accept the connection, you give the one you write in the pincodes file. The association should succeed.

You must have root permissions to work with bluetooth devices. Some graphicals bluetooth interfaces only have the user permissions and cannot associate with devices. They have to be start with root permissions. Maybe there's a group a user can be in that will resolv this problem. There is no bluetooth group.

Hi,
you have to emerge the bluez package and start the bluetooth daemon. In /var/lib/bluetooth directory you will have a subdirectory with the name of the MAC or BD address of the bluetooth device you use as you can see with the command

Code:

hciconfig -a

In that subdirectory, you have to create, if not, a file named pincodes. This file must contain one by line, the MAC address of the device you want to connect to and, separated by a space, the pincode used by this device to accept connections.

After you discover for connections the device you want to connect with, you can use severals commands tools to create an association. When the 'remote' device ask for the pincode to provide to accept the connection, you give the one you write in the pincodes file. The association should succeed.

You must have root permissions to work with bluetooth devices. Some graphicals bluetooth interfaces only have the user permissions and cannot associate with devices. They have to be start with root permissions. Maybe there's a group a user can be in that will resolv this problem. There is no bluetooth group.

I finished creating file pincode. But I don't know to connect to my phone from my laptop.
Firstly, My laptop is not discoverable, so I tried to connect to my mobile from my laptop.
Then, I could see my mobile address by "hcitool scan" but I couldn't connect to it by "hcitool cc XXX" it returned nothing, when I ran "hcitool auth XXX", it said "Not connect".
During thiese steps, I didn't see my phone ask for pincode.

this time, I did all in terminal under root account. What should I do? Thanks

First do you have root access? Without it everything can fail. Open a root session for test and when it work, you can try to do it with a user account. In root session, I do not think you need to be in plugdev group to configure Bluetooth or anything else.

Most of the times, I connect devices via Bluetooth for precise perposes, like using obexftp or obexfs. In my /etc/fstab I have this line:

Change xx:xx:xx:xx:xx:xx for the Bluetooth hardware address of your cellular, create the directory /mnt/cell, install the obexfs and fuse packages and put your cellular in discovery mode. Then

Code:

mount /mnt/cell

should ask your cellular for the pincode write in the pincodes file and give you access to it's data in /mnt/cell. Remember to tell your cellular to always accept connections from your Gentoo host. Then your cellular will not ask for a pincode anymore for this host. Automatics connections will be made without put you cellular in discovery mode._________________Paul

First do you have root access? Without it everything can fail. Open a root session for test and when it work, you can try to do it with a user account. In root session, I do not think you need to be in plugdev group to configure Blutooth or anything else.

Most of the times, I connect devices via Bluetooth for precise perposes, like using obexftp or obexfs. In my /etc/fstab I have this line:

If the commands hciconfig -a return the details of hci0 and hcitool -i hci0 scan give your cellular name and hardware address, that's mean your kernel configuration support Bluetooth devices. Other stuff may be missing, I don't have any idea for the moment._________________Paul

You need switch on "L2CAP protocol support" and "RFCOMM protocol support". But if you can press "hcitool scan" to see a list of active bluetooth devices, then your kernel is fine, I guess.

And I agree with Logicien. Obexfs is very pretty thing, but I use the simple-agent for enter a pin. It's easier then put a pin to some files because the simple-agent only is need to run in an another terminal, just enter the pin and press Enter.

If the commands hciconfig -a return the details of hci0 and hcitool -i hci0 scan give your cellular name and hardware address, that's mean your kernel configuration support Bluetooth devices. Other stuff may be missing, I don't have any idea for the moment.

You need switch on "L2CAP protocol support" and "RFCOMM protocol support". But if you can press "hcitool scan" to see a list of active bluetooth devices, then your kernel is fine, I guess.

And I agree with Logicien. Obexfs is very pretty thing, but I use the simple-agent for enter a pin. It's easier then put a pin to some files because the simple-agent only is need to run in an another terminal, just enter the pin and press Enter.

Yeah, but now that hcitool doesn't work, I doubt if obexfs could work. so I prefer figuring out why hcitool doesn't work then I will try others. Please glance at my reply to Logicien. There are some information. See if you can find something please. Thanks.

ultraincognito told you some extra features you can have with bluetooth devices, like DUN (DialUp Networking), support for HID devices, Bluetooth networking, etc. You can see what feature a device support with the command

Code:

hcitool -i hci0 info <bdaddr>

where <bdaddr> is the hardware address of a bluetooth device. That's gone tell you what can be activate for practicle use with Bluetooth in your kernel configuration.

If you don't append a command to hcitool, you will get the help message, because there is nothing else hcitool can do. So if you want to scan devices do

ultraincognito told you some extra features you can have with bluetooth devices, like DUN (DialUp Networking), support for HID devices, Bluetooth networking, etc. You can see what feature a device support with the command

Code:

hcitool -i hci0 info <bdaddr>

where <bdaddr> is the hardware address of a bluetooth device. That's gone tell you what can be activate for practicle use with Bluetooth in your kernel configuration.

If you don't append a command to hcitool, you will get the help message, because there is nothing else hcitool can do. So if you want to scan devices do

To solve the HCI-Auth-input-output-thing I did the following steps:
Start `simple-agent` (part of net-wireless/bluez) as root.
In another terminal start `hcitool cc 00:13:70:D1:XX:XX && hcitool auth 00:13:70:D1:XX:XX`.

In the first window I was immediately asked for the pin and now everything works like a charm.