Return-Path: Message-ID: <1ab01fb50705170355t727d3b60s818d3a643305ad8b@mail.gmail.com> Date: Thu, 17 May 2007 16:25:55 +0530 From: "Vikas Sinha" To: "BlueZ development" In-Reply-To: <1179394491.14671.37.camel@panic> MIME-Version: 1.0 References: <200705161235.51289.fernando@bluexare.org> <1ab01fb50705162205x224633a5k7f7d4541e512cc98@mail.gmail.com> <200705171018.19781.fernando@bluexare.org> <1179394491.14671.37.camel@panic> Subject: Re: [Bluez-devel] How I can select between 2 bluetooth devices? Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0980745192==" Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net --===============0980745192== Content-Type: multipart/alternative; boundary="----=_Part_42618_1072626.1179399355616" ------=_Part_42618_1072626.1179399355616 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I think Collin said is right , See for scanning u need to have hci layer api while for file transfer u nee= d OBEX. for scanning bind device before calling scan function. hci_inquiry(iDevId, iSECOND, iMAXDEV, NULL, &inqinfo, IREQ_CACHE_FLUSH)) This DevId is device Id(file descriptor). while for File sending u can call handle =3D __obex_connect(devid, addr, timeout, &err); here again devid is FD . so by this u can differentiate 2 dongles. On 5/17/07, Collin R. Mulliner wrote: > > you can do this in a very simple way, just do the connect by hand (bind > to a specific bluetooth device before connect) then pass the file > descriptor to the OBEX library. OBEX will run in normal FD (file > descriptor) mode then. For this to work you also need to do the sdp > lookup yourself, but this is easy. > > Collin > > On Thu, 2007-05-17 at 10:18 +0200, Fernando Unzu wrote: > > Hi Vikas, > > Yes, this is I want to achieve. > > > > I don't understand very well the code, but I uses OBEX_GetUserData, > > OBEX_HandleInput, OBEX_CancelRequest, OBEX_ObjectNew, OBEX_Delete, > > OBEX_TransportConnect and more like these, and in all of them I use a > Handle, > > created by OBEX_Init (OBEX_TRANS_BLUETOOTH, obex_event, 0). > > > > So I Think this is the way..., but I don't know if it is, or how to > do... > > > > in other functions I use hci_create_connection to create the handle, I > think. > > > > How you can see, I don't understand good the code. > > > > How I can separate the two dongles to doing separated functions? > > > > Thanks a lot, > > Fernando > > > > > > El Jueves, 17 de Mayo de 2007 07:05, Vikas Sinha escribi=F3: > > > Hi, Fernando > > > > > > If i am not wrong u have 2 Dongles and u want to use one for scan and > other > > > for file send... ?? > > > > > > am I right ... > > > > > > On 5/16/07, Fernando Unzu wrote: > > > > Hello, > > > > I'm working in an application that scans for bluetooth devices and > send > > > > some > > > > content to they... > > > > > > > > Due to several issues, I need to separate the action scan and send > > > > between two > > > > devices... > > > > > > > > I have the code for doing this in one bluetooth device, and I don't > know > > > > very > > > > well how it works, but I have read it some times... > > > > > > > > But I don't find where i can select which bluetooth device I want t= o > use > > > > to > > > > doing one method or other... > > > > > > > > I have seen that "OBEX_Init" creates a handle to manage the > conection..., > > > > but > > > > it can be select which bluetooth device select for doing this > handle? > > > > > > > > Thank you very much and I hope somebody understand me. > > > > > > > > Fernando > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > _______________________________________________ > > > > Bluez-devel mailing list > > > > Bluez-devel@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/bluez-devel > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Bluez-devel mailing list > > Bluez-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/bluez-devel > -- > Collin R. Mulliner > BETAVERSiON Systems [www.betaversion.net] > info/pgp: finger collin@betaversion.net > Life is hard, but unfair! > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Bluez-devel mailing list > Bluez-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-devel > --=20 Impossible itself contain I M Possible Vikas ------=_Part_42618_1072626.1179399355616 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I think Collin said is right ,
See for scanning u need to have hci layer api while for file transfer u nee= d OBEX.
for scanning bind device before calling scan function.
hci_inquiry(iDevId, iSECOND, iMAXDEV, NULL, &inqinfo, IREQ_CACHE_FLUSH)= )
This DevId is device Id(file descriptor).

while for File sending u can call
handle =3D __obex_connect(devid, addr, timeout, &err);
here again devid is FD .

so by this u can differentiate 2 dongles.

On 5/17/07, Collin R. Mulliner <= ;collin@betaversion.net> w= rote:
you can do= this in a very simple way, just do the connect by hand (bind
to a speci= fic bluetooth device before connect) then pass the file
descriptor to the OBEX library. OBEX will run in normal FD (file
des= criptor) mode then. For this to work you also need to do the sdp
lookup = yourself, but this is easy.

Collin

On Thu, 2007-05-17 at 10:1= 8 +0200, Fernando Unzu wrote:
> Hi Vikas,
> Yes, this is I want to achieve.
>
> = I don't understand very well the code, but I uses OBEX_GetUserData,
= > OBEX_HandleInput, OBEX_CancelRequest, OBEX_ObjectNew, OBEX_Delete,
> OBEX_TransportConnect and more like these, and in all of them I us= e a Handle,
> created by OBEX_Init (OBEX_TRANS_BLUETOOTH, obex_event,= 0).
>
> So I Think this is the way..., but I don't know if= it is, or how to do...
>
> in other functions I use hci_create_connection to create t= he handle, I think.
>
> How you can see, I don't understand= good the code.
>
> How I can separate the two dongles to doing= separated functions?
>
> Thanks a lot,
> Fernando
>
>
> El = Jueves, 17 de Mayo de 2007 07:05, Vikas Sinha escribi=F3:
> > Hi, = Fernando
> >
> > If i am not wrong u have 2 Dongles and u= want to use one for scan and other
> > for file send... ??
> >
> > am I right ...<= br>> >
> > On 5/16/07, Fernando Unzu <fernando@bluexare.org> wrote:
> > >= ; Hello,
> > > I'm working in an application that scans for bluetoo= th devices and send
> > > some
> > > content to the= y...
> > >
> > > Due to several issues, I need to s= eparate the action scan and send
> > > between two
> > > devices...
> > &g= t;
> > > I have the code for doing this in one bluetooth device= , and I don't know
> > > very
> > > well how it= works, but I have read it some times...
> > >
> > > But I don't find where i can selec= t which bluetooth device I want to use
> > > to
> > &g= t; doing one method or other...
> > >
> > > I have = seen that "OBEX_Init" creates a handle to manage the conection...= ,
> > > but
> > > it can be select which bluetooth d= evice select for doing this handle?
> > >
> > > Tha= nk you very much and I hope somebody understand me.
> > >
> > > Fernando
> > >
> > > ---------------= ----------------------------------------------------------
> > >= ; This SF.net email is sponsored by DB2 Express
> > > Download = DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get = it now.
> > > = http://sourceforge.net/powerbar/db2/
> > > ________________= _______________________________
> > > Bluez-devel mailing list
> > > Bluez-devel@lists.sourceforge.net
> > >
https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>= ; -------------------------------------------------------------------------=
> This SF.net email is sponsored by DB2 Express
> Download DB2= Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.> http://sourceforge.n= et/powerbar/db2/
> ______________________________________________= _
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists= .sourceforge.net/lists/listinfo/bluez-devel
--
Collin R. Mulliner <collin@betaversion.net>
BETAVERSiON Systems [www.betaversion.net]
info/pgp: finger collin@betaversion.net
Life is hard, but unfair!


--------= -----------------------------------------------------------------
This S= F.net email is sponsored by DB2 Express
Download DB2 Express C - the FRE= E version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerba= r/db2/
_______________________________________________
Bluez-deve= l mailing list
Bluez-devel@lists.= sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel



--
Impossible
itse= lf contain
I M Possible

Vikas ------=_Part_42618_1072626.1179399355616-- --===============0980745192== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --===============0980745192== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel --===============0980745192==--