Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bluetooth problems, connection timed out [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
toxicated
n00b
n00b


Joined: 28 Mar 2003
Posts: 27
Location: Sweden

PostPosted: Fri Nov 04, 2005 6:45 pm    Post subject: bluetooth problems, connection timed out [SOLVED] Reply with quote

I have a Nokia 6230 mobile phone with bluetooth and wanted to get it to work with my gentoo desktop, syncing address books and transfering files and so on so I started to fix it all up.

I'm using the "CNet" USB dongle, it's found by hciconfig and all that:

Code:

> hciconfig -a
hci0:   Type: USB
        BD Address: 00:11:F6:03:A8:57 ACL MTU: 120:20 SCO MTU: 64:0
        UP RUNNING PSCAN ISCAN AUTH ENCRYPT
        RX bytes:13119 acl:1 sco:0 events:779 errors:0
        TX bytes:6321 acl:36 sco:0 commands:366 errors:0
        Features: 0xff 0xff 0x05 0x38 0x18 0x18 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: 'zion'
        Class: 0x3e0100
        Service Classes: Networking, Rendering, Capturing, Object Transfer, Audio
        Device Class: Computer, Uncategorized
        HCI Ver: 1.2 (0x2) HCI Rev: 0x0 LMP Ver: 1.2 (0x2) LMP Subver: 0x757
        Manufacturer: Silicon Wave (11)


So I activate Bluetooth on the phone, and try to find it with my computer:
Code:

> hcitool dev
Devices:
        hci0    00:11:F6:03:A8:57
> hcitool inq
Inquiring ...
        00:12:62:CA:1F:ED       clock offset: 0x24fe    class: 0x520204
> hcitool scan
Scanning ...
        00:12:62:CA:1F:ED       Jo


Woho, everything seems to be fine, my phone "Jo" seems to be found and I'm still happy.

Next thing I want to do is browse my phone:
Code:

> sdptool browse 00:12:62:CA:1F:ED

I dialog asking me to enter a PIN code pops up, I enter the pin code and click on the "Accept" button.
Now my phone asks me to accept the pairing and asks for a code too, I enter the same number and it says "Paired with zion!".
But in my terminal nothing happens, but until after some seconds i get the error message
Code:
Failed to connect to SDP server on 00:12:62:CA:1F:ED: Connection timed out
.

I've also tried to use the kdebluetooth pin tool (setting in /etc/bluetooth/hcid.conf) with no luck.
And I've tried browsing in konqueror, it finds my phone in bluetooth:/ but it doesn't find any items.

Kernel version: 2.6.13-gentoo-r3 and I'm running AMD64.

Does anyone have any idea what can be wrong?


Last edited by toxicated on Tue Nov 08, 2005 6:37 pm; edited 2 times in total
Back to top
View user's profile Send private message
thesnowman
Guru
Guru


Joined: 08 May 2003
Posts: 365
Location: Sydney, Australia

PostPosted: Sat Nov 05, 2005 5:58 am    Post subject: Reply with quote

Can you post your hcid.conf? Looks like you are using security mode 3 (both auth and encypt enabled). If this is the case the both devices must be running in this mode and I doubt your phone is. Comment the two lines in your hcid.conf and restart bluetooth.
Back to top
View user's profile Send private message
toxicated
n00b
n00b


Joined: 28 Mar 2003
Posts: 27
Location: Sweden

PostPosted: Sat Nov 05, 2005 9:19 am    Post subject: Reply with quote

The difference between having both of them commented, uncommented, partly commented:
All inactive: No pin code questions, just timed out
Both active: Pin code questions, successfully pairing (atleast my phone tells me that), but timed out.
Auth active: same as both
Encrypt active: same again

Here comes my hcid.conf:
Code:
#
# HCI daemon configuration file.
#
# $Id: hcid.conf,v 1.7 2004/12/13 14:16:03 holtmann Exp $
#

# 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 user;

    # 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;
#pin_helper /usr/lib/kdebluetooth/kbluepin;

    # D-Bus PIN helper
    #dbus_pin_helper;
}

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

    # 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;
}
Back to top
View user's profile Send private message
scoon
l33t
l33t


Joined: 23 Aug 2003
Posts: 747
Location: Philadelphia, PA

PostPosted: Sat Nov 05, 2005 1:05 pm    Post subject: Reply with quote

Hey there,

In your hcid.conf, try this:
Code:

        # Local device class
        #class 0x3e0100;
        class 0x100100;


I got that from these forums. I use bluetooth logitech kb/mouse and a nokia cell.

regards,
scoon
_________________
Hope this helps........
Back to top
View user's profile Send private message
toxicated
n00b
n00b


Joined: 28 Mar 2003
Posts: 27
Location: Sweden

PostPosted: Sun Nov 06, 2005 2:06 am    Post subject: Reply with quote

Still the same, it times out :/
Back to top
View user's profile Send private message
scoon
l33t
l33t


Joined: 23 Aug 2003
Posts: 747
Location: Philadelphia, PA

PostPosted: Sun Nov 06, 2005 11:31 pm    Post subject: Reply with quote

Hey there,

Any info in dmesg ? Have you tried strace ? What about bluez.org. Maybe you need those patches for it to work. In fact, that maybe something to look into. I have the same phone as you and can send files back and forth with no problems.

regards,
scoon
_________________
Hope this helps........
Back to top
View user's profile Send private message
toxicated
n00b
n00b


Joined: 28 Mar 2003
Posts: 27
Location: Sweden

PostPosted: Mon Nov 07, 2005 9:49 pm    Post subject: Reply with quote

Dmesg and trace doesn't give any answers I'm afraid, but I will try new kernel and patches.
Thanks for the tips everyone, I'll get back with more comments when I've tried the patches..
Back to top
View user's profile Send private message
toxicated
n00b
n00b


Joined: 28 Mar 2003
Posts: 27
Location: Sweden

PostPosted: Tue Nov 08, 2005 6:36 pm    Post subject: Reply with quote

I can browse and transfer files now, yipiee! Thanks for the help!

I can't tell if it was the kernel upgrade or the patch from bluez.org, but after booting 2.6.14+the patch it works fairly good.

Still some problems though, it doesn't seem to remember being paired for more than one "session", like this:

Code:
> rfcomm connect 0 00:12:62:CA:1F:ED
Can't connect RFCOMM socket: Permission denied
> rfcomm connect 0 00:12:62:CA:1F:ED
Can't connect RFCOMM socket: Too many levels of symbolic links
> rfcomm connect 0 00:12:62:CA:1F:ED
Can't connect RFCOMM socket: Too many levels of symbolic links
> rfcomm connect 0 00:12:62:CA:1F:ED
Connected /dev/rfcomm0 to 00:12:62:CA:1F:ED on channel 1
Press CTRL-C for hangup

And it asks for pin codes and stuff before "Connected /dev....". These commands are executed within seconds and the pairing is still active on the phone, but this is not a big problem for now.
Back to top
View user's profile Send private message
scoon
l33t
l33t


Joined: 23 Aug 2003
Posts: 747
Location: Philadelphia, PA

PostPosted: Wed Nov 09, 2005 12:31 am    Post subject: Reply with quote

Hey there,

Glad you got it this far. I don't have an rfcomm0 device so maybe it has something to do w/ hotplug or dbus ?

regards,
scoon
_________________
Hope this helps........
Back to top
View user's profile Send private message
toxicated
n00b
n00b


Joined: 28 Mar 2003
Posts: 27
Location: Sweden

PostPosted: Wed Nov 09, 2005 7:59 am    Post subject: Reply with quote

/dev/rfcomm0 is created when "rfcomm connect 0 [address]" is run, and removed when terminated, like a temporary connection to the phone through the device.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum