* [Bluez-devel] How I can select between 2 bluetooth devices? @ 2007-05-16 10:35 Fernando Unzu 2007-05-17 5:05 ` Vikas Sinha 0 siblings, 1 reply; 6+ messages in thread From: Fernando Unzu @ 2007-05-16 10:35 UTC (permalink / raw) To: bluez-devel 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 to 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] How I can select between 2 bluetooth devices? 2007-05-16 10:35 [Bluez-devel] How I can select between 2 bluetooth devices? Fernando Unzu @ 2007-05-17 5:05 ` Vikas Sinha 2007-05-17 8:18 ` Fernando Unzu 0 siblings, 1 reply; 6+ messages in thread From: Vikas Sinha @ 2007-05-17 5:05 UTC (permalink / raw) To: BlueZ development [-- Attachment #1.1: Type: text/plain, Size: 1400 bytes --] 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 <fernando@bluexare.org> 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 to 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 > -- Impossible itself contain I M Possible Vikas [-- Attachment #1.2: Type: text/html, Size: 1953 bytes --] [-- Attachment #2: Type: text/plain, Size: 286 bytes --] ------------------------------------------------------------------------- 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/ [-- Attachment #3: Type: text/plain, Size: 164 bytes --] _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] How I can select between 2 bluetooth devices? 2007-05-17 5:05 ` Vikas Sinha @ 2007-05-17 8:18 ` Fernando Unzu 2007-05-17 9:34 ` Collin R. Mulliner 0 siblings, 1 reply; 6+ messages in thread From: Fernando Unzu @ 2007-05-17 8:18 UTC (permalink / raw) To: BlueZ development 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 Handl= e, = 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 thin= k. 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 oth= er > for file send... ?? > > am I right ... > > On 5/16/07, Fernando Unzu <fernando@bluexare.org> 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 to 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] How I can select between 2 bluetooth devices? 2007-05-17 8:18 ` Fernando Unzu @ 2007-05-17 9:34 ` Collin R. Mulliner 2007-05-17 10:55 ` Vikas Sinha 0 siblings, 1 reply; 6+ messages in thread From: Collin R. Mulliner @ 2007-05-17 9:34 UTC (permalink / raw) To: BlueZ development 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 Han= dle, = > 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 th= ink. > = > 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 o= ther > > for file send... ?? > > > > am I right ... > > > > On 5/16/07, Fernando Unzu <fernando@bluexare.org> wrote: > > > Hello, > > > I'm working in an application that scans for bluetooth devices and se= nd > > > 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 k= now > > > 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 to = 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 <collin@betaversion.net> 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] How I can select between 2 bluetooth devices? 2007-05-17 9:34 ` Collin R. Mulliner @ 2007-05-17 10:55 ` Vikas Sinha 2007-05-18 10:19 ` Fernando Unzu 0 siblings, 1 reply; 6+ messages in thread From: Vikas Sinha @ 2007-05-17 10:55 UTC (permalink / raw) To: BlueZ development [-- Attachment #1.1: Type: text/plain, Size: 4574 bytes --] I think Collin said is right , See for scanning u need to have hci layer api while for file transfer u need 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 = __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> 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ó: > > > 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 <fernando@bluexare.org> 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 to > 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 <collin@betaversion.net> > 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 > -- Impossible itself contain I M Possible Vikas [-- Attachment #1.2: Type: text/html, Size: 6130 bytes --] [-- Attachment #2: Type: text/plain, Size: 286 bytes --] ------------------------------------------------------------------------- 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/ [-- Attachment #3: Type: text/plain, Size: 164 bytes --] _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] How I can select between 2 bluetooth devices? 2007-05-17 10:55 ` Vikas Sinha @ 2007-05-18 10:19 ` Fernando Unzu 0 siblings, 0 replies; 6+ messages in thread From: Fernando Unzu @ 2007-05-18 10:19 UTC (permalink / raw) To: BlueZ development I think all you said to me will be very usefull. Thank you very much, Colin, Vikas. Soon I implement the new solution you propose. Thanks a lot. El Jueves, 17 de Mayo de 2007 12:55, Vikas Sinha escribi=F3: > I think Collin said is right , > See for scanning u need to have hci layer api while for file transfer u > need 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> 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 a= nd > > > > other > > > > > > for file send... ?? > > > > > > > > am I right ... > > > > > > > > On 5/16/07, Fernando Unzu <fernando@bluexare.org> 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 > > > > > to > > > > 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 <collin@betaversion.net> > > 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 ------------------------------------------------------------------------- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-18 10:19 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-05-16 10:35 [Bluez-devel] How I can select between 2 bluetooth devices? Fernando Unzu 2007-05-17 5:05 ` Vikas Sinha 2007-05-17 8:18 ` Fernando Unzu 2007-05-17 9:34 ` Collin R. Mulliner 2007-05-17 10:55 ` Vikas Sinha 2007-05-18 10:19 ` Fernando Unzu
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).