2005-02-11 15:42:53

by Jay W. Summet

[permalink] [raw]
Subject: [Bluez-users] Re: Trouble pairing with new phone...

>you set yourself into security mode 3 by using auth and encrypt. Are you
>sure that you know what you are doing?

I'm not sure of anything, but it has worked for me in the past, and I get
the exact same results if I comment out the auth and encrypt commands in
the hcid.conf file. I've left them commented out for the rest of my
debugging.


>The PIN helper can't provide a PIN as it seems. Fix this.
>

I don't think the answer is quite this simple for the following reasons:

1) my hcid.conf file has
security auto;
which if I understand it correctly is supposed to use the
/etc/bluetooth/pin file as opposed to the pin_helper application.

1a) If I change this to "security user" the bluez-pin helper launches (but
my Palm T times out before I can enter the PIN on the laptop!) If I try to
pair the T610 phone with the laptop when "security user" is set, the
bluez-pin helper program DOES NOT LAUNCH, and hcidump -X says the
following:

HCIDump - HCI packet analyzer ver 1.12
device: hci0 snap_len: 1028 filter: 0xffffffff
> HCI Event: Connect Request (0x04) plen 10
B2 E6 1D D9 0A 00 04 02 52 01
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
B2 E6 1D D9 0A 00 00
> HCI Event: Command Status (0x0f) plen 4
00 01 09 04
> HCI Event: Connect Complete (0x03) plen 11
1A 29 00 B2 E6 1D D9 0A 00 01 00


2) My Palm T pairs correctly with the Pin in the /etc/bluetooth/pin file
when I use "security auto" (but the T610 phone does not).

3) I have pin_helper set to /usr/bin/bluez-pin (which when I run it
manually appears to work just fine...) and when I (successfully) pair my
Palm T, it does not ask me for a pin, but uses the one in the pin file (if
"security auto" is set).


I find it interesting to note that when "security user" is set, although
the bluez-pin program runs, my Palm T fails in the pairing attempt before
I have time to enter a Pin. BUT, under the same conditions, the bluez-pin
tool never launches when my T610 attempts to pair. {This seems to be a
problem with the hcid <-->bluez-pin tool connection?}

When I'm using "security auto" the PalmT pairs just fine with the pin in
the /etc/bluetooth/pin, but the T610 does not.

All of the above tests were done with auth and encrypt turned off.



>Even an application with L2CAP_LM_MASTER set can force the role switch
>at connection creation.

The only applications I'm running are hcid, sdpd and rfcomm which are
started in my bluetooth services (rc.d) file. I even commented out the
"rfcomm bind all" command from my /etc/rc.d/init.d/bluetooth file, but it
didn't change anything.

Jay






-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2005-02-11 19:09:20

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Re: Trouble pairing with new phone...

Hi Jay,

> >you set yourself into security mode 3 by using auth and encrypt. Are you
> >sure that you know what you are doing?
>
> I'm not sure of anything, but it has worked for me in the past, and I get
> the exact same results if I comment out the auth and encrypt commands in
> the hcid.conf file. I've left them commented out for the rest of my
> debugging.

The default hcid.conf is quite good and you should only change the name
or class of device.

> >The PIN helper can't provide a PIN as it seems. Fix this.
> >
>
> I don't think the answer is quite this simple for the following reasons:
>
> 1) my hcid.conf file has
> security auto;
> which if I understand it correctly is supposed to use the
> /etc/bluetooth/pin file as opposed to the pin_helper application.
>
> 1a) If I change this to "security user" the bluez-pin helper launches (but
> my Palm T times out before I can enter the PIN on the laptop!) If I try to
> pair the T610 phone with the laptop when "security user" is set, the
> bluez-pin helper program DOES NOT LAUNCH, and hcidump -X says the
> following:
>
> HCIDump - HCI packet analyzer ver 1.12
> device: hci0 snap_len: 1028 filter: 0xffffffff
> > HCI Event: Connect Request (0x04) plen 10
> B2 E6 1D D9 0A 00 04 02 52 01
> < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> B2 E6 1D D9 0A 00 00

You will only accept this connection if you become the master of the
piconet.

> > HCI Event: Command Status (0x0f) plen 4
> 00 01 09 04
> > HCI Event: Connect Complete (0x03) plen 11
> 1A 29 00 B2 E6 1D D9 0A 00 01 00

This mean unsupported remote feature which may lead to that the phone
does not support the role switch. Check with "hcitool info ..." and
report.

> >Even an application with L2CAP_LM_MASTER set can force the role switch
> >at connection creation.
>
> The only applications I'm running are hcid, sdpd and rfcomm which are
> started in my bluetooth services (rc.d) file. I even commented out the
> "rfcomm bind all" command from my /etc/rc.d/init.d/bluetooth file, but it
> didn't change anything.

And how is the sdpd started? Do you use the -m switch?

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-02-10 20:08:53

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Re: Trouble pairing with new phone...

Hi Jay,

> hciconfig -a says:
> hci0: Type: UART
> BD Address: 00:10:60:AA:FB:C9 ACL MTU: 192:8 SCO MTU: 64:8
> UP RUNNING PSCAN ISCAN AUTH ENCRYPT
> RX bytes:357 acl:0 sco:0 events:18 errors:0
> TX bytes:849 acl:0 sco:0 commands:17 errors:0
> Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
> Link policy: RSWITCH HOLD SNIFF PARK
> Link mode: SLAVE ACCEPT
> Name: 'BlueZ (0)'
> Class: 0x000100
> Service Classes: Unspecified
> Device Class: Computer, Uncategorized
> HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP
> Subver: 0x20d
> Manufacturer: Cambridge Silicon Radio (10)
>
>
> This is a standard PCMCIA Zoom bluetooth card, worked with a Sony T610
> phone before, still works with the palm T.

you set yourself into security mode 3 by using auth and encrypt. Are you
sure that you know what you are doing?

> When I do hcitool info 00:0A:D9:1D:E6:B2 I get the following error:
> Requesting information ...
> Can't create connection: Input/output error
>
> The hcidump -x output of the above is:
> HCIDump - HCI packet analyzer ver 1.12
> device: hci0 snap_len: 1028 filter: 0xffffffff
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> B2 E6 1D D9 0A 00 18 CC 02 00 00 00 01
> > HCI Event: Command Status (0x0f) plen 4
> 00 01 05 04
> > HCI Event: Link Key Request (0x17) plen 6
> B2 E6 1D D9 0A 00
> < HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
> B2 E6 1D D9 0A 00
> > HCI Event: Command Complete (0x0e) plen 10
> 01 0C 04 00 B2 E6 1D D9 0A 00
> > HCI Event: PIN Code Request (0x16) plen 6
> B2 E6 1D D9 0A 00
> < HCI Command: PIN Code Request Negative Reply (0x01|0x000e) plen 6
> B2 E6 1D D9 0A 00
> > HCI Event: Command Complete (0x0e) plen 10
> 01 0E 04 00 B2 E6 1D D9 0A 00
> > HCI Event: Connect Complete (0x03) plen 11
> 06 29 00 B2 E6 1D D9 0A 00 01 00
>
> So it looks like because the phone isn't paired with BlueZ, it won't
> give the information hictool is requesting...

The PIN helper can't provide a PIN as it seems. Fix this.

> As to the "role switch". I'm not doing anything explicitly. hcid.conf has the
> following entry which may be involved:
> # 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 rswitch,hold,sniff,park;
>
>
> (If I use lm accept,master instead of the lm accept that is in the file,
> the phone still does not pair...I have also tried using lp hold,snif
> instead of the lp rswitch,hold,sniff,park same result, phone does not
> pair.)

Even an application with L2CAP_LM_MASTER set can force the role switch
at connection creation.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-02-09 16:18:57

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Re: Trouble pairing with new phone...

Hi Jay,

> When attempting to pair blueZ with the T610 Phone:
> hcidump -x gives:
> HCIDump - HCI packet analyzer ver 1.12
> device: hci0 snap_len: 1028 filter: 0xffffffff
> > HCI Event: Connect Request (0x04) plen 10
> B2 E6 1D D9 0A 00 04 02 52 01
> < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> B2 E6 1D D9 0A 00 00
> > HCI Event: Command Status (0x0f) plen 4
> 00 01 09 04
> > HCI Event: Connect Complete (0x03) plen 11
> 1A 29 00 B2 E6 1D D9 0A 00 01 00

this is unsupported remote feature. What says "hciconfig -a" and
"hcitool info <phone-bdaddr>"? Are you forcing the role switch?

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users