You are not logged in.

#1 2007-01-14 16:51:10

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

bluetooth questions

First off, does anyone know a good, up-to-date, howto on getting bluetooth working under arch? There isn't one in the wiki (that I can find) and most that I find on the web are either specific to a particular bit of hardware or seem to be out of date.

I'm trying to do the basic thing of pairing between my pc and phone to exchange data. I've got the demons up and running and setup hcid.conf like this:

options {
        autoinit yes;
        security auto;
        pairing multi;
        passkey 1234;
}

# Default settings for HCI devices
device {
        name "Desktop";
        class 0x100100;
        iscan enable; pscan enable;
        lm accept;
        lp rswitch,hold,sniff,park;
}

If I do:

 hcitool  scan
Scanning ...
        00:12:D2:A6:7C:06       MyPhone

That finds the phone but if I try:

hcitool hci0 cc 00:12:D2:A6:7C:06

then check it with

hcitool con
Connections:

nothing seems to have happened.

I've tried using kbluetoothd which will find the phone and will show the services running on it and when I choose to connect to the OBEX File Transfer the phone asks for a pin but if I enter the pin from the hcid file I get asked again then dumped out and a can't connect message from the app.

Some debug from kbluetoothd in case it helps:

kbluetoothd: DeviceNameCache::slotNameRequest
kbluetoothd: NeighbourMonitor: end of name request detected (success)
kbluetoothd: NeighbourMonitor: restored credits for 00:12:D2:A6:7C:06
kbluetoothd: NeighbourMonitor::processQueue
kbluetoothd: HCI-event: e
kbluetoothd: HCI-event: 6
QObexTransport::error( ... )
QObexClient::transportError( ... )
QObexClient::makeIdle()
kio_fish: pid = 6782 ObexProtocol::slotError(4)
kio_fish: pid = 6782 ObexProtocol::connectClientIfRequired(): Hmm, something went wrong with connecting ...
kio_fish: pid = 6782 ObexProtocol::connectClientIfRequired(): Try to connect
QObexClient::connectClient()
QObexClient::sendRequest( ... )
QObexTransport::setBlocking( 1 )

What am I doing wrong?

As an extra test I've tried changing the security line to

security none;

to see if that would disable the need for a pin, it didn't.

There are lots of sites mentioning pin_helper in the hcid.conf but if I add this then I get a message in the log to say that it doesn't know what the line means, it also isn't mentioned in the man page for hcid.conf which I assume means that it is either very new or old.

Offline

#2 2007-01-14 17:01:44

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: bluetooth questions

looking in the daemon.log I've just noticed this:

Jan 14 16:45:18 rastlin hcid[6759]: pin_code_request (sba=00:11:67:36:5C:2D, dba=00:12:D2:A6:7C:06)
Jan 14 16:45:18 rastlin hcid[6759]: call_passkey_agent(): no agent registered
Jan 14 16:46:53 rastlin hcid[6759]: pin_code_request (sba=00:11:67:36:5C:2D, dba=00:12:D2:A6:7C:06)
Jan 14 16:46:53 rastlin hcid[6759]: call_passkey_agent(): no agent registered

this implies that it is looking for some agent for the pin. Does anyone know what the agent is or how to set it up?

Offline

#3 2007-01-27 23:44:03

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: bluetooth questions

Finally got round to looking at this again and found this command sets the passkey:

 passkey-agent --default  1234

Doing some research on that I found this page which implies that passkey-agent shouldn't be used anymore and has been removed from he debian package

http://lists.alioth.debian.org/pipermai … 00724.html

Why is it still in Arch and should I be using it? If I should, how can I get it to run automatically?

Last edited by dninja (2007-01-27 23:46:35)

Offline

#4 2007-01-28 00:32:07

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: bluetooth questions

You can use any passkey agent. Try bluez-gnome, it asks for a PIN on each pairing request.

Offline

#5 2007-05-01 01:39:18

leandroaveiro
Member
From: Rochester, NY, USA
Registered: 2007-04-12
Posts: 45

Re: bluetooth questions

I know this is kind of an old post but four months later I have exactly the same problem. If the pairing is initiated by the cell phone it works ok, but my laptop can't establish connections with other devices.

Tried bluez-gnome and it didn't work.

Hope someone has found a solution for this issue by now.

Offline

#6 2007-05-01 03:29:11

jb
Member
From: Florida
Registered: 2006-06-22
Posts: 466

Re: bluetooth questions

Thanks for linking that mailing list message.  I thried getting bluetooth working around December and it always failed miserably until I followed that.  Also, I've never seen bluez-gnome or that kbluepin work either.  I couldn't even get them to activate on pin request.  I had to call them explicitly.  Even then, they just acted like a hello world, took input, and closed out.

I tried using my bluetooth adapter on my desktop last week: Same results.  The only way to get it to work is by passkey-agent.  kbluepin still doesn't pop up on pin request.

Not to jack the thread, but has anyone actually been able to get the kdebluetooth utilities to actually pair a device without the help of passkey-agent?


...

Offline

#7 2007-05-01 10:07:13

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: bluetooth questions

I never got it all working properly. I managed to get my laptop to receive vcards from the phone but not be able to send things back and I got the desktop to be able to send files (a couple of mp3s) to the phone but not receive anything.

After that I got bored and gave up. I figured if I wait a while then the technology will get simpler and more how-tos will be written!

Offline

#8 2007-05-02 12:25:17

leandroaveiro
Member
From: Rochester, NY, USA
Registered: 2007-04-12
Posts: 45

Re: bluetooth questions

jb,

could you describe how exactly did you manage to send files to your phone using passkey-agent. So far all I could do was sending files from the phone to the desktop initiating the pairing through the phone...

Offline

#9 2007-05-02 12:42:18

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: bluetooth questions

I'd love to help but it has been so long I can't remember how I did it.

What I do remember is a lot of starting things and stopping things and trying different orders and permutations till things worked. Loads of hacked together tutorials got me to where I was then!

If I get time I'll see if I can still do things and let you know what works and what doesn't.

Offline

#10 2007-05-02 12:43:21

sH
Member
From: Braunschweig, Germany
Registered: 2007-05-02
Posts: 145

Re: bluetooth questions

As for the "bluez-gnome" issue. You have to start "bluetooth-applet" from the terminal and put it to autostart to have it loaded automatically. Then you will have a bluetooth icon in the tray. Right-click it-> Properties and set the PC to visible always. Then start a pairing request from the phone. The PC will ask you for the PIN and the two will be paired.

I have no idea how you can make it work in kde though. Right now I only know that it works in kubuntu, don't know what they have done there.
Still playing around to have it work in arch.

Offline

#11 2007-05-03 01:40:17

leandroaveiro
Member
From: Rochester, NY, USA
Registered: 2007-04-12
Posts: 45

Re: bluetooth questions

Thanks a lot everyone....

But the problem is that my cell phone can't start a pairing unless I want to send something to the desktop. I can't just connect to the desktop without any specific action to take or start an OBEX File Transfer, for example. That's why kbluetooth would be so useful (if it worked).

I'll try to play around for a while and let you guys know if anything comes out of it.

Offline

#12 2007-05-03 02:44:15

leandroaveiro
Member
From: Rochester, NY, USA
Registered: 2007-04-12
Posts: 45

Re: bluetooth questions

Here's what I found out:

Right click kbluetoothd tray icon -> Configuration -> Paired Devices. You'll prompted to enter your root password.

My kbluetooth showed me then a windows with an empty paired devices list. So I clicked the link in the bottom of the window named File location setup, which brought me to this screen:

upload.cgi?rsuploadid=337231626917730943#.

Note that the first config is the location of a file named link_key. I searched my entire laptop and  definitely I don't have it. I found then a couple of Ubuntu forums instructing to rename the file link_key to pin, which contains only the PIN key to pair devices.

Well, I tried that and it didn't work. I tried setting /etc/bluetooth/hcid.conf to link_key path. A bunch of MAC address were listed, but none of them belonged to my cell phone. Tried to pair. Didn't work.

Also, the ubuntu hcid.conf file is a bit different, so I totally discard the pin file option.

Haven't improved much, but something tells me that this link_key file is important to pair with other devices.

Still searching....

Offline

#13 2007-05-03 02:48:21

leandroaveiro
Member
From: Rochester, NY, USA
Registered: 2007-04-12
Posts: 45

Re: bluetooth questions

Sorry. I posted the wrong link to the image! Here's the correct one...

http://rapidshare.com/files/29182370/kb … pshot.jpeg (sorry, don't have a web space to put the screenshot)....

Offline

Board footer

Powered by FluxBB