You are not logged in.

#1 2008-12-03 09:48:59

steve_v
Member
Registered: 2006-02-11
Posts: 80

Bluetooth problem solved, what a waste of time posting to this forum.

-  phone works via bluetooth in virtualbox /win xp / bluesoleil

-  adapter is detected

Bluetooth: Core ver 2.13
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: HCI USB driver ver 2.10
usbcore: registered new interface driver hci_usb
Bluetooth: L2CAP ver 2.11
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.10
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bridge firewalling registered
pan0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.

-  bluetooth daemon up

Dec  3 22:31:17 Damnation hcid[20687]: Bluetooth HCI daemon
Dec  3 22:31:17 Damnation hcid[20687]: HCI dev 0 registered
Dec  3 22:31:17 Damnation hcid[20687]: HCI dev 0 already up
Dec  3 22:31:17 Damnation hcid[20687]: Device hci0 has been added
Dec  3 22:31:17 Damnation hcid[20687]: Starting security manager 0
Dec  3 22:31:17 Damnation hcid[20687]: Device hci0 has been activated
Dec  3 22:31:17 Damnation hcid[20687]: Starting SDP server
Dec  3 22:31:17 Damnation hcid[20687]: Registered manager path:/org/bluez/serial
Dec  3 22:31:17 Damnation hcid[20687]: bridge pan0 created
Dec  3 22:31:17 Damnation hcid[20687]: Registered manager path:/org/bluez/network
Dec  3 22:31:17 Damnation hcid[20687]: Registered server path:/org/bluez/network/nap
Dec  3 22:31:17 Damnation hcid[20687]: Registered server path:/org/bluez/network/gn
Dec  3 22:31:17 Damnation hcid[20687]: Registered server path:/org/bluez/network/panu
Dec  3 22:31:17 Damnation hcid[20687]: Unix socket created: 16
Dec  3 22:31:17 Damnation hcid[20687]: Registered manager path:/org/bluez/audio
Dec  3 22:31:17 Damnation hcid[20687]: Registered input manager path:/org/bluez/input

-  i can scan for, and find the phone

# >  hcitool inq
Inquiring ...
        00:19:4F:56:FD:F6       clock offset: 0x2168    class: 0x520204

-  pairing from the phone appears to work (phone says pairing succesfull, messages.log shows pin exchange)

Dec  3 22:32:06 Damnation hcid[20687]: pin_code_request (sba=00:1F:81:00:00:01, dba=00:19:4F:56:FD:F6)
Dec  3 22:32:34 Damnation hcid[20687]: pin_code_request (sba=00:1F:81:00:00:01, dba=00:19:4F:56:FD:F6)
Dec  3 22:32:34 Damnation hcid[20687]: link_key_notify (sba=00:1F:81:00:00:01, dba=00:19:4F:56:FD:F6)

-  l2ping fails

# >  l2ping 00:19:4F:56:FD:F6
Can't connect: Device or resource busy

(might just be the phone?)

-  can't connect rfcomm socket

 >  rfcomm connect 0
Can't connect RFCOMM socket: Operation now in progress

-  hcitool cc 00:19:4F:56:FD:F6 fails silently
hcidump:

HCI sniffer - Bluetooth packet analyzer ver 1.42
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Connect Complete (0x03) plen 11
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
> HCI Event: Command Status (0x0f) plen 4
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Max Slots Change (0x1b) plen 3
< HCI Command: Disconnect (0x01|0x0006) plen 3
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Disconn Complete (0x05) plen 4

-  hcitool con subsequently shows nothing

-  can't connect obexftp

>  obexftp -b 00:19:4F:56:FD:F6 -p UcliEvt.log
Browsing 00:19:4F:56:FD:F6 ...
Connecting...failed: connect
error on connect(): Invalid argument
Still trying to connect
Connecting...failed: connect
error on connect(): Invalid argument
Still trying to connect
Connecting...failed: connect
error on connect(): Invalid argument
Still trying to connect

hcidump:

HCI sniffer - Bluetooth packet analyzer ver 1.42
device: hci0 snap_len: 1028 filter: 0xffffffff
> HCI Event: Disconn Complete (0x05) plen 4
< HCI Command: Create Connection (0x01|0x0005) plen 13
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Connect Complete (0x03) plen 11
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
> HCI Event: Command Status (0x0f) plen 4
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Max Slots Change (0x1b) plen 3
< HCI Command: Disconnect (0x01|0x0006) plen 3
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Disconn Complete (0x05) plen 4

Relevant files:

# >  cat /etc/bluetooth/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;

        # Default PIN code for incoming connections
        passkey "0000";
}

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

        # Local device class
        class 0x000100;

        # 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;
}
# >  cat /etc/bluetooth/rfcomm.conf
#
# RFCOMM configuration file.
#

rfcomm0 {
#       # Automatically bind the device at startup
        bind yes;
#
#       # Bluetooth address of the device
        device 00:19:4F:56:FD:F6;
#
#       # RFCOMM channel for the connection
        channel 1;
#
#       # Description of the connection
        comment "Example Bluetooth device";
}
# >  cat /etc/conf.d/bluetooth
# Bluetooth configuraton file

# Bluetooth services (allowed values are "true" and "false")

# Run the hcid daemon (default: true)
#DAEMON_ENABLE="true"

# Run hid2hci (default: false)
#HID2HCI_ENABLE="true"

# Run the sdp daemon (default: false)
# If this is disabled, hcid's internal sdp daemon will be used
#SDPD_ENABLE="true"

# Run the bluetooth HID daemon (default: false)
#HIDD_ENABLE="true"

# Activate rfcomm ports (default: false)
RFCOMM_ENABLE="true"

# Run bluetooth dial-up networking daemon (default: false)
#DUND_ENABLE="false"

# Run bluetooth PAN daemon (default: false)
#PAND_ENABLE="true"

# hcid configuration file (default: /etc/bluetooth/hcid.conf)
#DAEMON_CONFIG="/etc/bluetooth/hcid.conf"

# rfcomm configuration file (default: /etc/bluetooth/rfcomm.conf)
#RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"

# Options for hidd, dund and pand (default: none)
#HIDD_OPTIONS=""
#DUND_OPTIONS=""
#PAND_OPTIONS=""

Any Ideas folks?

Cheers,

Steve.

Last edited by steve_v (2008-12-07 03:34:38)

Offline

#2 2008-12-03 22:46:09

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: Bluetooth problem solved, what a waste of time posting to this forum.

Not sure with this but try changing the device class in hcid.conf to

class 0x020100

man hcid.conf lists that class as "phone".

Offline

#3 2008-12-04 05:38:01

steve_v
Member
Registered: 2006-02-11
Posts: 80

Re: Bluetooth problem solved, what a waste of time posting to this forum.

No change there, tried multiple classes to no avail.
tried 'sdptool browse 00:19:4F:56:FD:F6' got:

# > sdptool browse 00:19:4F:56:FD:F6
Failed to connect to SDP server on 00:19:4F:56:FD:F6: File descriptor in bad state

Which doesn't mean much to me.

There is a bluesoleil linux port which I am tempted to play with but it's a 2mb limited demo so not a permanent solution.

Cheers,

Steve.

Last edited by steve_v (2008-12-06 07:11:59)

Offline

#4 2008-12-05 07:35:43

steve_v
Member
Registered: 2006-02-11
Posts: 80

Re: Bluetooth problem solved, what a waste of time posting to this forum.

Can't get be arsed getting bluesoliel to work... but bluetooth works perfectly in knoppix 5.1 ergo this is an Arch specific / version specific issue.
I have tried copying the configs from knoppix to no avail, however i believe knoppix uses an earlier version of bluez.

Cheers,

Steve.

Offline

#5 2008-12-05 08:23:46

steve_v
Member
Registered: 2006-02-11
Posts: 80

Re: Bluetooth problem solved, what a waste of time posting to this forum.

I just ran a verbose dump of a failed connection and got:

< HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 00:19:4F:56:FD:F6 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 0 bdaddr 00:19:4F:56:FD:F6 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 0
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x0c ncmd 1
    Error: Command Disallowed
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:19:4F:56:FD:F6 mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 0 slots 5
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 0 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 0 reason 0x16
    Reason: Connection Terminated by Local Host

The "command disallowed" bit looks interesting: any idea why this is happening?

Cheers,

Steve.

Offline

#6 2008-12-06 06:41:30

steve_v
Member
Registered: 2006-02-11
Posts: 80

Re: Bluetooth problem solved, what a waste of time posting to this forum.

Knoppix runs bluez 3.7, compiled and installed on arch, same problem - this leaves kernel (knoppix running 2.6.19) or configuration problem.
Consider this a bump ;-)

Cheers,

Steve.

Offline

#7 2008-12-07 03:33:31

steve_v
Member
Registered: 2006-02-11
Posts: 80

Re: Bluetooth problem solved, what a waste of time posting to this forum.

This is a regression in kernel 2.6.27.
Thanks for all the help guys, I wonder why I post on here sometimes.

Offline

#8 2008-12-07 04:44:25

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,472
Website

Re: Bluetooth problem solved, what a waste of time posting to this forum.

So do we when we can see you solved the problem all by yourself...

Online

#9 2008-12-07 15:41:58

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Bluetooth problem solved, what a waste of time posting to this forum.

Hey steve_v you've been registered since 2006, why don't you possibly help other people fix some of their issues before you start bitching that no one was able to help you?!

Also you must realize many users do not have bluetooth or use bluetooth with their computers.


Website - Blog - arch-home
Arch User since March 2005

Offline

Board footer

Powered by FluxBB