SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Am trying to make my phone (Nokia N95) exchange files with Slackware64 13.0 installation on my HP EliteBook 8530w. Previously, I had Bluetooth activated:
Code:
chmod 755 /etc/rc.d/rc.bluetooth
and connected my HP Bluetooth mouse, by changing HIDD_ENABLE item in /etc/rc.d/rc.bluetooth.conf to "true", and then by running:
Code:
hidd --search
once; regarding everything else, it is vanilla Slackware install. So, in order to connect with my phone (which is able to exchange Bluetooth messages with other phones, talk over Bluetooth to the headset, etc. - which means has own Bluetooth stack working properly), I first run:
Code:
hcitool scan
and then remembered the address of my phone (let's say it's 00:11:22:33:44:55), and then (according to the suggestion from /etc/bluetooth/README.SLACKWARE) created BlueZ passkey through:
Code:
echo -n "1234" >/etc/bluetooth/passkeys/default
Then I try to connect, through:
Code:
obexftp -b 00:11:22:33:44:55 -l
A popup appears on my phone, asking for BlueZ passkey, and I type "1234" in-there, but then following is reported:
Code:
Browsing 00:11:22:33:44:55 ...
Connecting...failed: connect
Tried to connect for 1357ms
The user may have rejected the transfer: Connection refused
looks like PasskeyAgent is not allowed on dbus... I've been trying to get BlueZ running on slack64 13 for 2 weeks now, no result so far, but I've seen a LOT of errors.
Your /etc/dbus-1/system.d/bluetooth.conf should look like this:
Code:
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent"/>
<allow send_interface="org.bluez.PasskeyAgent"/>
</policy>
<policy at_console="true">
<allow send_destination="org.bluez"/>
</policy>
<policy context="default">
<deny send_destination="org.bluez"/>
</policy>
</busconfig>
the red marked line is not in stock bluetooth.conf, you'll have to add that manually, afterwards reboot and retry.
BlueZ is such a mess since it plunged into the murky waters of dbus... Let me know of any progress.
EDIT: just tried that and it works. BTW this (using obexftp) is the ONLY way I was able to pair my devices under slack13 with stock BlueZ. Wouldn't figure it out without you cgorac, thanks a million .
EDIT2: In fact, you've solved all my problems, I got everything running. It was the first step I was missing. I never tried obexftp, because I couldn't care less about bluetooth file transfers, all I wanted was a NAP gateway. If I realized initiating obex file transfer provokes a successful bonding... Oh well... When I look back to the sleepless nights trying to make this work I realize more than ever that ignorance HURTS big time . Thanks a lot once more and I hope you will be successful too.
Last edited by 0rphu; 10-03-2009 at 09:19 AM.
Reason: kudoz
@rg3: Yes, I was restarting it after every change.
@0rphu: Many thanks for your suggestion on changing /etc/dbus-1/system.d/bluetooth.conf - I have it working now too. I was primarily interested in exchanging files with my phone quickly (well, at least for smaller files), in order to avoid plugging USB cable in/out, mounting/un-mounting etc. (albeit, I still have to learn about Bluetooth security, at the moment I feel very un-comfortable in having PIN as only protection for accessing to my machine). There are many interesting types of PC-phone Bluetooth connection besides that (using phone as modem, streaming audio in both directions, etc.), but as you said above - BlueZ configuration really seems impenetrable, even to an experienced Linux user...
Hi,
On a Sony Ericsson W760i I fail to get Bluetooth to connect using obexftp as is suggested in this thread.
I want to transfer pictures from the phone to the laptop.
I run Slackware64 13.0
Code:
obexftp -b [phone BD address] -l
...
Connecting...done
Tried to connect for 1073ms
Receiving "(null)"... <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd">
<!--
XML Coder, (C) 2001 Sony Ericsson Mobile Communications AB
-->
<folder-listing version="1.0"><folder name="Phone memory"/>
<folder name="Memory card"/>
</folder-listing>
done
Disconnecting...done
In /var/log/syslog;
Code:
Dec 6 17:54:56 slack hcid[3572]: Parsing /etc/bluetooth/main.conf failed: No such file or directory
Dec 6 17:54:56 slack hcid[3572]: Failed to listen on control channel
There is no file in etc/bluetooth/ called main.conf
Tried different commands with obexftp and always the same result: Bluetooth connection failed.
Can it be a bug in my phone?
Do I use obexftp correct..?
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296
Rep:
Thank you to all involved in this thread. I finally sorted my Broadcom BCM2046 bluetooth out with information in this thread. I tried a couple of others, but some of the information was a bit incomplete. This one worked flawlessly. For record purposes here is what I did.
Copied verbatim the code text for /etc/dbus-1/system.d/bluetooth.conf from 0rphu's post and saved it to /tmp as bluetooth.conf.
Code:
$pico /tmp/bluetooth.conf
UW PICO 5.04 File: bluetooth.conf
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent"/>
<allow send_interface="org.bluez.PasskeyAgent"/>
</policy>
<policy at_console="true">
<allow send_destination="org.bluez"/>
</policy>
Use ^X to close and answer Y to save.
Next I opened and modified /etc/rc.d/rc.bluetooth.conf enabling the options I need and saved. Your options may differ.
Code:
# pico /etc/rc.d/rc.bluetooth.conf
UW PICO 5.04 File: /etc/rc.d/rc.bluetooth.conf
# =============================================================================
# The SDP daemon allows clients to detect supported Bluetooth services
SDPD_ENABLE=true
# The HID daemon supports Bluetooth Human Interface Devices
HIDD_ENABLE=true
HIDD_OPTIONS="--server"
# This switches your Bluetooth device into HCI mode, use this if your input
# device does not support Bluetooth HID
HID2HCI_ENABLE=true
# The RFCOMM daemon is used to simulate serial connections over Bluetooth
RFCOMM_ENABLE=true
# The DUN daemon is used for Dial Up Networking over Bluetooth
DUND_ENABLE=false
DUND_OPTIONS="--listen --persist --msdun call dun"
# The PAN daemon is used to setup a Bluetooth network.
PAND_ENABLE=true
PAND_OPTIONS="--listen --role NAP"
Next I made rc.bluetooth executable
Code:
# chmod +x /etc/rc.d/rc.bluetooth
Now I needed to add a passkey.
Code:
# echo -n "XXXX" >/etc/bluetooth/passkeys/default
Replacing the XXXX with my passkey.
Then I copied the previously saved /tmp/bluetooth.conf file to the proper location.
Code:
# cd /tmp
cp bluetooth.conf /etc/dbus-1/system.d/
Finally, I executed a reboot. Upon reboot I'm now getting hci0 and the keyboard and touchpad aren't locked up.
looks like PasskeyAgent is not allowed on dbus... I've been trying to get BlueZ running on slack64 13 for 2 weeks now, no result so far, but I've seen a LOT of errors.
Your /etc/dbus-1/system.d/bluetooth.conf should look like this:
Code:
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent"/>
<allow send_interface="org.bluez.PasskeyAgent"/>
</policy>
<policy at_console="true">
<allow send_destination="org.bluez"/>
</policy>
<policy context="default">
<deny send_destination="org.bluez"/>
</policy>
</busconfig>
the red marked line is not in stock bluetooth.conf, you'll have to add that manually, afterwards reboot and retry.
BlueZ is such a mess since it plunged into the murky waters of dbus... Let me know of any progress.
EDIT: just tried that and it works. BTW this (using obexftp) is the ONLY way I was able to pair my devices under slack13 with stock BlueZ. Wouldn't figure it out without you cgorac, thanks a million .
EDIT2: In fact, you've solved all my problems, I got everything running. It was the first step I was missing. I never tried obexftp, because I couldn't care less about bluetooth file transfers, all I wanted was a NAP gateway. If I realized initiating obex file transfer provokes a successful bonding... Oh well... When I look back to the sleepless nights trying to make this work I realize more than ever that ignorance HURTS big time . Thanks a lot once more and I hope you will be successful too.
Thanks! This is exactly the problem I have. I am using Slackware-current from today. I still need to make this change.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.