LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2007, 03:24 PM   #1
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Rep: Reputation: 30
Can't pair PC with mobile using bluetooth, suspecting dbus problem.


I already whined a little in this thread but I originally made the thread for a different problem, also this doesn't seem to be slackware specific.

So my objective is to get bluetooth working between my Slackware 11.0 and my SonyEricsson W810i so I could sync my contacts, todos and appointments between SonyEricsson and Kontact. So far I've reached a point where my USB bluetooth dongle works, I can ping my phone, I can even use obex push but I can't pair the phone with pc which seems to be needed by KMobileTools. So here's what I've done so far and what doesn't work.

I downloaded and compiled from source the following programs in that order:

dbus-1.0.2
bluez-libs-3.9
bluez-utils-3.9
openobex-1.3
kdebluetooth-1.0_beta2
kmobiletools-0.5_beta1

So far so good. So I started configuring stuff. First I activated my dongle with
Code:
hciconfig hci0 up
Listed all available devices with
Code:
hcitool scan
Changed /etc/bluetooth/hcid.conf and /etc/bluetooth/rfcomm.conf and made a little script in the same directory called pin.sh that is executable and outputs PIN:0000 as echo, referenced it from hcid.conf as pin_helper and though that all was ready. I could ping my phone, I could bind it with rfcomm, I could see it's services with sdp or from kde with KBluetooth, I could acess Obexpush from there too.

I couldn't connect to my phone with rfcomm connect or hcitool cc nor access any other services (All these resulted in the phone wanting to pair, I could enter pin from phone but nothing happened in pc and pairing timed out). I also couldn't pair with KDE Pairing Wizard. It found my phone but when looking for available services it froze and had to be killed.

So i started testing stuff and found out that when running hcid with option -n that should keep it from forking and running in backround, I get the error
Code:
hcid[2226]: Bluetooth HCI daemon
hcid[2226]: Enabling debug information
hcid[2226]: Can't connect to system message bus: Failed to connect to socket /usr/local/var/run/dbus/system_bus_socket: No such file or directory
hcid[2226]: Unable to get on D-Bus
Only similar case I could find was this.

Is it even possible that dbus is the problem here or is there something else. I would be really grateful if someone could at least lead me in the right direction. I'm getting pretty tired already and I'm not sure I included everything in this post that was necessary, if you need to know more about something feel free to ask.
 
Old 03-12-2007, 09:31 AM   #2
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
what's the output of hciconfig ?
 
Old 03-12-2007, 01:24 PM   #3
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
I'm not in linux right now but it listed the dongle (hci0) it's MAC address and all the options (all of them I've tried to change without any gain: auth, encrypt, secmgr, pscan and iscan as I remember it). If needed I'll check for sure in a few.
 
Old 03-12-2007, 02:13 PM   #4
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
Quote:
Originally Posted by kummiliim
all of them I've tried to change without any gain: auth, encrypt, secmgr, pscan and iscan as I remember it
that's why I was asking for it. I had a similar problem which was caused by hcid consistently ignoring some options in the hcid.conf. I had to add them manually every time before pairing something. Older versions of bluez worked fine, so I downgraded which fixed my problem.

However, since you have already verified that, your problem is obviously not related to mine.
 
Old 03-13-2007, 12:14 PM   #5
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
Thanks for trying anyway. Which of these options are necessary for pairing then?
 
Old 03-13-2007, 02:23 PM   #6
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
Hi,

I paired in the other direction, I connected from the phone to bluez and for that you need pscan and iscan enabled. Those would be ignored from hcid.conf. After I added them manually they would randomly be removed again when bluez made inquiries for other devices. That's why I downgraded.

I have no idea what causes your problem, sorry. Maybe you can narrow down the problem by checking your syslog for other error messages of hcid.

Try cat /var/log/syslog | grep hcid. If everything is fine, then it's very likely that dbus is the problem. Maybe reinstalling dbus helps.
 
Old 03-14-2007, 10:58 AM   #7
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
The log was clean. If I try to pair with the PC with only pscan and iscan then the phone looks for the PC forever until I kill the connection. If I enable auth it times out instead. I've reinstalled dbus and all the other components including Slackware itself too many times already. I guess I'll try older versions of things then.
God I need some sleep, I have to get it running by Friday though. Seriously, if you have any idea what to try, even if you don't have a clue about anything, still post it. I'm pretty much willing to try everything now.
 
Old 03-18-2007, 04:14 PM   #8
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
It can't be dbus problem. Only logical things to blame are the dongle or my own stupidity.

I took a clean old IBM computer, installed slack 11 on it. Compiled a custom 2.6.16.43 kernel. Then I installed dbus 1.0.2, bluez-libs 3.9 and bluez-utils 3.9. That's the point where all should work as I've gotten to understand it but no, everything's the same. I can scan and see the mobile. I just can't pair with it. It's starting to drive me a little crazy. Is there some very important installation step that I'm missing or what?

The dongle actually can't be the problem since IT WORKS but I just can't pair. Has to be my own fault somehow, just don't understand what I'm doig wrong.
 
Old 03-18-2007, 04:32 PM   #9
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
Quote:
Originally Posted by kummiliim
made a little script in the same directory called pin.sh that is executable and outputs PIN:0000 as echo, referenced it from hcid.conf as pin_helper
ok, just out of curiousity I have tried this now (I normally use kbluepin as pinhelper) and it works flawlessly, except for one detail. The line "pin_helper" is not accepted in my version (3.7.1), I have to register the pin helper manually via the passkey-agent binary. Like this:

passkey-agent --default /etc/bluetooth/pin.sh

Maybe try this and see if this has any impact. If not maybe do a test install of another distribution and see if it works there. If not try another dongle and make sure that your dongle is actually not the problem.

I myself have 2 epox dongles and 1 msi class 1 dongle and the same phone as you, all works perfect including kmobiletools.
 
Old 03-19-2007, 04:08 AM   #10
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
Now that you mention it, I think I remember that in some point I saw "pin_helper not reconized" or the like somewhere. Will try right now...

edit: Actually, what is this "passkey-agent". If it's some program then I didn't get it with bluez libs nor utils. Or sould it go to the hcid.conf?

Oh one more thing almatic. If everything works for you, could you try restarting hcid with
Code:
hcid -ndsf /etc/bluetooth/hcid.conf
or wherever your config is and show the output. If you get similar dbus error that way then I'll know for sure that that's not the problem.

My output:
Code:
root@SERVER:/etc/bluetooth# hcid -ndsf /etc/bluetooth/hcid.conf
hcid[2182]: Bluetooth HCI daemon
hcid[2182]: Enabling debug information
hcid[2182]: Unknown option 'pin_helper' line 25
hcid[2182]: syntax error line 25
hcid[2182]: Can't connect to system message bus: Failed to connect to socket /usr/local/var/run/dbus/system_bus_socket: No such file or directory
hcid[2182]: Unable to get on D-Bus
edit2: Found passkey agent from bluez-utils source directory, didn't seem to get installed anywhere. Will try...

edit3:
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# passkey-agent --default /etc/bluetooth/pin.sh
-bash: passkey-agent: command not found
It surely had to get installed somewhere but slocate only finds:
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# slocate passkey-agent
/usr/src/bluez-utils-3.9/daemon/passkey-agent.c
/usr/src/bluez-utils-3.9/daemon/.deps/passkey-agent.Po
/usr/src/bluez-utils-3.9/daemon/passkey-agent.o
/usr/src/bluez-utils-3.9/daemon/passkey-agent
(I used updatedb, yes)

Otherwise it seems, that this really is the problem. Googling for passkey-agent I found some similar pairing problems that all started working after using it. So now I only have to find it .

Last edited by kummiliim; 03-19-2007 at 04:40 AM.
 
Old 03-20-2007, 05:01 AM   #11
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
Finally got the passkey-agent executed but it didn't help. I was almost sure that this was the problem, don't know what to try anymore.

Actually I just realized that lsusb lists the dongle as "Broadcom corp." But it's A-link. I thought that A-Link adapters are made by Broadcom or something, if that isn't so then that might be the problem. I'm going to try to figure that out now.

edit: I just noticed that passkay-agent gave the error: "Can't get on system bus". That's still dbus, no?

Last edited by kummiliim; 03-20-2007 at 05:32 AM.
 
Old 03-21-2007, 12:24 PM   #12
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
I'm really sorry for the constant bumping but I'm really a bit desperate. Could anyone try the buetooth setup on their system using only the exact same software as I? I would really like to know what that all is about.
 
Old 03-23-2007, 09:43 AM   #13
arunjr
LQ Newbie
 
Registered: Jan 2007
Posts: 1

Rep: Reputation: 0
yeah me too on ur side... trying with a sony Ericsson k750i from past two weeks.
i didnt see any error in my syslogs.
file transfer from notebook to phone is smooth.
but when i am trying to pair, thats it.... phone ask for pin, after that no reply from notebook.
am quite tired of this. i am reading all the posts which google shows me regarding this problem. but still couldn't fix it. becoz of this i am using openSuse10.2 for connecting to internet.
 
Old 03-23-2007, 10:27 AM   #14
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
Something new here. Found /usr/local/etc/rc.d/rc.messagebus and started it with
Code:
/usr/local/etc/rc.d/rc.messagebus start
Now the errors are a bit different:

hcid:
Code:
root@SERVER:~# hcid -nsd
hcid[2188]: Bluetooth HCI daemon
hcid[2188]: Enabling debug information
hcid[2188]: Could not become the primary owner of org.bluez
hcid[2188]: Unable to get on D-Bus
passkey-agent:
Code:
root@SERVER:~# /usr/src/bluez-utils-3.9/daemon/passkey-agent --default 0000
Can't register passkey agent
The name org.bluez was not provided by any .service files
I'm currently trying to understand how dbus works but I still think I did something wrong, it should work from default install.

Quote:
Originally Posted by arunjr
yeah me too on ur side... trying with a sony Ericsson k750i from past two weeks.
i didnt see any error in my syslogs.
file transfer from notebook to phone is smooth.
but when i am trying to pair, thats it.... phone ask for pin, after that no reply from notebook.
am quite tired of this. i am reading all the posts which google shows me regarding this problem. but still couldn't fix it. becoz of this i am using openSuse10.2 for connecting to internet.
Do you also get a messagebus error when running hcid -nsd or passkey-agent?
 
Old 03-23-2007, 04:33 PM   #15
ran404
LQ Newbie
 
Registered: Mar 2005
Distribution: Ubuntu 7.04
Posts: 2

Rep: Reputation: 0
maybe your bluetooth settings are messed up?

try clear all the files in /var/lib/bluetooth, then restart dbus and hcid.

as far as i can tell, the /etc/bluetooth/hcid.conf becomes useless after the first run, as all persistent settings are stored under /var/lib/blueooth/[btaddr]
 
  


Reply

Tags
bluetooth, bluetoothd, bluez, dbus, fc6, fedora, hcid


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
k750i mobile + bluetooth Zlipknott Linux - Hardware 6 12-21-2006 08:36 AM
Problem using bluetooth mobile as modem/rfcomm connection refused. pingu Linux - Networking 7 07-15-2006 02:13 AM
OpenGL problem, suspecting HW flaw Hiper Linux - Hardware 1 12-17-2005 06:08 PM
mobile + bluetooth seaeye Linux - Networking 0 10-31-2004 06:05 PM
Mobile Bluetooth Calender Sync startail Linux - Software 10 09-16-2004 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration