* l2cap connection id in user-space @ 2010-04-13 20:56 Pavan Savoy 2010-04-13 21:19 ` Gustavo F. Padovan 2010-04-14 0:59 ` Marcel Holtmann 0 siblings, 2 replies; 6+ messages in thread From: Pavan Savoy @ 2010-04-13 20:56 UTC (permalink / raw) To: linux-bluetooth; +Cc: shitiz_kumar Is there a possibility as of now for me to extract the l2cap connection ID into my application ? I require 2 sets of information about an L2CAP connection in my bluetooth application, I require the connection ID on connection to a remote headset/sink, and also the maximum packet size for that connection (which I think is the MTU, I can get via the getsockopt). please respond. Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: l2cap connection id in user-space 2010-04-13 20:56 l2cap connection id in user-space Pavan Savoy @ 2010-04-13 21:19 ` Gustavo F. Padovan 2010-04-13 21:24 ` Pavan Savoy 2010-04-14 0:59 ` Marcel Holtmann 1 sibling, 1 reply; 6+ messages in thread From: Gustavo F. Padovan @ 2010-04-13 21:19 UTC (permalink / raw) To: Pavan Savoy; +Cc: linux-bluetooth, shitiz_kumar Hi Pavan, * Pavan Savoy <pavan_savoy@yahoo.co.in> [2010-04-14 02:26:41 +0530]: > Is there a possibility as of now for me to extract the l2cap connection ID into my application ? bluez-hcidump does that. Look to its source code to learn how. > > I require 2 sets of information about an L2CAP connection in my bluetooth application, I require the connection ID on connection to a remote headset/sink, and also the maximum packet size for that connection (which I think is the MTU, I can get via the getsockopt). > -- Gustavo F. Padovan http://padovan.org ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: l2cap connection id in user-space 2010-04-13 21:19 ` Gustavo F. Padovan @ 2010-04-13 21:24 ` Pavan Savoy 2010-04-13 21:39 ` Gustavo F. Padovan 0 siblings, 1 reply; 6+ messages in thread From: Pavan Savoy @ 2010-04-13 21:24 UTC (permalink / raw) To: Gustavo F. Padovan; +Cc: linux-bluetooth, shitiz_kumar --- On Wed, 14/4/10, Gustavo F. Padovan <gustavo@padovan.org> wrote: > From: Gustavo F. Padovan <gustavo@padovan.org> > Subject: Re: l2cap connection id in user-space > To: "Pavan Savoy" <pavan_savoy@yahoo.co.in> > Cc: linux-bluetooth@vger.kernel.org, shitiz_kumar@ti.com > Date: Wednesday, 14 April, 2010, 2:49 AM > Hi Pavan, > > * Pavan Savoy <pavan_savoy@yahoo.co.in> > [2010-04-14 02:26:41 +0530]: > > > Is there a possibility as of now for me to extract the > l2cap connection ID into my application ? > > bluez-hcidump does that. Look to its source code to learn > how. Yeah, correct, it does. However for that wouldn't I have to set filter for all ACL (or L2CAP) packets to even start receiving ACL (or L2CAP) packets ? strip off the l2cap_hdr and then get the channel ID from it. I was more or less looking to add in 1 more getsockopt option to specifically request for the l2cap_hdr ? (like the imtu/omtu which happens currently). Wouldn't this be the right way ? > > > > I require 2 sets of information about an L2CAP > connection in my bluetooth application, I require the > connection ID on connection to a remote headset/sink, and > also the maximum packet size for that connection (which I > think is the MTU, I can get via the getsockopt). > > > > -- > Gustavo F. Padovan > http://padovan.org > Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: l2cap connection id in user-space 2010-04-13 21:24 ` Pavan Savoy @ 2010-04-13 21:39 ` Gustavo F. Padovan 0 siblings, 0 replies; 6+ messages in thread From: Gustavo F. Padovan @ 2010-04-13 21:39 UTC (permalink / raw) To: Pavan Savoy; +Cc: linux-bluetooth, shitiz_kumar Hi Pavan, * Pavan Savoy <pavan_savoy@yahoo.co.in> [2010-04-14 02:54:00 +0530]: > > --- On Wed, 14/4/10, Gustavo F. Padovan <gustavo@padovan.org> wrote: > > > From: Gustavo F. Padovan <gustavo@padovan.org> > > Subject: Re: l2cap connection id in user-space > > To: "Pavan Savoy" <pavan_savoy@yahoo.co.in> > > Cc: linux-bluetooth@vger.kernel.org, shitiz_kumar@ti.com > > Date: Wednesday, 14 April, 2010, 2:49 AM > > Hi Pavan, > > > > * Pavan Savoy <pavan_savoy@yahoo.co.in> > > [2010-04-14 02:26:41 +0530]: > > > > > Is there a possibility as of now for me to extract the > > l2cap connection ID into my application ? > > > > bluez-hcidump does that. Look to its source code to learn > > how. > > Yeah, correct, it does. > However for that wouldn't I have to set filter for all ACL (or L2CAP) packets to even start receiving ACL (or L2CAP) packets ? > strip off the l2cap_hdr and then get the channel ID from it. > > I was more or less looking to add in 1 more getsockopt option to specifically request for the l2cap_hdr ? (like the imtu/omtu which happens currently). > Wouldn't this be the right way ? No, we do not want such info on getsockopt. If you do that you'll have to mantain it by yourself, which is not a good idea. The cid is L2CAP specific, upper layers should not care about it. > > > > > > > I require 2 sets of information about an L2CAP > > connection in my bluetooth application, I require the > > connection ID on connection to a remote headset/sink, and > > also the maximum packet size for that connection (which I > > think is the MTU, I can get via the getsockopt). > > > > > -- Gustavo F. Padovan http://padovan.org ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: l2cap connection id in user-space 2010-04-13 20:56 l2cap connection id in user-space Pavan Savoy 2010-04-13 21:19 ` Gustavo F. Padovan @ 2010-04-14 0:59 ` Marcel Holtmann 2010-04-14 5:51 ` Gustavo F. Padovan 1 sibling, 1 reply; 6+ messages in thread From: Marcel Holtmann @ 2010-04-14 0:59 UTC (permalink / raw) To: Pavan Savoy; +Cc: linux-bluetooth, shitiz_kumar Hi Pavan, > Is there a possibility as of now for me to extract the l2cap connection ID into my application ? > > I require 2 sets of information about an L2CAP connection in my bluetooth application, I require the connection ID on connection to a remote headset/sink, and also the maximum packet size for that connection (which I think is the MTU, I can get via the getsockopt). you need a recent kernel and then getsockname() and getpeername() will give you the SCID and DCID. Regards Marcel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: l2cap connection id in user-space 2010-04-14 0:59 ` Marcel Holtmann @ 2010-04-14 5:51 ` Gustavo F. Padovan 0 siblings, 0 replies; 6+ messages in thread From: Gustavo F. Padovan @ 2010-04-14 5:51 UTC (permalink / raw) To: Pavan Savoy; +Cc: Marcel Holtmann, linux-bluetooth, shitiz_kumar Hi Pavan, * Marcel Holtmann <marcel@holtmann.org> [2010-04-13 17:59:32 -0700]: > Hi Pavan, > > > Is there a possibility as of now for me to extract the l2cap connection ID into my application ? > > > > I require 2 sets of information about an L2CAP connection in my bluetooth application, I require the connection ID on connection to a remote headset/sink, and also the maximum packet size for that connection (which I think is the MTU, I can get via the getsockopt). > > you need a recent kernel and then getsockname() and getpeername() will > give you the SCID and DCID. Sorry for the wrong info, I didn't know about that calls inside L2CAP. ;) -- Gustavo F. Padovan http://padovan.org ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-04-14 5:51 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-04-13 20:56 l2cap connection id in user-space Pavan Savoy 2010-04-13 21:19 ` Gustavo F. Padovan 2010-04-13 21:24 ` Pavan Savoy 2010-04-13 21:39 ` Gustavo F. Padovan 2010-04-14 0:59 ` Marcel Holtmann 2010-04-14 5:51 ` Gustavo F. Padovan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).