public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Dave Dev <alwaysgone@seznam.cz>
Cc: BlueZ Mailing List <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] Multi-Thread Problem with BlueZ
Date: Fri, 06 Aug 2004 13:26:32 +0200	[thread overview]
Message-ID: <1091791592.20839.97.camel@pegasus> (raw)
In-Reply-To: <45805.135566-18161-1963570206-1091789060@email.seznam.cz>

Hi Dave,

> To refresh your memory:

sorry for that ;)

> We have a Server side Java application that utilizes Rococo's Bluetooth stack to connect to the underlining Bluez stack.  This server has different services that are used by clients side devices (at this time only symbian phones- Nokia, Siemens, etc.).
>  
> The problem seems to appear when server/RFCOMMservice (SERVICE registered as a service to SDPD.) is trying to send data ( size  more then  10k ) to client1 and then another client -- client2 -- tries to connect to it at the same time (while client1 is connected), all this using RFCOMM layer. (Note:  If only one phone is connected, it works perfectly)
> 
> When two phones try to connect at the same time, sometimes it completly frezes or phone-client2 is not even able to --> discover <-- the Server while the Server is sending data to client1.  For both clients, I'm handling them by using separates threads and just use the API from Rococo to send data to the connected clients...
>  
> Not really sure how to test this and find out what the problem might be.  Rococo says they dont use anything else, they just call BlueZ layer -- and the last time we asked you, you said it works without problems.  But when i am not even able to discover the Server when it's busy, then it cant be on the application layer nor Rococo. (USB hardware?  We have tried many different ones!)
>  
> We were previously trying to solve this before, but have been unlucky thus far.  By using hcidump we found that the Server doesnt act like a master as it should, but it switches between slave and master modes. And Symbian phones don't want to switch themself into slave while they're connected to the Server. So when sending data to a phone, during that time those two device switch between master and slave, fighing who will be master.
>  
> Bluez is set up as follow :
>  
> device {
>         # Local device name
>         #   %d - device id
>         #   %h - host name
>         name "Jellingspot";
> 
>         # Local device class
>         class 0x100;
> 
>         # Default packet type
>         pkt_type DM5;  *****************  We have tried all packet types, others just crash -- this is the most stable one...

Please don't do this, because the link manager must be able to choose
the best packet type and so enabling every packet type should be fine.

>         # Default link mode
>         #   none   - no specific policy 
>         #   accept - always accept incoming connections
>         #   master - become master on incoming connections,
>         #            deny role switch on outgoing connections
>         #
>         #lm accept,master;
>         #
>         lm accept;          ************** CANT do master otherwise it wont work with symbian phones..

If you don't enable rswitch below, the master setting can't work.

>         # Default link policy
>         #   none    - no specific policy
>         #   rswitch - allow role switch
>         #   hold    - allow hold mode
>         #   sniff   - allow sniff mode
>         #   park    - allow park mode
>         #
>         #lp hold,sniff;
>         #
>         lp hold,sniff,park;

Why don't you activate the rswitch option to allow the role switch?

What kind of USB Bluetooth dongles did you tried? Actually a CSR based
with at least HCI 16.4 or HCI 16.14 firmware should work fine. This is
not about the RFCOMM connections. This is about the ACL links and the
problems with scatternets. Check with "hcitool info" the features of
your mobile phones. If they don't support hold or rswitch that can be of
course troubles.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

  reply	other threads:[~2004-08-06 11:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-05 19:28 [Bluez-users] Multi-Thread Problem with BlueZ Dave Dev
2004-08-05 20:34 ` scott.meesseman
2004-08-05 20:40 ` Marcel Holtmann
2004-08-06 10:44   ` Dave Dev
2004-08-06 11:26     ` Marcel Holtmann [this message]
     [not found] <44283.131711-31853-1185610467-1091794793@email.seznam.cz>
2004-08-06 12:54 ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1091791592.20839.97.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=alwaysgone@seznam.cz \
    --cc=bluez-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox