From: mike <mikelee@avantwave.com>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] rfcomm socket and rfcomm tty
Date: Thu, 30 Dec 2004 09:55:23 +0800 [thread overview]
Message-ID: <41D3600B.8000702@avantwave.com> (raw)
In-Reply-To: <1104315958.6319.13.camel@notepaq>
Dear Marcel
Thanks for your clarification.
Here come to a question , i am wrting a socket rfcomm program and
try to use it connect to a bluetooth rfcomm channel by bluez-util rfcomm
listen from two different computer. My program gives out "Resource
temporarily unavailable" after connect system call . Here is the hcidump
from listening side, there is a pause from listening side when connect
system call fail.
> HCI Event: Connect Request (0x04) plen 10
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Connect Complete (0x03) plen 11
< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
> HCI Event: Max Slots Change (0x1b) plen 3
> ACL data: handle 0x0028 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 3 scid 0x0040
< ACL data: handle 0x0028 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
> HCI Event: Number of Completed Packets (0x13) plen 5
> ACL data: handle 0x0028 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 4
MTU 1024
< ACL data: handle 0x0028 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 0
< ACL data: handle 0x0028 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 4
MTU 1024
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Number of Completed Packets (0x13) plen 5
> ACL data: handle 0x0028 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 0
> ACL data: handle 0x0028 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
-------------------------------------------------------------------------------
Pause here
> ACL data: handle 0x0028 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): DISC: cr 1 dlci 6 pf 1 ilen 0 fcs 0x32
> ACL data: handle 0x0028 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 0x0028 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Disconn Complete (0x05) plen 4
Thanks for helping
best regard
Mike,Lee
Marcel Holtmann wrote:
>Hi Mike,
>
>
>
>> I have little knowledge on tty structure, so i want to clarify
>>something is that, if i want to connect to a rfcomm enabled phone. Are
>>there any difference when i sending raw data to the phone with tty
>>rfcomm and socket rfcomm? I ask this question because i see that from
>>bluez-util rfcomm source code, tty connection is built up from socket
>>first and then set the tty attr. So if i do not need tty functions, only
>>read/write from/to external device is needed, socket rfcomm will be more
>>simple. Am i right?
>>
>>
>
>this is right. The RFCOMM socket is the native interface and the TTY is
>only there for legacy reasons.
>
>Regards
>
>Marcel
>
>
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://productguide.itmanagersjournal.com/
>_______________________________________________
>Bluez-devel mailing list
>Bluez-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>
>
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2004-12-30 1:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-28 9:03 [Bluez-devel] rfcomm socket and rfcomm tty mike
2004-12-29 10:25 ` Marcel Holtmann
2004-12-30 1:55 ` mike [this message]
2005-01-01 18:42 ` Marcel Holtmann
2005-01-03 7:15 ` mike
2005-01-03 9:51 ` Marcel Holtmann
2005-01-04 7:32 ` mike
2005-01-04 11:51 ` Marcel Holtmann
2005-01-05 8:15 ` mike
2005-01-05 11:39 ` Marcel Holtmann
-- strict thread matches above, loose matches on Subject: below --
2005-01-03 18:49 omap
2005-01-03 18:54 ` Marcel Holtmann
2005-01-03 19:12 omap
2005-01-03 19:52 ` Marcel Holtmann
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=41D3600B.8000702@avantwave.com \
--to=mikelee@avantwave.com \
--cc=bluez-devel@lists.sourceforge.net \
/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