2005-10-05 17:32:11

by Robert Wlaschin

[permalink] [raw]
Subject: RE: [Bluez-devel] Cannot send through serial device rfcomm

Marcel,

Thanks so much for the help thus far. Yes the rfcomm0 device is created:
This is the output from rfcomm; rfcomm0: 00:A0:96:0D:3B:80 channel 1 closed,
I have also seen it report [tty-attached] when I am attempting to
read/write/connect, but it says 'config' not 'open'

So, I saw this error message:

> HCI Event: Connect Complete (0x03) plen 11
status 0x05 handle 41 bdaddr 00:A0:96:0D:3B:80 type ACL encrypt 0x00
Error: Authentication Failure

So I did this: hciconfig hci0 auth, but I still got the same error, so I
followed with this: hciconfig hci0 encrypt, but I still seem to be getting
the error message.

Thanks,
Robert

--- hcidump -V -X ---

HCI sniffer - Bluetooth packet analyzer ver 1.25
device: hci0 snap_len: 1028 filter: 0xffffffff
> HCI Event: Connect Request (0x04) plen 10
bdaddr 00:A0:96:0D:3B:80 class 0x000000 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 00:A0:96:0D:3B:80 role 0x01
Role: Slave
> HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr 00:A0:96:0D:3B:80
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
bdaddr 00:A0:96:0D:3B:80 key 5375351370402E9AE37B284D7DD72EDC
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Reply (0x01|0x000b) ncmd 1
status 0x00 bdaddr 00:A0:96:0D:3B:80
> HCI Event: Connect Complete (0x03) plen 11
status 0x05 handle 41 bdaddr 00:A0:96:0D:3B:80 type ACL encrypt 0x00
Error: Authentication Failure
> HCI Event: Connect Request (0x04) plen 10
bdaddr 00:A0:96:0D:3B:80 class 0x000000 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 00:A0:96:0D:3B:80 role 0x01
Role: Slave
> HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr 00:A0:96:0D:3B:80
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
bdaddr 00:A0:96:0D:3B:80 key 5375351370402E9AE37B284D7DD72EDC
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Reply (0x01|0x000b) ncmd 1
status 0x00 bdaddr 00:A0:96:0D:3B:80
> HCI Event: Connect Complete (0x03) plen 11
status 0x05 handle 42 bdaddr 00:A0:96:0D:3B:80 type ACL encrypt 0x00
Error: Authentication Failure
Usage: microcom [options]
[options] include:
-Ddevfile use the specified serial port device;
if a port is not provided, microcom
will try to autodetect a modem
example: -D/dev/ttyS3
-S run script from script.scr (default)
-Sscrfile run script from scrfile

microcom provides session logging in microcom.log file
Exitcode 2 - cannot open device /dev/rfcomm0

-----Original Message-----
From: Marcel Holtmann [mailto:[email protected]]
Sent: Tuesday, October 04, 2005 9:11 PM
To: Robert Wlaschin
Cc: '[email protected]'
Subject: RE: [Bluez-devel] Cannot send through serial device rfcomm


Hi Robert,

> That was a good suggestion. I've seen usage of those programs on
> various help/websites.
>
> Due to a hardware limitations, I only have microcom available which
> seems flaky at best. I seem to be getting the 'Exitcode 2 - cannot
> open device /dev/rfcomm0' error message. But I have tried opening a
> standard serial connection with microcom and it does function.
>
> The code in attest should work given the method I am using, is this
> correct? If so I can just rewrite it to something ... a little more
> towards my purpose.

check if the /dev/rfcomm0 device node has been created and if yes, then
run "hcidump -X -V" to see why the RFCOMM channel can't be opened.

Regards

Marcel


2005-10-05 17:54:18

by Marcel Holtmann

[permalink] [raw]
Subject: RE: [Bluez-devel] Cannot send through serial device rfcomm

Hi Robert,

> much for the help thus far. Yes the rfcomm0 device is created:
> This is the output from rfcomm; rfcomm0: 00:A0:96:0D:3B:80 channel 1
> closed, I have also seen it report [tty-attached] when I am attempting
> to read/write/connect, but it says 'config' not 'open'
>
> So, I saw this error message:
>
> > HCI Event: Connect Complete (0x03) plen 11
> status 0x05 handle 41 bdaddr 00:A0:96:0D:3B:80 type ACL encrypt
> 0x00
> Error: Authentication Failure

this means that you provide the wrong link key. Delete all your link
keys or set the device into pairing mode.

> So I did this: hciconfig hci0 auth, but I still got the same error, so
> I followed with this: hciconfig hci0 encrypt, but I still seem to be
> getting the error message.

This is a misconception. What activated security mode 3 and this is not
helpful at all.

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