2005-11-14 13:52:22

by Rolf S. Dubitzky

[permalink] [raw]
Subject: [Bluez-users] hcid crashing on pin_code_request

Hi,

I try to pair my jabraBT200 headset with a USB-BT dongle on FedoraC4.
(details below) I used the dongle to communicate with the phone and that
works just fine. The headset works fine with the phone as well. I suspect,
that I have a compatibility problem with the package mix on my FC4 box (see
below), since when starting hcid -n I get the following backtrace in the very
second I try to communicate with the headset (e.g. l2ping and headset in
pairing mode): (I tried security auto; and security user; but the pin
helper isn't even started. hcid crashes before that I asume)

Thanx for any help, Rolf

# hcid -n
hcid[28766]: Bluetooth HCI daemon
hcid[28766]: Starting security manager 0

hcid[28766]: pin_code_request (sba=00:09:DD:10:53:4E, dba=00:07:A4:03:97:24)
28766: arguments to dbus_type_is_basic() were incorrect, assertion
"_dbus_type_is_valid (typecode) || typecode == DBUS_TYPE_INVALID" failed in
file dbus-signature.c line 259.
This is normally a bug in some application using the D-BUS library.
type unknown isn't supported yet in dbus_message_append_args_valist
*** buffer overflow detected ***: hcid: processing events terminated
======= Backtrace: =========
/lib/libc.so.6(__chk_fail+0x41)[0xf7ec45]
hcid: processing events[0x891e8b]
/usr/lib/libdbus-1.so.1[0x5ee155]
/usr/lib/libdbus-1.so.1[0x5ce49b]
/usr/lib/libdbus-1.so.1(dbus_connection_dispatch+0x20a)[0x5d2f37]
hcid: processing events[0x8919c0]
hcid: processing events[0x8918b0]
hcid: processing events(main+0x4c5)[0x88dfef]
/lib/libc.so.6(__libc_start_main+0xdf)[0xeb5d5f]
hcid: processing events[0x88d071]
======= Memory map: ========
005c2000-0062b000 r-xp 00000000 03:01 4896232 /usr/lib/libdbus-1.so.1.0.0
0062b000-00630000 rwxp 00069000 03:01 4896232 /usr/lib/libdbus-1.so.1.0.0
0077d000-0077e000 r-xp 0077d000 00:00 0 [vdso]
0088b000-00895000 r-xp 00000000 03:01 4256755 /usr/sbin/hcid
00895000-00896000 rwxp 00009000 03:01 4256755 /usr/sbin/hcid
008e5000-008f1000 r-xp 00000000 03:01
4265003 /usr/lib/libbluetooth.so.1.0.15
008f1000-008f2000 rwxp 0000c000 03:01
4265003 /usr/lib/libbluetooth.so.1.0.15
009f3000-00a05000 r-xp 00000000 03:01 3755952 /lib/libnsl-2.3.5.so
00a05000-00a06000 r-xp 00011000 03:01 3755952 /lib/libnsl-2.3.5.so
00a06000-00a07000 rwxp 00012000 03:01 3755952 /lib/libnsl-2.3.5.so
00a07000-00a09000 rwxp 00a07000 00:00 0
00aa7000-00ac1000 r-xp 00000000 03:01 3753769 /lib/ld-2.3.5.so
00ac1000-00ac2000 r-xp 00019000 03:01 3753769 /lib/ld-2.3.5.so
00ac2000-00ac3000 rwxp 0001a000 03:01 3753769 /lib/ld-2.3.5.so
00df6000-00dff000 r-xp 00000000 03:01
3755943 /lib/libgcc_s-4.0.1-20050727.so.1
00dff000-00e00000 rwxp 00009000 03:01
3755943 /lib/libgcc_s-4.0.1-20050727.so.1
00ea1000-00fc4000 r-xp 00000000 03:01 3753771 /lib/libc-2.3.5.so
00fc4000-00fc6000 r-xp 00123000 03:01 3753771 /lib/libc-2.3.5.so
00fc6000-00fc8000 rwxp 00125000 03:01 3753771 /lib/libc-2.3.5.so
00fc8000-00fca000 rwxp 00fc8000 00:00 0
08650000-08671000 rw-p 08650000 00:00 0 [heap]
b7f91000-b7f93000 rw-p b7f91000 00:00 0
b7fb0000-b7fb1000 rw-p b7fb0000 00:00 0
bf99b000-bf9b1000 rw-p bf99b000 00:00 0 [stack]
Aborted


-----

FC4 packages installed:

dbus-glib-0.33-3.fc4.1
dbus-0.33-3.fc4.1
dbus-python-0.33-3.fc4.1
dbus-x11-0.33-3.fc4.1
bluez-hcidump-1.18-1
bluez-utils-2.15-7
bluez-libs-2.15-1
bluez-libs-devel-2.15-1
bluez-pin-0.24-2

----

# hciconfig hci0 revision
hci0: Type: USB
BD Address: 00:09:DD:10:53:4E ACL MTU: 192:8 SCO MTU: 64:8
HCI 17.11
Chip version: BlueCore02
Max key size: 128 bit
SCO mapping: HCI


# hcitool scan
Scanning ...
00:07:A4:03:97:24 JABRA BT200

# hcidump -X -V (I can provide more, but I doubt it is informative)
> HCI Event: PIN Code Request (0x16) plen 6
bdaddr 00:07:A4:03:97:24
==> crash






-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2005-11-14 16:38:08

by Jimmi

[permalink] [raw]
Subject: Re: [Bluez-users] Re: hcid crashing on pin_code_request

* Rolf S. Dubitzky il 14/11/05 alle 17,05 ha scritto:
> # /usr/local/bin/btsco -v -r -s 00:07:A4:03:97:24
> btsco v0.4c
> Device is 1:0
> Error: Failed to connect to SDP server: Connection timed out
> Assuming channel 2
>
> Voice setting: 0x0060
> Can't connect RFCOMM channel: Resource temporarily unavailable

I fixed this problem by including:
auth disable;
encrypt disable;
in /etc/bluetooth/hcid.config. I hope ot works for you too :)
--
--- _ o | If God had intended man to use the metric |
/ immi --- _/\_> | system, Jesus would have only had ten |
(_/ - O,> / O | disciples. |


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-11-14 16:05:50

by Rolf S. Dubitzky

[permalink] [raw]
Subject: [Bluez-users] Re: hcid crashing on pin_code_request

Ok,

I guess the standard answer is to compile the latest version ;-) Which
actualy helps. I gues I have paired the devices now, but still no cigar.
When starting btsco it complains:

# /usr/local/bin/btsco -v -r -s 00:07:A4:03:97:24
btsco v0.4c
Device is 1:0
Error: Failed to connect to SDP server: Connection timed out
Assuming channel 2

Voice setting: 0x0060
Can't connect RFCOMM channel: Resource temporarily unavailable

sdpd is running.

# ps -C sdpd
PID TTY TIME CMD
27407 ? 00:00:00 sdpd

what to do? I follow the HOWTO on http://bluetooth-alsa.sourceforge.net/
which doesn't mention RFCOMM.

The hcidump from starting btsco is below. Do I need to add something
in /etc/bluetooth/rfcomm ??

output of hcitool info, aplay -l, various sdptool calls are below.

Cheers, Rolf



# cat /var/lib/bluetooth/00\:09\:DD\:10\:53\:4E/features
00:07:A4:03:97:24 FCFF0B0000000000

# /usr/local/bin/hcitool info 00:07:A4:03:97:24
Requesting information ...

BD Address: 00:07:A4:03:97:24
Device Name: JABRA BT200
LMP Version: 1.1 (0x1) LMP Subversion: 0x3f9
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xfc 0xff 0x0b 0x00 0x00 0x00 0x00 0x00
<encryption> <slot offset> <timing accuracy> <role switch>
<hold mode> <sniff mode> <park state> <RSSI> <channel quality>
<SCO link> <HV2 packets> <HV3 packets> <u-law log> <A-law log>
<CVSD> <paging scheme> <transparent SCO>
# /usr/local/bin/sdptool records 00:07:A4:03:97:24
Failed to connect to SDP server on 00:07:A4:03:97:24: Connection timed out
# /usr/local/bin/sdptool browse 00:07:A4:03:97:24
Failed to connect to SDP server on 00:07:A4:03:97:24: Connection timed out

# /usr/local/bin/sdptool search hs
Inquiring ...
# /usr/local/bin/sdptool search hf
Inquiring ...
#

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AudioPCI [Ensoniq AudioPCI], device 0: ES1371/1 [ES1371 DAC2/ADC]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: AudioPCI [Ensoniq AudioPCI], device 1: ES1371/2 [ES1371 DAC1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Headset [BT Headset], device 0: Bluetooth SCO PCM [BT SCO PCM]
Subdevices: 1/1
Subdevice #0: subdevice #0



-------- hcidump -X -V
(.. the part after btsco startup



< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:07:A4:03:97:24 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: Link Key Request (0x17) plen 6
bdaddr 00:07:A4:03:97:24
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
bdaddr 00:07:A4:03:97:24 key 42892CA9762A764B1AAAD26AA3A31453
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Reply (0x01|0x000b) ncmd 1
status 0x00 bdaddr 00:07:A4:03:97:24
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 41 bdaddr 00:07:A4:03:97:24 type ACL encrypt 0x01
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 41 policy 0x0f
Link policy: RSWITCH HOLD SNIFF PARK
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
bdaddr 00:07:A4:03:97:24 mode 1
> HCI Event: Command Complete (0x0e) plen 6
Write Link Policy Settings (0x02|0x000d) ncmd 1
status 0x00 handle 41
< HCI Command: Read Voice Setting (0x03|0x0025) plen 0
> HCI Event: Command Complete (0x0e) plen 6
Read Voice Setting (0x03|0x0025) ncmd 1
status 0x00 voice setting 0x0060
< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 41 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 41 reason 0x16
Reason: Connection Terminated by Local Host



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-11-15 09:22:05

by Rolf S. Dubitzky

[permalink] [raw]
Subject: [Bluez-users] Re: hcid crashing on pin_code_request

Hi,

I got it to work now. For completeness:

1) the bluez packages (see original post) in FedoraC4 are broken. They
don't work and crash in the way I posted.
=> get latest version and compile yourself

2) the current version of bluez-utils (2.22) doesn't compile propperly on
FC4. The ./configure doesn't find the dbus libraries and just doesn't
compile with dbus support, but without dbus support bluez is unusable for
me. I would concider this to be a bug in bluez, but ymmv.
Now without dbus support sdp doesn't work, e.g. sdptool browse just
returns

Failed to connect to SDP server on 00:07:A4:03:97:24: Connection timed
out

So if a tool doesn't work without dbus, I'd highly recommend to make dbus
a requirement, not an option.

The problem with compiling on FC4 is that for some funky reason dbus
headers are spread over two directories:
/usr/include/dbus-1.0/dbus/* (e.g. dbus.h)
and one other file in
/usr/lib/dbus-1.0/include/dbus/dbus-arch-deps.h
So you have to -I _both_ directories to make #include dbus/dbus.h compile.


Cheers, Rolf

2005-11-14 18:13:47

by Rolf S. Dubitzky

[permalink] [raw]
Subject: [Bluez-users] Re: hcid crashing on pin_code_request

> I fixed this problem by including:
> auth disable;
> encrypt disable;
> in /etc/bluetooth/hcid.config. I hope ot works for you too :)

I had that already... :-(

-R

--------------

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

# D-Bus PIN helper
#dbus_pin_helper;
}

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

# 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 disable;
encrypt disable;
}


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users