Can't pair PC with mobile using bluetooth, suspecting dbus problem.
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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
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.
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.
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.
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.
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.
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.
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.
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:
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 .
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?
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.
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.
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?
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]
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.