* [Bluez-users] Concurrent access
@ 2006-02-03 9:08 Thomas Lochmatter
2006-02-07 11:09 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Lochmatter @ 2006-02-03 9:08 UTC (permalink / raw)
To: bluez-users
Hi
We have several devices (robots) that we want to access at the same
time from several processes via bluetooth (rfcomm virtual serial
port). Each process first opens a connection to one robot (/dev/
rfcommNN), then communicates with the robot for a while and finally
disconnects.
When I launch several processes (about 3-5) at the same time, usually
only one of them succeeds to connect. If I constantly try to open the
devices (in a loop, wait a second and call "open" again), a couple of
them are connected after a while, but not all. Is there a way to make
that work? Does anyone else have experience with concurrent access to
the bluetooth libs?
Thomas
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bluez-users] Concurrent access
2006-02-03 9:08 [Bluez-users] Concurrent access Thomas Lochmatter
@ 2006-02-07 11:09 ` Marcel Holtmann
2006-02-07 12:15 ` Thomas Lochmatter
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2006-02-07 11:09 UTC (permalink / raw)
To: bluez-users
Hi Thomas,
> We have several devices (robots) that we want to access at the same
> time from several processes via bluetooth (rfcomm virtual serial
> port). Each process first opens a connection to one robot (/dev/
> rfcommNN), then communicates with the robot for a while and finally
> disconnects.
>
> When I launch several processes (about 3-5) at the same time, usually
> only one of them succeeds to connect. If I constantly try to open the
> devices (in a loop, wait a second and call "open" again), a couple of
> them are connected after a while, but not all. Is there a way to make
> that work? Does anyone else have experience with concurrent access to
> the bluetooth libs?
the baseband of a Bluetooth chip is only capable of paging one device at
a time. We already had this discussion. You should better look at the
mailing list archive.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bluez-users] Concurrent access
2006-02-07 11:09 ` Marcel Holtmann
@ 2006-02-07 12:15 ` Thomas Lochmatter
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Lochmatter @ 2006-02-07 12:15 UTC (permalink / raw)
To: bluez-users
>> We have several devices (robots) that we want to access at the same
>> time from several processes via bluetooth (rfcomm virtual serial
>> port). Each process first opens a connection to one robot (/dev/
>> rfcommNN), then communicates with the robot for a while and finally
>> disconnects.
>>
>> When I launch several processes (about 3-5) at the same time, usually
>> only one of them succeeds to connect. If I constantly try to open the
>> devices (in a loop, wait a second and call "open" again), a couple of
>> them are connected after a while, but not all. Is there a way to make
>> that work? Does anyone else have experience with concurrent access to
>> the bluetooth libs?
>
> the baseband of a Bluetooth chip is only capable of paging one
> device at
> a time. We already had this discussion. You should better look at the
> mailing list archive.
I found a thread regarding concurrent access where the solution was
to switch to kernel 2.6. However, I am already working on kernel 2.6
(RH).
I don't think it is a chip limitation issue. In between, I modified
my program to maintain several connections in the same process/thread
and that works perfectly. To be more specific, the following works
Process 1:
open /dev/rfcomm23
open /dev/rfcomm45
send something to rfcomm23
read from rfcomm23
send something to rfcomm45
read from rfcomm45
close rfcomm23
close rfcomm45
In the multiprocess version, the following two processes run at the
same time:
Process 1:
open /dev/rfcomm23 until success
send something to rfcomm23
read from rfcomm23
close rfcomm23
Process 2:
open /dev/rfcomm45 until success
send something to rfcomm45
read from rfcomm45
close rfcomm45
While process 1 is trying to open a connection to rfcomm23, the other
process obviously has to wait until the connection is established
(that might be a chip limitation). However, as soon as the connection
is established, the other process should be able to open rfcomm45
before process 1 closes rfcomm23 ...? Because with all being done in
the same process, it works as well ...
Thanks in advance for your help. If you already discussed this, I'm
happy to get a pointer to the corresponding thread.
Thomas
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-02-07 12:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-03 9:08 [Bluez-users] Concurrent access Thomas Lochmatter
2006-02-07 11:09 ` Marcel Holtmann
2006-02-07 12:15 ` Thomas Lochmatter
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).