You are not logged in.

#1 2009-02-23 14:02:35

ruivilela
Member
Registered: 2009-02-23
Posts: 4

Pairing bluetooth devices

I have a Archlinux in a EEE 701. A working USB dongle, and a Samsung SGH-E250 phone with EDGE/GPRS modem. All work in Linux Gentoo on other computer. I've converted most of ppp script.

I'm following this guide:
http://www.archlinux.it/wiki/index.php? … GPRS_Howto

Problems with steps follows

5.
There was not any /etc/bluetooth/hcid.conf in my system (so i copied from the gentoo system)

6. Also no rfcomm.conf file. Had to copy it

9. whereis ll ?

10. Whereis passkey-agent? There is no passkey agent. I'm really not sure how this stuff works, but in my xfce4 in gentoo system, a gtk dialog pops up and asks for pin.

Bluetooth phone does ask pin and...

/var/log/messages

Feb 23 14:57:45 Hades pppd[4129]: pppd 2.4.4 started by ruivilela, uid 0
Feb 23 14:57:53 Hades bluetoothd[4043]: pin_code_request (sba=00:09:DD:10:97:1B, dba=00:1E:E1:8C:03:0D)
Feb 23 14:57:53 Hades pppd[4129]: Exit.

hcid.conf

#
# HCI daemon configuration file.
#

# HCId options
options {
    # Automatically initialize new devices
    autoinit yes;

    # Security Manager mode
    #   none - Security manager disabled
    #   auto - Use local PIN for incoming connections
    #   user - Always ask user for a PIN
    #
    security auto;

    # Pairing mode
    #   none  - Pairing disabled
    #   multi - Allow pairing with already paired devices
    #   once  - Pair once and deny successive attempts
    pairing multi;

    # PIN helper
    pin_helper /usr/bin/bluepin;

    # D-Bus PIN helper
        #NOTHING WORKS HERE!!
    dbus_pin_helper;
    passkey "4090";
    pin "4090"
}

# Default settings for HCI devices
device {
    # Local device name
    #   %d - device id
    #   %h - host name
    name "BlueZ (%h)";

    # Local device class
    class 0x3e0100;

    # Default packet type
    #pkt_type DH1,DM1,HV1;

    # Inquiry and Page scan
    iscan enable; pscan enable;

    # Default link mode
    #   none   - no specific policy 
    #   accept - always accept incoming connections
    #   master - become master on incoming connections,
    #            deny role switch on outgoing connections
    lm accept;

    # Default link policy
    #   none    - no specific policy
    #   rswitch - allow role switch
    #   hold    - allow hold mode
    #   sniff   - allow sniff mode
    #   park    - allow park mode
    lp rswitch,hold,sniff,park;

    # Authentication and Encryption (Security Mode 3)
    #auth enable;
    #encrypt enable;
}

Last edited by ruivilela (2009-02-26 13:44:59)

Offline

#2 2009-02-23 16:35:02

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: Pairing bluetooth devices

1-no need for hcid.conf anymore (main.conf now)
2-make rfcomm.conf with your mac
3-use bluez-gnome - this will help you - passkey-agent not used anymore
all this about bluez 4.x

4-perfectly works wvdial to establish connection

Last edited by zyghom (2009-02-23 16:35:46)


Zygfryd Homonto

Offline

#3 2009-02-25 15:07:41

ruivilela
Member
Registered: 2009-02-23
Posts: 4

Re: Pairing bluetooth devices

I still didn't get to that PPP issue.

I'm having problems to make the pair between phone and laptop. They have to negotiate a PIN, yes?

I installed the bluez-gnome, i fail to see what's the point, or any difference

I want to be able to ssh to laptop and type 'pon mynet', ofcourse phone will ask for pin, and I want to pair it first (i need to).

Offline

#4 2009-02-25 15:45:54

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Pairing bluetooth devices

General forum advice; please ensure that the topic you choose summarises the problem you are experiencing.

More specifically, your problem is only marginally related to the quality of the referenced wiki page, and substantially more to do with a) the fact that you have not successfully paired the devices yet, and b) your unfamiliarity with the changes introduced in bluez 4.x. The Arch wiki is a useful resource, but it is not the only one available to you. And as with all wikis, it is up to the community to keep it maintained.

After you have taken the time to deal with the two issues I mentioned, you might consider updating the wiki page yourself.

Offline

#5 2009-02-25 16:12:00

ruivilela
Member
Registered: 2009-02-23
Posts: 4

Re: Pairing bluetooth devices

Sorry, my mood died after one hour of configurations, and my title choice was not 'reflected'. The Arch wiki has usefull information, but that guide is for what i see outdated.

Offline

#6 2009-02-26 13:44:33

ruivilela
Member
Registered: 2009-02-23
Posts: 4

Re: Pairing bluetooth devices

I find quite strange this configuration for pairing bluetooth devices in Arch. If Arch solution is to install bluez-gnome. I would had install Ubuntu. Or installed Gentoo (for 2-3 days) and simply copy configuration from other laptop.

Offline

#7 2009-03-16 14:23:16

mgushee
Member
From: Englewood, CO, USA
Registered: 2004-11-28
Posts: 59
Website

Re: Pairing bluetooth devices

ruivilela wrote:

I find quite strange this configuration for pairing bluetooth devices in Arch.

I also find it strange. I thought that one of the central precepts of Arch Linux was to keep things simple--well, what does "simple" mean? What I like it to mean in the context of system configuration, and what I thought Arch Linux meant by it, was that you configured things by means of straightforward text files, and thus didn't require all the multilayered, distro-specific cruft often found in RedBianDrivaBuntu or whatever.

On a more practical note, is there or is there not a config file or script where you can set the PIN? Not everyone uses Gnome, or wants to, or should have to just to configure one device, and I thought the Arch community was in favor of that sort of free choice. If you don't use a Gnome desktop, you can't use bluez-gnome (I've tried).

If there's no easy answer to that question, fine, just say so. I know how to do research, and will be glad to share what I discover with the community. However, researching Linux configuration issues can be very frustrating these days, because of the increasing fragmentation of distros. Tomk, you're quite right that:

tomk wrote:

The Arch wiki is a useful resource, but it is not the only one available to you.

But if I read documentation for, say, Ubuntu or Gentoo, it is usually unclear whether the methods they describe are distro-specific or universal. And there is a large body of documentation that is undated and fails to mention what versions of which distro it applies to (why the *@$&@ do people do that?). And if the methods don't work on an Arch system, is it due to some trivial difference such as config files having different names or being in different places, or is the approach completely different?

Etc. Sorry, abrupt end, gotta go to work.


Matt Gushee
Englewood, CO, USA

Offline

#8 2009-03-25 07:34:55

gattschardo
Member
Registered: 2009-03-25
Posts: 3

Re: Pairing bluetooth devices

mgushee, I can understand exactly how you must feel, facing this problem, because I struggled with the same one a week ago. I have no found a solution how to pair bluetooth devices without needing the bluez-gnome package.

What you need is the official bluez package (don't worry, you won't need to compile it) from kernel.org. You extract it to any place you like, and look for a file called "simple-agent" (should be in the subfolder "test" of the archive's main folder). This is a python script which implements a (guess what) simple passkey agent for the command line. You need a few python related packages from the regular repositories to get this to run: dbus-python and pygobject. Maybe you'll also need python-pybluez though it could do without it.

Then you start the simple-agent script as root on any terminal you like: su -c "/path/to/simple-agent" - if it all works, you should get the message "Agent registered" on that console. You can now start pairing from your mobile device, and the script will ask you for the passcode on this console, you type it and confirm with enter - voila that's all. You can now also shut down the agent using ^C-c, you need it only for pairing, not every time you want to connect.

I hope this was helpful wink

edit: had to fix some bbcode, stupid me smile

Last edited by gattschardo (2009-03-25 07:36:22)


Beware -you will never get out of this world alive!

Offline

#9 2009-04-02 18:44:43

kichawa
Member
Registered: 2008-07-15
Posts: 32

Re: Pairing bluetooth devices

Thanks you smile I was looking for it so long. It's great solution smile

Offline

#10 2009-04-03 02:20:59

leeyee
Member
From: Kingston, Canada
Registered: 2009-01-07
Posts: 150

Re: Pairing bluetooth devices

Hey, I managed to pair bluetooth devices without bluez-gnome, just try blueman, it's full featured to pair devices. However, you may need to install obex-data-server from AUR instead of the repository.
With blueman and NetworkManager, you can easily connect to bluetooth phone as a GPRS modem, no need to modify configuration files rfcomm.conf or hcid.conf


Archlinux x86_64 on Thinkpad T400
Intel X4500MHD / ATI HD3470 Graphics, 2G RAM, 160G HD

Offline

#11 2010-02-20 16:39:36

luboss
Member
Registered: 2010-02-20
Posts: 2

Re: Pairing bluetooth devices

gattschardo wrote:

mgushee, I can understand exactly how you must feel, facing this problem, because I struggled with the same one a week ago. I have no found a solution how to pair bluetooth devices without needing the bluez-gnome package.

What you need is the official bluez package (don't worry, you won't need to compile it) from kernel.org. You extract it to any place you like, and look for a file called "simple-agent" (should be in the subfolder "test" of the archive's main folder). This is a python script which implements a (guess what) simple passkey agent for the command line. You need a few python related packages from the regular repositories to get this to run: dbus-python and pygobject. Maybe you'll also need python-pybluez though it could do without it.

Then you start the simple-agent script as root on any terminal you like: su -c "/path/to/simple-agent" - if it all works, you should get the message "Agent registered" on that console. You can now start pairing from your mobile device, and the script will ask you for the passcode on this console, you type it and confirm with enter - voila that's all. You can now also shut down the agent using ^C-c, you need it only for pairing, not every time you want to connect.

I hope this was helpful wink

Yes, it was!!!
I registered here only to thank you gattschardo. It took me hours to find this answer.
Lot of things have changed with 4.x version. While googling only I could  find where configurations of hcid.conf with pin_helper or passkey-agent but both of them are obsolete. There is no documentation on Bluez wiki how to pair the devices or how to set pin.
Unfortunately bluez-gnome does not work for me (I can't see any device in the list).
I'm using gentoo and I found lot of useful answers on this forum.
Thank you guyz!

Last edited by luboss (2010-02-20 18:12:15)

Offline

#12 2010-02-20 20:31:28

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Pairing bluetooth devices

Luboss - don't post in old threads.

Closing.

Offline

Board footer

Powered by FluxBB