Skip to contentSkip to conversation

hcid.conf : security auto - pairing

Bluez-devel Charles Majola 2 participants 7 messages Sep 19, 2005 – Sep 30, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi,

Issint the "auto" option suppose to work for outgoing connections also?

when I do ....

bash$ rfcomm connect 0 xx:xx:xx:xx:xx:xx

my cellphone askes for a pin, I type it in and then the cumputer it brings up bluepin asking for a pin. issint is suppose to the the default one in /etc/bluetooth/pin ?

---
chmj

-------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#1 lore raw

[Bluez-devel] pairing problem

Hi,

I have a strange problem. For some reason when I boot my pc, I can't make outgoing connections from my computer to my cellphone until I restart bluez services(although already started at boot time, incomming connections work fine). If I restart my computer, I have to restart bluez services again so that outgoing connections work. I can't see anything might cause this, it used to work fine with bluez-{utils,libs}< 2.20. Any ideas ?

---
chmj

-------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#2 lore raw

Re: [Bluez-devel] pairing problem

Hi Charles,

Quoted 7 lines

I have a strange problem. For some reason when I boot my pc, I can't make outgoing connections from my computer to my cellphone until I restart bluez services(although already started at boot time, incomming connections work fine). If I restart my computer, I have to restart bluez services again so that outgoing connections work. I can't see anything might cause this, it used to work fine with bluez-{utils,libs}< 2.20. Any ideas ?

install the latest bluez-utils-2.21 and try again. Run "hcidump -X -V" to see what is going on.

Regards

Marcel

-------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#3 lore raw

Re: [Bluez-devel] pairing problem

Quoted 4 lines · Marcel Holtmann

Hi Charles,

Quoted 8 lines
Quoted 3 lines

I have a strange problem. For some reason when I boot my pc, I can't make outgoing connections from my computer to my cellphone until I restart bluez services(although already started at boot time, incomming connections work fine). If I restart my computer, I have to restart bluez services again so that outgoing connections work. I can't see anything might cause this, it used to work fine with bluez-{utils,libs}< 2.20. Any ideas ?

install the latest bluez-utils-2.21 and try again. Run "hcidump -X -V" to see what is going on.

Here is the outputdevice: hci0 snap_len: 1028 filter: 0xffffffff < HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:0E:6D:45:2E:4D ptype 0xcc18 rswitch 0x01 clkoffset 0x0000 Packet type: DM1 DM3 DM5 DH1 DH3 DH5

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

Create Connection (0x01|0x0005) status 0x00 ncmd 1

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

status 0x00 handle 41 bdaddr 00:0E:6D:45:2E:4D type ACL encrypt 0x00
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 3 scid 0x0040
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 41 policy 0x0f
Link policy: RSWITCH HOLD SNIFF PARK

Quoted 1 line

HCI Event: Command Complete (0x0e) plen 6

Write Link Policy Settings (0x02|0x000d) ncmd 1 status 0x00 handle 41

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 41 packets 1

Quoted 1 line

HCI Event: Max Slots Change (0x1b) plen 3

handle 41 slots 5

Quoted 1 line

ACL data: handle 41 flags 0x02 dlen 16

L2CAP(s): Connect rsp: dcid 0x0048 scid 0x0040 result 1 status 2
Connection pending - Authorization pending

Quoted 1 line

HCI Event: QoS Setup Complete (0x0d) plen 21

status 0x00 handle 41 flags 0
Service type: 1
Token rate: 0
Peak bandwith: 0
Latency: 5000
Delay variation: -1

Quoted 1 line

ACL data: handle 41 flags 0x02 dlen 16

L2CAP(s): Connect rsp: dcid 0x0048 scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0048 flags 0x00 clen 4

     MTU 1024
Quoted 1 line

ACL data: handle 41 flags 0x02 dlen 12

L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
< ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0048 flags 0x00 result 0 clen 0
Success

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 41 packets 1

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 41 packets 1

Quoted 1 line

ACL data: handle 41 flags 0x02 dlen 18

L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4

     Success
     MTU 672
< ACL data: handle 41 flags 0x02 dlen 8
   L2CAP(d): cid 0x0048 len 4 [psm 3]
     RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 41 packets 1

Quoted 1 line

ACL data: handle 41 flags 0x02 dlen 8

L2CAP(d): cid 0x0040 len 4 [psm 3]

     RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7

< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(d): cid 0x0048 len 14 [psm 3]
RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8 dlci 2 frame_type 0 credit_flow 15 pri 7 ack_timer 0 frame_size 667 max_retrans 0 credits 7

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 41 packets 1

Quoted 1 line

ACL data: handle 41 flags 0x02 dlen 18

L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8 dlci 2 frame_type 0 credit_flow 14 pri 7 ack_timer 0 frame_size 667 max_retrans 0 credits 3
< ACL data: handle 41 flags 0x02 dlen 8
L2CAP(d): cid 0x0048 len 4 [psm 3]

     RFCOMM(s): SABM: cr 1 dlci 2 pf 1 ilen 0 fcs 0x59
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 41 packets 1

Quoted 1 line

HCI Event: PIN Code Request (0x16) plen 6

bdaddr 00:0E:6D:45:2E:4D
< HCI Command: PIN Code Request Negative Reply (0x01|0x000e) plen 6
bdaddr 00:0E:6D:45:2E:4D

Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

PIN Code Request Negative Reply (0x01|0x000e) ncmd 1 status 0x00 bdaddr 00:0E:6D:45:2E:4D

Quoted 1 line

ACL data: handle 41 flags 0x02 dlen 8

L2CAP(d): cid 0x0040 len 4 [psm 3]

     RFCOMM(s): DM: cr 1 dlci 2 pf 1 ilen 0 fcs 0x73
< ACL data: handle 41 flags 0x02 dlen 8
   L2CAP(d): cid 0x0048 len 4 [psm 3]
     RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd

< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0048 scid 0x0040

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 41 packets 1

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 41 packets 1

Quoted 1 line

ACL data: handle 41 flags 0x02 dlen 8

L2CAP(d): cid 0x0040 len 4 [psm 3]

     RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
Quoted 1 line

ACL data: handle 41 flags 0x02 dlen 12

L2CAP(s): Disconn rsp: dcid 0x0048 scid 0x0040
< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 41 reason 0x13
Reason: Remote User Terminated Connection

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

Disconnect (0x01|0x0006) status 0x00 ncmd 1

Quoted 1 line

HCI Event: Disconn Complete (0x05) plen 4

status 0x00 handle 41 reason 0x16
Reason: Connection Terminated by Local Host

Quoted 7 lines

Regards

Marcel

Quoted 11 lines

-------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#4 lore raw

Re: [Bluez-devel] pairing problem

Hi Charles,

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines

I have a strange problem. For some reason when I boot my pc, I can't make outgoing connections from my computer to my cellphone until I restart bluez services(although already started at boot time, incomming connections work fine). If I restart my computer, I have to restart bluez services again so that outgoing connections work. I can't see anything might cause this, it used to work fine with bluez-{utils,libs}< 2.20. Any ideas ?

Quoted 2 lines
Quoted 2 lines

install the latest bluez-utils-2.21 and try again. Run "hcidump -X -V" to see what is going on.

looks like your PIN helper is not working. Check the syslog for messages from hcid.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#5 lore raw

Re: [Bluez-devel] pairing problem

Quoted 9 lines · Marcel Holtmann

Hi Charles,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

I have a strange problem. For some reason when I boot my pc, I can't make outgoing connections from my computer to my cellphone until I restart bluez services(although already started at boot time, incomming connections work fine). If I restart my computer, I have to restart bluez services again so that outgoing connections work. I can't see anything might cause this, it used to work fine with bluez-{utils,libs}< 2.20. Any ideas ?

Quoted 9 lines
Quoted 4 lines
Quoted 4 lines

install the latest bluez-utils-2.21 and try again. Run "hcidump -X -V" to see what is going on.

looks like your PIN helper is not working. Check the syslog for messages from hcid.

Sep 30 10:03:09 localhost hcid[6848]: pin_code_request (sba=00:0E:A1:04:E6:C8, dba=00:0E:6D:45:2E:4D)
Sep 30 10:03:09 localhost hcid[7340]: PIN helper exited abnormally with code 256

It works fine once I restart hcid. Thats why I have no idea whats causing it.

Regards
Charles

Quoted 7 lines

Regards

Marcel

Quoted 11 lines

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#6 lore raw
In reply to Charles Majola

Hi Charles,

Quoted 9 lines

Issint the "auto" option suppose to work for outgoing connections also?

when I do ....

bash$ rfcomm connect 0 xx:xx:xx:xx:xx:xx

my cellphone askes for a pin, I type it in and then the cumputer it brings up bluepin asking for a pin. issint is suppose to the the default one in /etc/bluetooth/pin ?

the /etc/bluetooth/pin is only used for incoming connection. For outgoing connections the /var/lib/bluetooth/<bdaddr>/pincodes can be used. Look at the source code for details, because I never made this feature public.

Regards

Marcel

-------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel