public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] [Fwd: Re: [Bluez-users] bluez-utils 2.7 and bthid]
@ 2004-05-10  9:19 Robert Foster
  0 siblings, 0 replies; only message in thread
From: Robert Foster @ 2004-05-10  9:19 UTC (permalink / raw)
  To: BlueZ Mailing List

[-- Attachment #1: Type: text/plain, Size: 51 bytes --]

Sorry, should have sent this to the list :-|

Rob.

[-- Attachment #2: Forwarded message - Re: [Bluez-users] bluez-utils 2.7 and bthid --]
[-- Type: message/rfc822, Size: 7962 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 1363 bytes --]

hi Marcel,
I've attached a couple of files.  

bthid1.txt has the commands I executed to install the libs and utils v.
2.7; the bthid commands i executed, as well as the hcidump and system
log entries related to the connection to the mouse.

Interesting to note that I wasn't prompted for a PIN this time, it
simply failed.

Note also that this was working perfectly before the reboot, using the
old 2.6 libs and utils.

I have also set up a rather simple script - /etc/init.d/bluetooth-hid to
automatically connect to the mouse at startup, which gets it's options
from a config file in /etc/bluetooth/hid.conf

Also attached is my hcid.conf file.

Any help greatly appreciated :)

I'm quite happy reverting back to 2.6 (for now), but to satisfy my
curiosity, etc, I'd like to figure out what's going on here :)

Thanks,
Rob.

On Mon, 2004-05-10 at 18:31, Marcel Holtmann wrote:
> Hi Robert,
> 
> > bthid does not seem to play nicely with the recently released
> > bluez-utils 2.7.  Every time I tried to connect to my MS mouse, it would
> > ask for a pin code.  I had to uninstall bluez-{utils|libs} 2.7 and
> > revert back to the 2.6 release before this problem would go away again.
> 
> I haven't seen such problem. Do you enabled auth or encrypt in your
> hcid.conf? Look with hcidump at the connection setup and show it to us.
> 
> Regards
> 
> Marcel
> 
> 

[-- Attachment #2.1.2: bthid1.txt --]
[-- Type: text/plain, Size: 2446 bytes --]

[rfoster@rover bluez-libs-2.7]$ ./configure

[rfoster@rover bluez-libs-2.7]$ make

[rfoster@rover bluez-libs-2.7]$ su -c 'make install'

[rfoster@rover bluez-libs-2.7]$ cd ../bluez-utils-2.7/

[rfoster@rover bluez-utils-2.7]$ ./configure

[rfoster@rover bluez-utils-2.7]$ make

[rfoster@rover bluez-utils-2.7]$ su -c 'make install'

<reboot>

[rfoster@rover eClient]$ su -
Password:
[root@rover root]# /opt/bluetooth/sbin/bthid --daemon
[root@rover root]# /opt/bluetooth/sbin/bthid --connect 00:50:F2:E5:B5:57

output from hcidump:
HCIDump - HCI packet analyzer ver 1.8
device: hci0 snap_len: 1028 filter: 0xffffffff
> HCI Event: Connect Request(0x04) plen 10
< HCI Command: Accept Connection Request(0x01|0x0009) plen 7
> HCI Event: Command Status(0x0f) plen 4
> HCI Event: Link Key Request(0x17) plen 6
< HCI Command: Link Key Request Negative Reply(0x01|0x000c) plen 6
> HCI Event: Role Change(0x12) plen 8
> HCI Event: Command Complete(0x0e) plen 10
> HCI Event: PIN Code Request(0x16) plen 6
< HCI Command: PIN Code Request Reply(0x01|0x000d) plen 23
> HCI Event: Command Complete(0x0e) plen 10
> HCI Event: Connect Complete(0x03) plen 11
> HCI Event: Connect Request(0x04) plen 10
< HCI Command: Accept Connection Request(0x01|0x0009) plen 7
> HCI Event: Command Status(0x0f) plen 4
> HCI Event: Link Key Request(0x17) plen 6
< HCI Command: Link Key Request Negative Reply(0x01|0x000c) plen 6
> HCI Event: Role Change(0x12) plen 8
> HCI Event: Command Complete(0x0e) plen 10
> HCI Event: PIN Code Request(0x16) plen 6
< HCI Command: PIN Code Request Reply(0x01|0x000d) plen 23
> HCI Event: Command Complete(0x0e) plen 10
> HCI Event: Connect Complete(0x03) plen 11
< HCI Command: Create Connection(0x01|0x0005) plen 13
> HCI Event: Command Status(0x0f) plen 4
> HCI Event: Connect Complete(0x03) plen 11

Output from /var/log/messages:
May 10 18:58:19 rover bthid[3374]: Bluetooth HID service started
May 10 18:59:08 rover hcid[2098]: link_key_request (sba=00:20:E0:85:06:49, dba=00:50:F2:E5:B5:57)
May 10 18:59:08 rover hcid[2098]: pin_code_request (sba=00:20:E0:85:06:49, dba=00:50:F2:E5:B5:57)
May 10 18:59:10 rover hcid[2098]: link_key_request (sba=00:20:E0:85:06:49, dba=00:50:F2:E5:B5:57)
May 10 18:59:10 rover hcid[2098]: pin_code_request (sba=00:20:E0:85:06:49, dba=00:50:F2:E5:B5:57)
May 10 18:59:40 rover bthid[3374]: Connection failed: Host is down (112)
May 10 18:59:40 rover bthid[3374]: Connection failed: Host is down (112)


[-- Attachment #2.1.3: bluetooth-hid --]
[-- Type: application/x-shellscript, Size: 1514 bytes --]

[-- Attachment #2.1.4: hcid.conf --]
[-- Type: text/plain, Size: 1445 bytes --]

#
# HCI daemon configuration file.
#
# $Id: hcid.conf,v 1.3 2002/07/18 18:12:46 maxk 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;
	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;
}

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

	# Local device class
	#class 0x100;
	class 0x120104;

	# 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,master;
	#
	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 hold,sniff;
	#
	lp hold,sniff,park,rswitch;

	# Authentication and Encryption
	auth enable;
	encrypt enable;
}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-05-10  9:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-10  9:19 [Bluez-devel] [Fwd: Re: [Bluez-users] bluez-utils 2.7 and bthid] Robert Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox