From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [Bluez-devel] L2CAP and SDP interface specification? From: Marcel Holtmann To: Stefan Mischke Cc: BlueZ Mailing List In-Reply-To: <40718881.4050709@uni-paderborn.de> References: <407174BC.8020503@uni-paderborn.de> <1081179607.2843.9.camel@pegasus> <40718881.4050709@uni-paderborn.de> Content-Type: text/plain; charset=iso-8859-1 Message-Id: <1081348775.8755.9.camel@pegasus> Mime-Version: 1.0 Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed, 07 Apr 2004 16:39:35 +0200 Hi Stefen, > in your "btk2003_slides.pdf" (very nice) you say on page 13 "C/C++ API > f=FCr Kommandos und Events". Where is it? I can send commands easily vi= a > the bluez-libs' "hci_send_cmd", but how do I get the result/event? Ok, > I could use "hci_send_req", but that function blocks until timeout. > Isn't there a simple way to use "hci_send_cmd" and register some kind > of callback for the result/event? Isn't bluetooth devices > interrupt-driven? If not, isn't there some kind of global polling and > event dispatching instance? I thought it was the hcid. you can poll on the HCI socket and of course you can also use the HCI filter to look only for specific events. > By "Glib" you mean "glib-ectomy.c" of hcid? In it's main loop it does > "rc =3D poll(ufds, nfds, -1);". Does it wait/block forever for an event > or what does "-1" mean? Btw, what's hcid for (except for initializing > the device and giving it a name)?=20 I meant Glib (www.gtk.org) and the hcid is for device initialization and it contains the security manager. And btw try "man poll" ;) Regards Marcel ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <40718881.4050709@uni-paderborn.de> Date: Mon, 05 Apr 2004 18:25:37 +0200 From: Stefan Mischke MIME-Version: 1.0 To: Marcel Holtmann CC: BlueZ Mailing List Subject: Re: [Bluez-devel] L2CAP and SDP interface specification? References: <407174BC.8020503@uni-paderborn.de> <1081179607.2843.9.camel@pegasus> In-Reply-To: <1081179607.2843.9.camel@pegasus> Content-Type: text/html; charset=us-ascii List-ID: Hi Marcel,

in your "btk2003_slides.pdf" (very nice) you say on page 13 "C/C++ API für Kommandos und Events". Where is it? I can send commands easily via the bluez-libs' "hci_send_cmd", but how do I get the result/event? Ok, I could use "hci_send_req", but that function blocks until timeout. Isn't there a simple way to use "hci_send_cmd" and register some kind of callback for the result/event? Isn't bluetooth devices interrupt-driven? If not, isn't there some kind of global polling and event dispatching instance? I thought it was the hcid.

By "Glib" you mean "glib-ectomy.c" of hcid? In it's main loop it does "rc = poll(ufds, nfds, -1);". Does it wait/block forever for an event or what does "-1" mean? Btw, what's hcid for (except for initializing the device and giving it a name)?

I'm coming from the Windows realm and therefore, I'm not so familiar with Linux programming. Sorry for the stupid questions. ;-)

Thanks,
Stefan


Marcel Holtmann schrieb:
Hi Stefan,

  
where can I find the specification of the BlueZ L2CAP and SDP API? I 
hope there ist any.
    

the L2CAP API is a socket interface and you will find the API in the
bluetooth/l2cap.h header file. For an usage example look at l2test.

The SDP API can be found in bluetooth/sdp.h and bluetooth/sdp_lib.h and
for example code look at the dund and pand applications.

  
And how can I register my application for getting HCI events, so that I 
don't have to poll? hcid? API/specs?
    

The HCI API is also a socket interface. If you want to have some kind of
event based approach you have to use and IO event main loop like it is
used in the Glib.

Regards

Marcel



  
From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [Bluez-devel] L2CAP and SDP interface specification? From: Marcel Holtmann To: Stefan Mischke Cc: BlueZ Mailing List In-Reply-To: <407174BC.8020503@uni-paderborn.de> References: <407174BC.8020503@uni-paderborn.de> Content-Type: text/plain Message-Id: <1081179607.2843.9.camel@pegasus> Mime-Version: 1.0 Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Date: Mon, 05 Apr 2004 17:40:07 +0200 Hi Stefan, > where can I find the specification of the BlueZ L2CAP and SDP API? I > hope there ist any. the L2CAP API is a socket interface and you will find the API in the bluetooth/l2cap.h header file. For an usage example look at l2test. The SDP API can be found in bluetooth/sdp.h and bluetooth/sdp_lib.h and for example code look at the dund and pand applications. > And how can I register my application for getting HCI events, so that I > don't have to poll? hcid? API/specs? The HCI API is also a socket interface. If you want to have some kind of event based approach you have to use and IO event main loop like it is used in the Glib. Regards Marcel ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <407174BC.8020503@uni-paderborn.de> From: Stefan Mischke MIME-Version: 1.0 To: bluez-devel@lists.sourceforge.net Content-Type: text/plain; charset=us-ascii; format=flowed Subject: [Bluez-devel] L2CAP and SDP interface specification? Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Date: Mon, 05 Apr 2004 17:01:16 +0200 Hello, where can I find the specification of the BlueZ L2CAP and SDP API? I hope there ist any. And how can I register my application for getting HCI events, so that I don't have to poll? hcid? API/specs? Thanks! Stefan ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel