From: Han <keepsimple@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: question about "Create Connection Cancel"
Date: Sun, 15 Mar 2009 00:18:09 -0700 [thread overview]
Message-ID: <37666aa80903150018m5a000bd1w23885e2ea67856a8@mail.gmail.com> (raw)
Hi,
I am a beginner to use bluez library to do bluetooth programming. I am
using Ubuntu with 2.6.27-11 kernel and bluez 4.32 installed.
When I try to connect to another computer using RFCOMM, it failed and
I got the following log from hcidump:
< HCI Command: Create Connection Cancel (0x01|0x0008) plen 6
bdaddr 00:1C:26:F6:41:02
> HCI Event: Command Status (0x0f) plen 4
Create Connection Cancel (0x01|0x0008) status 0x01 ncmd 1
Error: Unknown HCI Command
What does this message mean ?
Strange enough, if I run the same program from another computer to
connect to this one, it succeeded.
btw, the code I wrote to do the connection is as following:
<snipped>
/*
* open the Bluetooth socket
*/
s = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
if (s == -1) {
perror("socket create failed");
exit(1);
}
addr.rc_family = AF_BLUETOOTH;
addr.rc_channel = 1;
str2ba(dest, &addr.rc_bdaddr);
status = connect(s, (struct sockaddr *)&addr,
sizeof(addr));
<snipped>
The connect returned status -1, and error string is: "Operation now in
progress".
Thanks in advance.
Han
reply other threads:[~2009-03-15 7:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37666aa80903150018m5a000bd1w23885e2ea67856a8@mail.gmail.com \
--to=keepsimple@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox