* [Bluez-devel] finding the least busy hci device @ 2007-04-30 6:34 Benjamin Fong 2007-05-02 5:38 ` Vikas Sinha 0 siblings, 1 reply; 7+ messages in thread From: Benjamin Fong @ 2007-04-30 6:34 UTC (permalink / raw) To: bluez-devel [-- Attachment #1.1: Type: text/plain, Size: 436 bytes --] Hi, I'm trying to write an OBEX application which will be deployed in an environment with multiple attached Bluetooth USB dongles. Since each bluetooth dongle can support only 7 ACL active connection simultaneously, can anyone please suggest a method to efficiently perform load balancing on all the available bluetooth dongles? Is there a function which I can use to seek out the least busy/connected hci device? Thanks Regards, Ben [-- Attachment #1.2: Type: text/html, Size: 519 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] 7+ messages in thread
* Re: [Bluez-devel] finding the least busy hci device 2007-04-30 6:34 [Bluez-devel] finding the least busy hci device Benjamin Fong @ 2007-05-02 5:38 ` Vikas Sinha 2007-05-03 6:05 ` Benjamin Fong 0 siblings, 1 reply; 7+ messages in thread From: Vikas Sinha @ 2007-05-02 5:38 UTC (permalink / raw) To: BlueZ development [-- Attachment #1.1: Type: text/plain, Size: 1493 bytes --] Hi Ben, I was trying it few months ago. What I was doing was not very much effective but workable. There is status for every connection ... "ci->state". If its state is BT_CONNECTED means its connected and u can't connect it with other once. With these state u can have a watch on dongles and if any Dongle get free u can use it. u can find these function under hci.c and hci_lib.h. use them ... if get soem better way then please let me know.. On 4/30/07, Benjamin Fong <benjamin.backup@gmail.com> wrote: > > Hi, > > I'm trying to write an OBEX application which will be deployed in an > environment with multiple attached Bluetooth USB dongles. Since each > bluetooth dongle can support only 7 ACL active connection simultaneously, > can anyone please suggest a method to efficiently perform load balancing on > all the available bluetooth dongles? Is there a function which I can use to > seek out the least busy/connected hci device? Thanks > > Regards, > Ben > > ------------------------------------------------------------------------- > 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: 2294 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] 7+ messages in thread
* Re: [Bluez-devel] finding the least busy hci device 2007-05-02 5:38 ` Vikas Sinha @ 2007-05-03 6:05 ` Benjamin Fong 2007-05-03 12:19 ` Manuel Naranjo 0 siblings, 1 reply; 7+ messages in thread From: Benjamin Fong @ 2007-05-03 6:05 UTC (permalink / raw) To: BlueZ development [-- Attachment #1.1: Type: text/plain, Size: 2335 bytes --] Hi Vikas, I think your solution is far more elegant than mine. I'd tried to obtain the amount of connected device to the dongle via cl->conn_num, and try to gauge from there if the dongle is busy. Thanks mate Regards, Ben On 5/2/07, Vikas Sinha <compuvikas@gmail.com> wrote: > > Hi Ben, > I was trying it few months ago. What I was doing was not very much > effective but workable. > There is status for every connection ... "ci->state". If its state is > BT_CONNECTED means its connected and u can't connect it with other once. > With these state u can have a watch on dongles and if any Dongle get free u > can use it. > > u can find these function under hci.c and hci_lib.h. use them ... if get > soem better way then please let me know.. > > On 4/30/07, Benjamin Fong < benjamin.backup@gmail.com> wrote: > > > Hi, > > > > I'm trying to write an OBEX application which will be deployed in an > > environment with multiple attached Bluetooth USB dongles. Since each > > bluetooth dongle can support only 7 ACL active connection simultaneously, > > can anyone please suggest a method to efficiently perform load balancing on > > all the available bluetooth dongles? Is there a function which I can use to > > seek out the least busy/connected hci device? Thanks > > > > Regards, > > Ben > > > > > > ------------------------------------------------------------------------- > > 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 > ------------------------------------------------------------------------- > 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 > > [-- Attachment #1.2: Type: text/html, Size: 4036 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] 7+ messages in thread
* Re: [Bluez-devel] finding the least busy hci device 2007-05-03 6:05 ` Benjamin Fong @ 2007-05-03 12:19 ` Manuel Naranjo 2007-05-03 12:27 ` Williams, Richard 0 siblings, 1 reply; 7+ messages in thread From: Manuel Naranjo @ 2007-05-03 12:19 UTC (permalink / raw) To: BlueZ development Hi Benjamin, Please let me know how you solved this, I had patched obexftp in order to use more than one bluetooth dongle at the same time, but didn't do the load balance stuff, if you can get this done, please give me some code snippets and I send the ObexFTP crew another patch with this stuff. Thanks, Manuel > Hi Vikas, > > I think your solution is far more elegant than mine. I'd tried to > obtain the amount of connected device to the dongle via cl->conn_num, > and try to gauge from there if the dongle is busy. Thanks mate > > Regards, > Ben > > > > I was trying it few months ago. What I was doing was not very much > effective but workable. > There is status for every connection ... "ci->state". If its state > is BT_CONNECTED means its connected and u can't connect it with > other once. With these state u can have a watch on dongles and if > any Dongle get free u can use it. > > u can find these function under hci.c and hci_lib.h. use them ... > if get soem better way then please let me know.. > > Hi, > > I'm trying to write an OBEX application which will be deployed > in an environment with multiple attached Bluetooth USB > dongles. Since each bluetooth dongle can support only 7 ACL > active connection simultaneously, can anyone please suggest a > method to efficiently perform load balancing on all the > available bluetooth dongles? Is there a function which I can > use to seek out the least busy/connected hci device? Thanks > > Regards, > Ben > > > > > -- > Impossible > itself contain > I M Possible > > Hi Ben, ------------------------------------------------------------------------- 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] 7+ messages in thread
* Re: [Bluez-devel] finding the least busy hci device 2007-05-03 12:19 ` Manuel Naranjo @ 2007-05-03 12:27 ` Williams, Richard 2007-05-03 12:30 ` Manuel Naranjo 0 siblings, 1 reply; 7+ messages in thread From: Williams, Richard @ 2007-05-03 12:27 UTC (permalink / raw) To: BlueZ development I think the solution is pretty simple, and is done entirely at the application level. I wrote an app that uses multiple dongles, for HCI commands, SDP and OBEX. I have an array of hci control objects that I "alloc" and "free" just as you would any other shared resource. Whenever I need to do a BT operation, the app goes to the pool of HCI devices and requests one with "hci_alloc()". If one is free, that "hciX" is returned. If none is free, then NULL is returned. When the app is done with the operation, I do an "hci_free()". Rich -----Original Message----- From: bluez-devel-bounces@lists.sourceforge.net [mailto:bluez-devel-bounces@lists.sourceforge.net] On Behalf Of Manuel Naranjo Sent: Thursday, May 03, 2007 8:19 AM To: BlueZ development Subject: Re: [Bluez-devel] finding the least busy hci device Hi Benjamin, Please let me know how you solved this, I had patched obexftp in order to use more than one bluetooth dongle at the same time, but didn't do the load balance stuff, if you can get this done, please give me some code snippets and I send the ObexFTP crew another patch with this stuff. Thanks, Manuel > Hi Vikas, > > I think your solution is far more elegant than mine. I'd tried to > obtain the amount of connected device to the dongle via cl->conn_num, > and try to gauge from there if the dongle is busy. Thanks mate > > Regards, > Ben > > > > I was trying it few months ago. What I was doing was not very much > effective but workable. > There is status for every connection ... "ci->state". If its state > is BT_CONNECTED means its connected and u can't connect it with > other once. With these state u can have a watch on dongles and if > any Dongle get free u can use it. > > u can find these function under hci.c and hci_lib.h. use them ... > if get soem better way then please let me know.. > > Hi, > > I'm trying to write an OBEX application which will be deployed > in an environment with multiple attached Bluetooth USB > dongles. Since each bluetooth dongle can support only 7 ACL > active connection simultaneously, can anyone please suggest a > method to efficiently perform load balancing on all the > available bluetooth dongles? Is there a function which I can > use to seek out the least busy/connected hci device? Thanks > > Regards, > Ben > > > > > -- > Impossible > itself contain > I M Possible > > Hi Ben, ------------------------------------------------------------------------ - 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] 7+ messages in thread
* Re: [Bluez-devel] finding the least busy hci device 2007-05-03 12:27 ` Williams, Richard @ 2007-05-03 12:30 ` Manuel Naranjo 2007-05-04 4:58 ` Benjamin Fong 0 siblings, 1 reply; 7+ messages in thread From: Manuel Naranjo @ 2007-05-03 12:30 UTC (permalink / raw) To: BlueZ development Williams, Richard escribi=F3: > I think the solution is pretty simple, and is done entirely at the > application level. I wrote an app that uses multiple dongles, for HCI > commands, SDP and OBEX. I have an array of hci control objects that I > "alloc" and "free" just as you would any other shared resource. = > > Whenever I need to do a BT operation, the app goes to the pool of HCI > devices and requests one with "hci_alloc()". If one is free, that "hciX" > is returned. If none is free, then NULL is returned. When the app is > done with the operation, I do an "hci_free()". > = That's what I'm doing so far, I'm doing it all from a bash script, I = keep the count of hci dongles I have and then open one connection one = per hci. And I count how many hci connections each hci has. But that's not the best for sure. Thanks, Manuel ------------------------------------------------------------------------- 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] 7+ messages in thread
* Re: [Bluez-devel] finding the least busy hci device 2007-05-03 12:30 ` Manuel Naranjo @ 2007-05-04 4:58 ` Benjamin Fong 0 siblings, 0 replies; 7+ messages in thread From: Benjamin Fong @ 2007-05-04 4:58 UTC (permalink / raw) To: BlueZ development [-- Attachment #1.1: Type: text/plain, Size: 2421 bytes --] I'm afraid the logic we'd both employed is pretty identical. Instead of using bash script, I've a method within my obex application which will iteratively examine each hci device and return the first hci device which has less than X amount of connected device to it. static int is_dev_available(int dev_id) { struct hci_conn_list_req *cl; struct hci_conn_info *ci; if (!(cl = malloc(10 * sizeof(*ci) + sizeof(*cl)))) { printf("Can't allocate memory"); exit(1); } cl->dev_id = dev_id; cl->conn_num = 10; ci = cl->conn_info; if (ioctl(-1, HCIGETCONNLIST, (void *) cl)) { printf("Can't get connection list"); exit(1); } if ( cl->conn_num <= 5 ) { return 1; } return 0; } I've set the maximum allowed connection per dongle to 5 because of hardware limitation, is there any other way which I can inquire the maximum allowed connection per hci device via codes instead of using a magic number? Thanks Regards, Ben On 5/3/07, Manuel Naranjo <naranjo.manuel@gmail.com> wrote: > > Williams, Richard escribió: > > I think the solution is pretty simple, and is done entirely at the > > application level. I wrote an app that uses multiple dongles, for HCI > > commands, SDP and OBEX. I have an array of hci control objects that I > > "alloc" and "free" just as you would any other shared resource. > > > > Whenever I need to do a BT operation, the app goes to the pool of HCI > > devices and requests one with "hci_alloc()". If one is free, that "hciX" > > is returned. If none is free, then NULL is returned. When the app is > > done with the operation, I do an "hci_free()". > > > That's what I'm doing so far, I'm doing it all from a bash script, I > keep the count of hci dongles I have and then open one connection one > per hci. And I count how many hci connections each hci has. > But that's not the best for sure. > Thanks, > Manuel > > > ------------------------------------------------------------------------- > 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 > [-- Attachment #1.2: Type: text/html, Size: 3328 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] 7+ messages in thread
end of thread, other threads:[~2007-05-04 4:58 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-04-30 6:34 [Bluez-devel] finding the least busy hci device Benjamin Fong 2007-05-02 5:38 ` Vikas Sinha 2007-05-03 6:05 ` Benjamin Fong 2007-05-03 12:19 ` Manuel Naranjo 2007-05-03 12:27 ` Williams, Richard 2007-05-03 12:30 ` Manuel Naranjo 2007-05-04 4:58 ` Benjamin Fong
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.