From: Jui-Hao Chiang <windtracekimo@gmail.com>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] About socket interface
Date: Thu, 24 Jul 2008 18:46:00 +0000 (UTC) [thread overview]
Message-ID: <loom.20080724T182719-946@post.gmane.org> (raw)
In-Reply-To: 50b40ba70807241118y79325efene53bde2612e8c783@mail.gmail.com
Nick Pelly <npelly <at> gmail.com> writes:
>
> The HCI event that triggers this is the Connection Request Event 0x04,
probably handled in hci_event.c
Thanks for the response. But I haven't seen any code inside hci_event_packet to
notify the user socket. (Maybe I am blind..)
In scotest program, there is a debug message below accept(), so that I know when
it is returned from the accept() call.
>>From my tracing, I thought the user accept() will eventually wait inside
sco_sock_accept(), which keeps itself in the wait queue. And I guess the
function return of sco_sock_accept will eventually executing the next line of
accept() in user program (printing the message). But the accept() returns
earlier than the sco_sock_accept() as the following message.
hci_event_packet: hci0 evt 0x4 <== the SCO connection request comes !!!!
hci_conn_request_evt: hci0 Connection request: EE:E9:63:67:11:00 type 0x0
sco_connect_ind: hdev hci0, bdaddr EE:E9:63:67:11:00
hci_conn_add: hci0 dst EE:E9:63:67:11:00
hci_usb_notify: hci0 evt 1
hci_conn_add_sysfs: conn d45db800
.... (omit..)
hci_event_packet: hci0 evt 0x1b
__recv_frame: hci0 type 4 data dfa75670 count 6
__recv_frame: new packet len 6
hci_rx_task: hci0
hci_event_packet: hci0 evt 0xf
hci_cs_link_ctl: hci0 ocf 0x9
hci_cs_link_ctl: hci0 Command status: ogf LINK_CTL ocf 9 status 0
scotest[5844]: Connect from 00:11:67:63:E9:EE [handle 2, class 0x080104]
<=== user accept() Has returned !!!!
scotest[5844]: Receiving ...
.... (omit..)
bt_accept_unlink: sk f53e1800 state 1
sco_sock_accept: new socket f53e1800 <== sco_sock_accept() will return !!!!
Jui-Hao
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2008-07-24 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 18:08 [Bluez-devel] About socket interface Jui-Hao Chiang
2008-07-24 18:18 ` Nick Pelly
2008-07-24 18:46 ` Jui-Hao Chiang [this message]
2008-07-25 2:14 ` Jui-Hao Chiang
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=loom.20080724T182719-946@post.gmane.org \
--to=windtracekimo@gmail.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