Skip to contentSkip to conversation

Re: [Bluez-devel] [Fwd: Re: Problem connecting Bluetooth device]

Bluez-devel Harald Niederländer 4 participants 14 messages Jun 21, 2006 – Jun 28, 2006 1 message not in the archive Bluetooth drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi Marcel,

Quoted 9 lines · Marcel Holtmann

Hi Harald,

Quoted 1 line

here are 2 different outputs of "hcidump -X -V" (i apologize for the length)

is the device a security mode 3 device or did you enabled auth and encrypt in hcid.conf?

auth and encrypt are disabled, see my hcid.conf below

Quoted 1 line

So the PIN code of this device is "111111".

Yes, the PIN is 111111

What does the manual state

Quoted 1 line

about Bluetooth pairing etc.

I don't understand exactly what you mean, therefore the hcid.conf file:
(the Bluetooth-Device should be SLAVE)

# HCI daemon configuration file.
#
# $Id: hcid.conf,v 1.7 2004/12/13 14:16:03 holtmann 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;

# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;

# PIN helper
# if you want a interactiv query of your pin use /usr/bin/bluepin # /bin/bluepincat is using the pin in the /etc/bluetooth/pin file # pin_helper /usr/bin/bluepin;
pin_helper /bin/bluepincat;

# D-Bus PIN helper
# dbus_pin_helper;
}

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

# Local device class
# e.g.
# 0xsss100 = Computer
# 0xsss104 = Computer Desktop
# 0xsss108 = Computer Server
# 0xsss10c = Computer Laptop
# The 'sss' above defines the service-class (not quite, only the # first 11 bits, the next 11 define the device-class, than 2
format bits.)
# See
https://www.bluetooth.org/foundry/assignnumb/document/baseband

         # for more information.
         # 0x100bbb stands for "Object Transfer  (v-Inbox, v-Folder, ...)"
         # 0x020bbb stands for "Networking (LAN, Ad hoc, ...)"
         class 0x100100;

# Default packet type
#pkt_type DH1,DM1,HV1;

# Inquiry and Page scan
# valid parameters: enable | disable
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;
}
doro:/etc/bluetooth #

Quoted 4 lines

The link key you get from the pairing is different from the link key you actually use for authentication in the second try. Please check what has been stored in /var/lib/bluetooth/<bdaddr>/linkkeys.

The directory /var/lib/bluetooth is empty !!

It exist two directorys:
doro:/usr/var/lib/bluetooth/00:0A:3A:64:97:46 #
doro:/usr/var/lib/bluetooth/00:0B:0D:09:36:E8 #

(it exist two directorys because I use two USB-Bluetooth connectors)

linkkeys exist only in:

doro:/usr/var/lib/bluetooth/00:0A:3A:64:97:46 #

and contain
00:11:B1:A2:01:C9 6F032F60640CF647B6F07173A5A773CD 0

This entry is older (from March) and different from the key output from hcidump : 060E5E846F8206C5AECD5306622526E6

doro:/usr/var/lib/bluetooth/00:0B:0D:09:36:E8 #
contains only a file names

P.S. :
both connectors are different by the "Features":
Is it important?

hci0: Type: USB

         BD Address: 00:0A:3A:64:97:46 ACL MTU: 377:10 SCO MTU: 16:0
         UP RUNNING PSCAN ISCAN
         RX bytes:430 acl:0 sco:0 events:23 errors:0
         TX bytes:339 acl:0 sco:0 commands:22 errors:0
         Features: 0xff 0xfe 0x0d 0x38 0x08 0x08 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 doro (0)'
         Class: 0x100100
         Service Classes: Object Transfer
         Device Class: Computer, Uncategorized
         HCI Ver: 1.2 (0x2) HCI Rev: 0x0 LMP Ver: 1.2 (0x2) LMP Subver: 

0x309
Manufacturer: Broadcom Corporation (15)

hci1: Type: USB

         BD Address: 00:0B:0D:09:36:E8 ACL MTU: 120:20 SCO MTU: 64:0
         UP RUNNING PSCAN ISCAN
         RX bytes:111 acl:0 sco:0 events:14 errors:0
         TX bytes:310 acl:0 sco:0 commands:14 errors:0
         Features: 0xff 0xff 0x05 0x38 0x18 0x18 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 doro (1)'
         Class: 0x100100
         Service Classes: Object Transfer
         Device Class: Computer, Uncategorized
         HCI Ver: 1.2 (0x2) HCI Rev: 0x0 LMP Ver: 1.2 (0x2) LMP Subver: 

0x757
Manufacturer: Silicon Wave (11)

Quoted 5 lines

Regards

Marcel

Regards

Harald

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#2 lore raw

Hi Harald,

Quoted 5 lines

What does the manual state

Quoted 1 line

about Bluetooth pairing etc.

I don't understand exactly what you mean, therefore the hcid.conf file:
(the Bluetooth-Device should be SLAVE)

the manual of the device speak at least about pairing etc.

Quoted 16 lines
Quoted 3 lines

The link key you get from the pairing is different from the link key you actually use for authentication in the second try. Please check what has been stored in /var/lib/bluetooth/<bdaddr>/linkkeys.

The directory /var/lib/bluetooth is empty !!

It exist two directorys:
doro:/usr/var/lib/bluetooth/00:0A:3A:64:97:46 #
doro:/usr/var/lib/bluetooth/00:0B:0D:09:36:E8 #

(it exist two directorys because I use two USB-Bluetooth connectors)

linkkeys exist only in:

doro:/usr/var/lib/bluetooth/00:0A:3A:64:97:46 #

Quoted 8 lines

and contain
00:11:B1:A2:01:C9 6F032F60640CF647B6F07173A5A773CD 0

This entry is older (from March) and different from the key output from hcidump : 060E5E846F8206C5AECD5306622526E6

doro:/usr/var/lib/bluetooth/00:0B:0D:09:36:E8 #
contains only a file names

Remove all linkkeys files and run "hcidump -X -V" again. Connect to your device and then compare the link key in the file with the values in the dump.

Regards

Marcel

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#3 lore raw

Hi Marcel,

here the output (extract) of hcidump -X -V:

If I try to connect the device the first time after resetting:

doro:/home/harald # rfcomm connect /dev/rfcomm0 00:11:B1:A2:01:C9 Can't connect RFCOMM socket: Permission denied

doro:/var/lib/bluetooth # hcidump -X -V -i hci0
HCI sniffer - Bluetooth packet analyzer ver 1.30
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:11:B1:A2:01:C9 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: PIN Code Request (0x16) plen 6

     bdaddr 00:11:B1:A2:01:C9
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
     bdaddr 00:11:B1:A2:01:C9 len 6 pin '111111'
Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

     PIN Code Request Reply (0x01|0x000d) ncmd 1
     status 0x00 bdaddr 00:11:B1:A2:01:C9
Quoted 1 line

HCI Event: Link Key Notification (0x18) plen 23

     bdaddr 00:11:B1:A2:01:C9 key C608EE0874A86C91C615086C6CF41E63 type 0
Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

     status 0x00 handle 6 bdaddr 00:11:B1:A2:01:C9 type ACL encrypt 0x01
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 3 scid 0x0040

...........

and here the second attempt :

doro:/home/harald # rfcomm connect /dev/rfcomm0 00:11:B1:A2:01:C9 Can't create RFCOMM TTY: Address already in use

< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:11:B1:A2:01:C9 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: Link Key Request (0x17) plen 6

     bdaddr 00:11:B1:A2:01:C9
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
     bdaddr 00:11:B1:A2:01:C9 key 6EE7B663E623736747EE0371D9D25C74
Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

     Link Key Request Reply (0x01|0x000b) ncmd 1
     status 0x00 bdaddr 00:11:B1:A2:01:C9
Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

status 0x05 handle 6 bdaddr 00:11:B1:A2:01:C9 type ACL encrypt 0x00
Error: Authentication Failure
< HCI Command: Inquiry (0x01|0x0001) plen 5

     lap 0x9e8b33 len 6 num 0

.......................

and in a message the alert :
....Authentication Error!

content of linkkeys:

doro:/usr/var/lib/bluetooth/00:0A:3A:64:97:46 # more linkkeys 00:11:B1:A2:01:C9 6EE7B663E623736747EE0371D9D25C74 0

Regards
Harald

Quoted 7 lines · Marcel Holtmann

Hi Harald,

Remove all linkkeys files and run "hcidump -X -V" again. Connect to your device and then compare the link key in the file with the values in the dump.

Quoted 11 lines

Regards

Marcel

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#4 lore raw

Hi Harald,

Quoted 54 lines

here the output (extract) of hcidump -X -V:

If I try to connect the device the first time after resetting:

doro:/home/harald # rfcomm connect /dev/rfcomm0 00:11:B1:A2:01:C9 Can't connect RFCOMM socket: Permission denied

doro:/var/lib/bluetooth # hcidump -X -V -i hci0
HCI sniffer - Bluetooth packet analyzer ver 1.30
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:11:B1:A2:01:C9 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: PIN Code Request (0x16) plen 6

     bdaddr 00:11:B1:A2:01:C9
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
     bdaddr 00:11:B1:A2:01:C9 len 6 pin '111111'
Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

     PIN Code Request Reply (0x01|0x000d) ncmd 1
     status 0x00 bdaddr 00:11:B1:A2:01:C9
Quoted 1 line

HCI Event: Link Key Notification (0x18) plen 23

     bdaddr 00:11:B1:A2:01:C9 key C608EE0874A86C91C615086C6CF41E63 type 0
Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

     status 0x00 handle 6 bdaddr 00:11:B1:A2:01:C9 type ACL encrypt 0x01
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 3 scid 0x0040

...........

and here the second attempt :

doro:/home/harald # rfcomm connect /dev/rfcomm0 00:11:B1:A2:01:C9 Can't create RFCOMM TTY: Address already in use

< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:11:B1:A2:01:C9 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: Link Key Request (0x17) plen 6

     bdaddr 00:11:B1:A2:01:C9
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
     bdaddr 00:11:B1:A2:01:C9 key 6EE7B663E623736747EE0371D9D25C74
Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

     Link Key Request Reply (0x01|0x000b) ncmd 1
     status 0x00 bdaddr 00:11:B1:A2:01:C9
Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

status 0x05 handle 6 bdaddr 00:11:B1:A2:01:C9 type ACL encrypt 0x00
Error: Authentication Failure
< HCI Command: Inquiry (0x01|0x0001) plen 5

     lap 0x9e8b33 len 6 num 0

.......................

Quoted 8 lines

and in a message the alert :
....Authentication Error!

content of linkkeys:

doro:/usr/var/lib/bluetooth/00:0A:3A:64:97:46 # more linkkeys 00:11:B1:A2:01:C9 6EE7B663E623736747EE0371D9D25C74 0

it seems that the link key is stored totally wrong. Please replace it with the link key you see in the first connection attempt and then try again.

Regards

Marcel

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#5 lore raw

Hi Marcel,

Quoted 8 lines · Marcel Holtmann

Hi Harald,

it seems that the link key is stored totally wrong. Please replace it with the link key you see in the first connection attempt and then try again.

Quoted 9 lines

Regards

Marcel

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

these time it seems that the key in linkkeys is OK (without manual replacing, but why?)

and the alert message"..Authentication Error!" don't appear.

But the connection failed!

doro:/home/harald #
doro:/home/harald # rfcomm connect /dev/rfcomm0 00:11:B1:A2:01:C9 Can't create RFCOMM TTY: Address already in use doro:/home/harald #
doro:/home/harald # rfcomm connect /dev/rfcomm0 00:11:B1:A2:01:C9 Can't connect RFCOMM socket: Permission denied

The corresponding output of hcidump:

doro:/var/lib/bluetooth # hcidump -X -V -i hci0
HCI sniffer - Bluetooth packet analyzer ver 1.30
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:11:B1:A2:01:C9 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: PIN Code Request (0x16) plen 6

     bdaddr 00:11:B1:A2:01:C9
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
     bdaddr 00:11:B1:A2:01:C9 len 6 pin '111111'
Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

     PIN Code Request Reply (0x01|0x000d) ncmd 1
     status 0x00 bdaddr 00:11:B1:A2:01:C9
Quoted 1 line

HCI Event: Link Key Notification (0x18) plen 23

     bdaddr 00:11:B1:A2:01:C9 key 2FD1DC3232CA52D349A6E23BF148F25B type 0
Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

     status 0x00 handle 6 bdaddr 00:11:B1:A2:01:C9 type ACL encrypt 0x01
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 3 scid 0x0040

< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 6 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 6
Quoted 1 line

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

handle 6 slots 5

Quoted 1 line

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

handle 6 packets 1

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 16

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

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 16

     L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
       Connection successful
< ACL data: handle 6 flags 0x02 dlen 16
     L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
       MTU 1024
Quoted 1 line

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

handle 6 packets 1

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 14

     L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
       Success
Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 16

     L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
       MTU 1024
< ACL data: handle 6 flags 0x02 dlen 14
     L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
       Success
< ACL data: handle 6 flags 0x02 dlen 8
     L2CAP(d): cid 0x0040 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 6 packets 2

Quoted 1 line

ACL data: handle 6 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 6 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 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 1019 max_retrans 0 credits 7

Quoted 1 line

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

handle 6 packets 1

Quoted 2 lines

ACL data: handle 6 flags 0x02 dlen 17
ACL data: handle 6 flags 0x01 dlen 1

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 320 max_retrans 0 credits 0
< ACL data: handle 6 flags 0x02 dlen 8

     L2CAP(d): cid 0x0040 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 6 packets 1

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 8

     L2CAP(d): cid 0x0040 len 4 [psm 3]
       RFCOMM(s): UA: cr 1 dlci 2 pf 1 ilen 0 fcs 0x92
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(d): cid 0x0040 len 8 [psm 3]
       RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
       dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 0 b3 0 len 0
< ACL data: handle 6 flags 0x02 dlen 8
     L2CAP(d): cid 0x0040 len 4 [psm 3]
       RFCOMM(s): DISC: cr 1 dlci 2 pf 1 ilen 0 fcs 0xb8
Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 12

     L2CAP(d): cid 0x0040 len 8 [psm 3]
       RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
       dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 0 b2 0 b3 0 len 0
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(d): cid 0x0040 len 8 [psm 3]
       RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
       dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 0 b2 0 b3 0 len 0
Quoted 1 line

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

handle 6 packets 3

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 12

     L2CAP(d): cid 0x0040 len 8 [psm 3]
       RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
       dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 0 b3 0 len 0
< ACL data: handle 6 flags 0x02 dlen 9
     L2CAP(d): cid 0x0040 len 5 [psm 3]
       RFCOMM(d): UIH: cr 1 dlci 2 pf 1 ilen 0 fcs 0x86 credits 33
Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 9

     L2CAP(d): cid 0x0040 len 5 [psm 3]
       RFCOMM(d): UIH: cr 0 dlci 2 pf 1 ilen 0 fcs 0x5c credits 5
Quoted 1 line

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

handle 6 packets 1

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 8

     L2CAP(d): cid 0x0040 len 4 [psm 3]
       RFCOMM(s): UA: cr 1 dlci 2 pf 1 ilen 0 fcs 0x92
< ACL data: handle 6 flags 0x02 dlen 8
     L2CAP(d): cid 0x0040 len 4 [psm 3]
       RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
Quoted 1 line

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

handle 6 packets 2

Quoted 1 line

ACL data: handle 6 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
Quoted 1 line

ACL data: handle 6 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
Quoted 1 line

ACL data: handle 6 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 6 flags 0x02 dlen 12

     L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040

< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 6 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 6 reason 0x16
Reason: Connection Terminated by Local Host
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:11:B1:A2:01:C9 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: Link Key Request (0x17) plen 6

     bdaddr 00:11:B1:A2:01:C9
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
     bdaddr 00:11:B1:A2:01:C9 key 2FD1DC3232CA52D349A6E23BF148F25B
Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

     Link Key Request Reply (0x01|0x000b) ncmd 1
     status 0x00 bdaddr 00:11:B1:A2:01:C9
Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

     status 0x00 handle 6 bdaddr 00:11:B1:A2:01:C9 type ACL encrypt 0x01
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 3 scid 0x0040

< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 6 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 6
Quoted 1 line

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

handle 6 slots 5

Quoted 1 line

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

handle 6 packets 1

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 16

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

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 16

L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0040 result 4 status 0
Connection refused - no resources available

Quoted 1 line

HCI Event: Disconn Complete (0x05) plen 4

status 0x00 handle 6 reason 0x13
Reason: Remote User Terminated Connection

Regards

Harald

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#6 lore raw

Hi Harald,

According as hcidump's output, your bt device have connect the remote bt device (00:11:B1:A2:01:C9), and you have gotten l2cap link and rfcomm link. But I don't know why your bt device send rfcomm DISC after connected . This is a signal to disconnect rfcomm link.

I suggest that you can try to append channel param at command. e.g.

rfcomm conn /dev/rfcomm0 00:11:B1:A2:01:C9 1

Regards

yang

Quoted 193 lines

these time it seems that the key in linkkeys is OK (without manual replacing, but why?)

and the alert message"..Authentication Error!" don't appear.

But the connection failed!

doro:/home/harald #
doro:/home/harald # rfcomm connect /dev/rfcomm0 00:11:B1:A2:01:C9 Can't create RFCOMM TTY: Address already in use doro:/home/harald #
doro:/home/harald # rfcomm connect /dev/rfcomm0 00:11:B1:A2:01:C9 Can't connect RFCOMM socket: Permission denied

The corresponding output of hcidump:

doro:/var/lib/bluetooth # hcidump -X -V -i hci0
HCI sniffer - Bluetooth packet analyzer ver 1.30
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:11:B1:A2:01:C9 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: PIN Code Request (0x16) plen 6

     bdaddr 00:11:B1:A2:01:C9
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
     bdaddr 00:11:B1:A2:01:C9 len 6 pin '111111'
Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

     PIN Code Request Reply (0x01|0x000d) ncmd 1
     status 0x00 bdaddr 00:11:B1:A2:01:C9
Quoted 1 line

HCI Event: Link Key Notification (0x18) plen 23

     bdaddr 00:11:B1:A2:01:C9 key 2FD1DC3232CA52D349A6E23BF148F25B type 0
Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

     status 0x00 handle 6 bdaddr 00:11:B1:A2:01:C9 type ACL encrypt 0x01
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 3 scid 0x0040

< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 6 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 6
Quoted 1 line

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

handle 6 slots 5

Quoted 1 line

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

handle 6 packets 1

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 16

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

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 16

     L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
       Connection successful
< ACL data: handle 6 flags 0x02 dlen 16
     L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
       MTU 1024
Quoted 1 line

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

handle 6 packets 1

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 14

     L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
       Success
Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 16

     L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
       MTU 1024
< ACL data: handle 6 flags 0x02 dlen 14
     L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
       Success
< ACL data: handle 6 flags 0x02 dlen 8
     L2CAP(d): cid 0x0040 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 6 packets 2

Quoted 1 line

ACL data: handle 6 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 6 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 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 1019 max_retrans 0 credits 7

Quoted 1 line

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

handle 6 packets 1

Quoted 2 lines

ACL data: handle 6 flags 0x02 dlen 17
ACL data: handle 6 flags 0x01 dlen 1

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 320 max_retrans 0 credits 0
< ACL data: handle 6 flags 0x02 dlen 8

     L2CAP(d): cid 0x0040 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 6 packets 1

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 8

     L2CAP(d): cid 0x0040 len 4 [psm 3]
       RFCOMM(s): UA: cr 1 dlci 2 pf 1 ilen 0 fcs 0x92
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(d): cid 0x0040 len 8 [psm 3]
       RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
       dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 0 b3 0 len 0
< ACL data: handle 6 flags 0x02 dlen 8
     L2CAP(d): cid 0x0040 len 4 [psm 3]
       RFCOMM(s): DISC: cr 1 dlci 2 pf 1 ilen 0 fcs 0xb8
Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 12

     L2CAP(d): cid 0x0040 len 8 [psm 3]
       RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
       dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 0 b2 0 b3 0 len 0
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(d): cid 0x0040 len 8 [psm 3]
       RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
       dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 0 b2 0 b3 0 len 0
Quoted 1 line

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

handle 6 packets 3

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 12

     L2CAP(d): cid 0x0040 len 8 [psm 3]
       RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
       dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 0 b3 0 len 0
< ACL data: handle 6 flags 0x02 dlen 9
     L2CAP(d): cid 0x0040 len 5 [psm 3]
       RFCOMM(d): UIH: cr 1 dlci 2 pf 1 ilen 0 fcs 0x86 credits 33
Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 9

     L2CAP(d): cid 0x0040 len 5 [psm 3]
       RFCOMM(d): UIH: cr 0 dlci 2 pf 1 ilen 0 fcs 0x5c credits 5
Quoted 1 line

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

handle 6 packets 1

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 8

     L2CAP(d): cid 0x0040 len 4 [psm 3]
       RFCOMM(s): UA: cr 1 dlci 2 pf 1 ilen 0 fcs 0x92
< ACL data: handle 6 flags 0x02 dlen 8
     L2CAP(d): cid 0x0040 len 4 [psm 3]
       RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
Quoted 1 line

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

handle 6 packets 2

Quoted 1 line

ACL data: handle 6 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
Quoted 1 line

ACL data: handle 6 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
Quoted 1 line

ACL data: handle 6 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 6 flags 0x02 dlen 12

     L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040

< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 6 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 6 reason 0x16
Reason: Connection Terminated by Local Host
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:11:B1:A2:01:C9 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: Link Key Request (0x17) plen 6

     bdaddr 00:11:B1:A2:01:C9
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
     bdaddr 00:11:B1:A2:01:C9 key 2FD1DC3232CA52D349A6E23BF148F25B
Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

     Link Key Request Reply (0x01|0x000b) ncmd 1
     status 0x00 bdaddr 00:11:B1:A2:01:C9
Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

     status 0x00 handle 6 bdaddr 00:11:B1:A2:01:C9 type ACL encrypt 0x01
< ACL data: handle 6 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 3 scid 0x0040

< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 6 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 6
Quoted 1 line

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

handle 6 slots 5

Quoted 1 line

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

handle 6 packets 1

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 16

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

Quoted 1 line

ACL data: handle 6 flags 0x02 dlen 16

L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0040 result 4 status 0
Connection refused - no resources available

Quoted 1 line

HCI Event: Disconn Complete (0x05) plen 4

status 0x00 handle 6 reason 0x13
Reason: Remote User Terminated Connection

Regards

Quoted 8 lines

Harald

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#7 lore raw

Hi Yang,

I try the connect with different channel parameters, but it was all times the same result. What's the matter of channels? (I'm not so familiar with Bluetooth and rfcomm) What could be the cause why the bt device send the DISC signal after connecting? Exists any other way to exchange data with the remote device?

Regards

Harald

Quoted 9 lines · yang.guangxiang

Hi Harald,

According as hcidump's output, your bt device have connect the remote bt device (00:11:B1:A2:01:C9), and you have gotten l2cap link and rfcomm link. But I don't know why your bt device send rfcomm DISC after connected . This is a signal to disconnect rfcomm link.

I suggest that you can try to append channel param at command. e.g.

Quoted 8 lines

rfcomm conn /dev/rfcomm0 00:11:B1:A2:01:C9 1

Regards

yang

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#8 lore raw

Falou, Z=E9. A gente se fala mais tarde.

----- Original Message ----- =

From: "Harald Niederl=E4nder" <[email protected]>
To: "BlueZ development" <[email protected]>
Sent: Tuesday, June 27, 2006 10:33 AM
Subject: Re: [Bluez-devel] [Fwd: Re: Problem connecting Bluetooth device]

Quoted 42 lines

Hi Yang,

I try the connect with different channel parameters, but it was all times =

the same result.
What's the matter of channels? (I'm not so familiar with Bluetooth and =

rfcomm)
What could be the cause why the bt device send the DISC signal after =

connecting?
Exists any other way to exchange data with the remote device?

Regards

Harald

Quoted 9 lines · yang.guangxiang

Hi Harald,

According as hcidump's output, your bt device have connect the remote bt device (00:11:B1:A2:01:C9), and you have gotten l2cap link and rfcomm link. But I don't know why your bt device send rfcomm DISC after connected . This is a signal to disconnect rfcomm link.

I suggest that you can try to append channel param at command. e.g.

Quoted 8 lines

rfcomm conn /dev/rfcomm0 00:11:B1:A2:01:C9 1

Regards

yang

Quoted 6 lines

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job =

easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=

=3D121642

Quoted 4 lines

_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel =

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easi= er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#9 lore raw
In reply to Marcel Holtmann
Quoted 9 lines · Marcel Holtmann

Hi Harald,

it seems that the link key is stored totally wrong. Please replace it with the link key you see in the first connection attempt and then try again.

Regards

Quoted 9 lines

Marcel

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Hi Marcel,

The problem regarding the linkkey is that the stored linkkey from the first connection is OK and all further connections are successful. But if I switch off and then switch on the remote device, a new linkkey, different from the first, will be generated, but the old linkkey will not be overwritten with the new one! Therefore I can contact the remote device only one time (after entering the PIN). Why the linkkey is not overwritten?!

Regards

Harald

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#10 lore raw

Hi Harald,

Quoted 5 lines

The problem regarding the linkkey is that the stored linkkey from the first connection is OK and all further connections are successful. But if I switch off and then switch on the remote device, a new linkkey, different from the first, will be generated, but the old linkkey will not be overwritten with the new one! Therefore I can contact the remote device only one time (after entering the PIN). Why the linkkey is not overwritten?!

how can the remote device generate a new link key when it is switched off. This can't be right. Bluetooth is not working this way. And this is also not what we saw in hcidump. The local device is giving a wrong link key and thus the authentication was refused.

Regards

Marcel

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#11 lore raw

Hi Marcel,

Quoted 10 lines · Marcel Holtmann

Hi Harald,

Quoted 5 lines

The problem regarding the linkkey is that the stored linkkey from the first connection is OK and all further connections are successful. But if I switch off and then switch on the remote device, a new linkkey, different from the first, will be generated, but the old linkkey will not be overwritten with the new one! Therefore I can contact the remote device only one time (after entering the PIN). Why the linkkey is not overwritten?!

Quoted 2 lines

how can the remote device generate a new link key when it is switched off.

Naturally the device is switched on again. Then after entering the PIN, a new linkkey, different from the first, will be generated. Maybe the linkkey is only temporary and for each session a new linkkey will be genereted from a random number and the PIN.

Regards

Harald

This can't be right. Bluetooth is not working this way. And this is

Quoted 20 lines

also not what we saw in hcidump. The local device is giving a wrong link key and thus the authentication was refused.

Regards

Marcel

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Signature · 23 lines
Mit freundlichen Gruessen

Harald Niederlaender

e-Homecare
Fraunhofer Institute for Biomedical Engineering
Ensheimer Str. 48
D-66386 St.Ingbert

Phone: +49 (0)6894 / 980-422
Fax:   +49 (0)6894 / 980-400
E-mail  : [email protected]
Internet: http://www.ibmt.fraunhofer.de


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
maintainer
#12 lore raw

Hi Harald,

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

The problem regarding the linkkey is that the stored linkkey from the first connection is OK and all further connections are successful. But if I switch off and then switch on the remote device, a new linkkey, different from the first, will be generated, but the old linkkey will not be overwritten with the new one! Therefore I can contact the remote device only one time (after entering the PIN). Why the linkkey is not overwritten?!

Quoted 6 lines
Quoted 2 lines

how can the remote device generate a new link key when it is switched off.

Naturally the device is switched on again. Then after entering the PIN, a new linkkey, different from the first, will be generated. Maybe the linkkey is only temporary and for each session a new linkkey will be genereted from a random number and the PIN.

this is possible, but this doesn't explain why the stored link key on your device is different from the link key provided on the next connect. This is what we saw in the hcidump.

Regards

Marcel

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#13 lore raw

Hi Marcel,

Quoted 13 lines · Marcel Holtmann

Hi Harald,

Quoted 10 lines
Quoted 9 lines
Quoted 5 lines

The problem regarding the linkkey is that the stored linkkey from the first connection is OK and all further connections are successful. But if I switch off and then switch on the remote device, a new linkkey, different from the first, will be generated, but the old linkkey will not be overwritten with the new one! Therefore I can contact the remote device only one time (after entering the PIN). Why the linkkey is not overwritten?!

how can the remote device generate a new link key when it is switched off.

Quoted 7 lines
Quoted 3 lines

Naturally the device is switched on again. Then after entering the PIN, a new linkkey, different from the first, will be generated. Maybe the linkkey is only temporary and for each session a new linkkey will be genereted from a random number and the PIN.

this is possible, but this doesn't explain why the stored link key on your device is different from the link key provided on the next connect.

The reason is, that the stored linkkey is the result from the first connection, and because each new generated linkkey, after switch off and later switch on the device, is different from the first linkkey and the old linkkey will not be overwritten.

Regards

Harald

Quoted 8 lines

This is what we saw in the hcidump.

Regards

Marcel

Quoted 10 lines

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#14 lore raw

Hi Harald,

Quoted 6 lines
Quoted 2 lines

this is possible, but this doesn't explain why the stored link key on your device is different from the link key provided on the next connect.

The reason is, that the stored linkkey is the result from the first connection, and because each new generated linkkey, after switch off and later switch on the device, is different from the first linkkey and the old linkkey will not be overwritten.

unless you see a link key notification you can't know this. And if pairing mode is set to multi then the old link key will be overwritten.

Regards

Marcel

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel