Return-Path: Message-ID: From: Robert Wlaschin To: "'Marcel Holtmann'" , Robert Wlaschin Cc: "'bluez-devel@lists.sourceforge.net'" Subject: RE: [Bluez-devel] Cannot send through serial device rfcomm Date: Wed, 5 Oct 2005 10:32:11 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5C9D2.B804BAC0" List-ID: This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C5C9D2.B804BAC0 Content-Type: text/plain; charset="iso-8859-1" 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:marcel@holtmann.org] Sent: Tuesday, October 04, 2005 9:11 PM To: Robert Wlaschin Cc: 'bluez-devel@lists.sourceforge.net' 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 ------_=_NextPart_001_01C5C9D2.B804BAC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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;
          &nb= sp;         if a port is not = provided, microcom
          &nb= sp;           &nb= sp; will try to autodetect a modem
           = example: -D/dev/ttyS3
    = -S           &nbs= p;  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:marcel@holtmann.org]
Sent: Tuesday, October 04, 2005 9:11 PM
To: Robert Wlaschin
Cc: 'bluez-devel@lists.sourceforge.net'
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

------_=_NextPart_001_01C5C9D2.B804BAC0--