linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BLE - multiple connections
@ 2012-07-20  6:11 Ajay KV
  2012-07-20 14:21 ` Andre Guedes
  0 siblings, 1 reply; 11+ messages in thread
From: Ajay KV @ 2012-07-20  6:11 UTC (permalink / raw)
  To: linux-bluetooth


Hi all,

Since im new to bluetooth low energy technology , i need some guidance 
from you . Following are the issues that im searching for a solution


1 : Is it possible to establish mutiple LE connection at a time . Im 
using fedora 13 , linux 2.6.39 version with 4.0 LE supported dongles

2: now im not concentrating on user profiles like GATT and ATT . i 
wanted to do it using HCI and L2cap connections


Thanks and Regards




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BLE - multiple connections
  2012-07-20  6:11 BLE - multiple connections Ajay KV
@ 2012-07-20 14:21 ` Andre Guedes
  2012-07-23  5:31   ` Ajay KV
  2012-08-17 14:36   ` Ajay KV
  0 siblings, 2 replies; 11+ messages in thread
From: Andre Guedes @ 2012-07-20 14:21 UTC (permalink / raw)
  To: Ajay KV; +Cc: linux-bluetooth

Hi Ajay,

On Fri, Jul 20, 2012 at 3:11 AM, Ajay KV <ajay.kv@globaledgesoft.com> wrote:
>
> Hi all,
>
> Since im new to bluetooth low energy technology , i need some guidance from
> you . Following are the issues that im searching for a solution
>
>
> 1 : Is it possible to establish mutiple LE connection at a time . Im using
> fedora 13 , linux 2.6.39 version with 4.0 LE supported dongles
>
> 2: now im not concentrating on user profiles like GATT and ATT . i wanted to
> do it using HCI and L2cap connections

You are able to establish one LE connection at a time. If you have
more than one device you want to connect to, you can use whitelist.
Add the devices to whitelist and issue the LE connection command. As
soon as one of the devices starts advertising, the connection will be
established.

You can use hcitool to add devices to whitelist and issue LE connection command.

BR,

Andre

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BLE - multiple connections
  2012-07-20 14:21 ` Andre Guedes
@ 2012-07-23  5:31   ` Ajay KV
  2012-07-23  6:40     ` Chen Ganir
  2012-08-17 14:36   ` Ajay KV
  1 sibling, 1 reply; 11+ messages in thread
From: Ajay KV @ 2012-07-23  5:31 UTC (permalink / raw)
  To: Andre Guedes; +Cc: linux-bluetooth

Hi,
       So that means at  a time i can not able to establish  two LE  
active connections.   One more  task i wanna   try is  to send L2cap  
data packets through L2cap signalling channel (cid 0x05) . But as per my 
knowledge kernel has designed it to work only on cid 0x05



Andre Guedes wrote:
> Hi Ajay,
>
> On Fri, Jul 20, 2012 at 3:11 AM, Ajay KV <ajay.kv@globaledgesoft.com> wrote:
>   
>> Hi all,
>>
>> Since im new to bluetooth low energy technology , i need some guidance from
>> you . Following are the issues that im searching for a solution
>>
>>
>> 1 : Is it possible to establish mutiple LE connection at a time . Im using
>> fedora 13 , linux 2.6.39 version with 4.0 LE supported dongles
>>
>> 2: now im not concentrating on user profiles like GATT and ATT . i wanted to
>> do it using HCI and L2cap connections
>>     
>
> You are able to establish one LE connection at a time. If you have
> more than one device you want to connect to, you can use whitelist.
> Add the devices to whitelist and issue the LE connection command. As
> soon as one of the devices starts advertising, the connection will be
> established.
>
> You can use hcitool to add devices to whitelist and issue LE connection command.
>
> BR,
>
> Andre
>
>   


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BLE - multiple connections
  2012-07-23  5:31   ` Ajay KV
@ 2012-07-23  6:40     ` Chen Ganir
  0 siblings, 0 replies; 11+ messages in thread
From: Chen Ganir @ 2012-07-23  6:40 UTC (permalink / raw)
  To: Ajay KV; +Cc: Andre Guedes, linux-bluetooth

On 07/23/2012 08:31 AM, Ajay KV wrote:
> Hi,
>        So that means at  a time i can not able to establish  two LE
> active connections.   One more  task i wanna   try is  to send L2cap
> data packets through L2cap signalling channel (cid 0x05) . But as per my
> knowledge kernel has designed it to work only on cid 0x05
>
>
>
> Andre Guedes wrote:
>> Hi Ajay,
>>
>> On Fri, Jul 20, 2012 at 3:11 AM, Ajay KV <ajay.kv@globaledgesoft.com>
>> wrote:
>>> Hi all,
>>>
>>> Since im new to bluetooth low energy technology , i need some
>>> guidance from
>>> you . Following are the issues that im searching for a solution
>>>
>>>
>>> 1 : Is it possible to establish mutiple LE connection at a time . Im
>>> using
>>> fedora 13 , linux 2.6.39 version with 4.0 LE supported dongles
>>>
>>> 2: now im not concentrating on user profiles like GATT and ATT . i
>>> wanted to
>>> do it using HCI and L2cap connections
>>
>> You are able to establish one LE connection at a time. If you have
>> more than one device you want to connect to, you can use whitelist.
>> Add the devices to whitelist and issue the LE connection command. As
>> soon as one of the devices starts advertising, the connection will be
>> established.
>>
>> You can use hcitool to add devices to whitelist and issue LE
>> connection command.
>>
>> BR,
>>
>> Andre
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

As Andre said - you can not create multiple connections at the same 
time, but you can have multiple active connections at the same time. The 
only limitation is during the connection creation procedure. After an LE 
connection has been established to device A, you can create a second LE 
connection to device B.

BR,
Chen Ganir
Texas Instruments.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BLE - multiple connections
  2012-08-17 14:36   ` Ajay KV
@ 2012-08-17 10:57     ` Anderson Lizardo
       [not found]       ` <502ED4E8.9040702@globaledgesoft.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Anderson Lizardo @ 2012-08-17 10:57 UTC (permalink / raw)
  To: Ajay KV; +Cc: Andre Guedes, linux-bluetooth

Hi,

On Fri, Aug 17, 2012 at 10:36 AM, Ajay KV <ajay.kv@globaledgesoft.com> wrote:
> 1:  suppose device A  and B is in connected state (B as initiator  and A  as
> advertising mode)  , so obviously role change happens and A switches to
> slave mode .  meanwhile i wanted to  connect device C  to A (C as initiator
> and A as advertising mode) , since  A has switched to slave mode , it cant
> able to advertise again ( controller returns  error message " command
> disallowed") .  Even i tried to change the role  forcefully through hcitool
> command ,  the result was same.
>          My intention is to make  the device A as a server with multiple
> clients.  Currently im not using any of the profiles(ATT , GATT) . i want
> it to be done using L2CAP sockets

You need to check if your controller supports the LE state
combinations you are trying to use. Run "hciconfig hci0 lestates" And
check the supported states. Also see Core Spec v4.0 page 1096 for more
details.

Some controllers don't support LE scanning and LE advertising at the
same time, so make sure you don't have LE scanning enabled in "A"
while trying to re-enable advertising.

> 2. Is it possible to change the imtu  of the LE connection other than
> 23bits( which is hardcoded in L2cap driver)

I think this was fixed on more recent kernel releases. See patches
from Andre Guedes around May 31st (which are already upstream).

Best Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BLE - multiple connections
  2012-07-20 14:21 ` Andre Guedes
  2012-07-23  5:31   ` Ajay KV
@ 2012-08-17 14:36   ` Ajay KV
  2012-08-17 10:57     ` Anderson Lizardo
  1 sibling, 1 reply; 11+ messages in thread
From: Ajay KV @ 2012-08-17 14:36 UTC (permalink / raw)
  To: Andre Guedes, linux-bluetooth

  Hi ,
         I am facing some more issues regarding BLE multiple connection 
, which is mentioned below . please  show me the right direction , since 
i got stucked

1:  suppose device A  and B is in connected state (B as initiator  and 
A  as advertising mode)  , so obviously role change happens and A 
switches to slave mode .  meanwhile i wanted to  connect device C  to A 
(C as initiator  and A as advertising mode) , since  A has switched to 
slave mode , it cant able to advertise again ( controller returns  error 
message " command disallowed") .  Even i tried to change the role  
forcefully through hcitool command ,  the result was same.
          My intention is to make  the device A as a server with 
multiple clients.  Currently im not using any of the profiles(ATT , 
GATT) . i want  it to be done using L2CAP sockets

2. Is it possible to change the imtu  of the LE connection other than 
23bits( which is hardcoded in L2cap driver)




On 07/20/2012 10:21 AM, Andre Guedes wrote:
> Hi Ajay,
>
> On Fri, Jul 20, 2012 at 3:11 AM, Ajay KV<ajay.kv@globaledgesoft.com>  wrote:
>    
>> Hi all,
>>
>> Since im new to bluetooth low energy technology , i need some guidance from
>> you . Following are the issues that im searching for a solution
>>
>>
>> 1 : Is it possible to establish mutiple LE connection at a time . Im using
>> fedora 13 , linux 2.6.39 version with 4.0 LE supported dongles
>>
>> 2: now im not concentrating on user profiles like GATT and ATT . i wanted to
>> do it using HCI and L2cap connections
>>      
> You are able to establish one LE connection at a time. If you have
> more than one device you want to connect to, you can use whitelist.
> Add the devices to whitelist and issue the LE connection command. As
> soon as one of the devices starts advertising, the connection will be
> established.
>
> You can use hcitool to add devices to whitelist and issue LE connection command.
>
> BR,
>
> Andre
>
>    


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BLE - multiple connections
  2012-08-22 16:07           ` Ajay KV
@ 2012-08-22 10:40             ` Anderson Lizardo
  2012-08-22 15:13             ` Vinicius Costa Gomes
  1 sibling, 0 replies; 11+ messages in thread
From: Anderson Lizardo @ 2012-08-22 10:40 UTC (permalink / raw)
  To: Ajay KV; +Cc: linux-bluetooth

Hi Ajay,

On Wed, Aug 22, 2012 at 12:07 PM, Ajay KV <ajay.kv@globaledgesoft.com> wrote:
>         i could not able to figure it out  yet , why its  showing this error
> " command disallowed" . Here im using fedora 13 with kernel 2.6.39 . i tried

This kernel is too old. For sure a lot of LE stuff will not work
correctly on it. Can you try compiling your own kernel (latest
version) and use tha latest BlueZ version with it?

> with both dongles , iogear and cirago . But the result is same.  i dont
> think that  its something wrong with kernel version, as we  uses hci
> commands (hciconfig hci0 leadv ) that directly talks with controller .
> please clear this issue..

Sorry, but I ran out of ideas. Can you describe with more details
which exact steps are you taking to get the "command disallowed" HCI
error? I.e. right after you attach the dongle, which commands are you
issuing.

Also an hcidump showing the entire session (since the dongle is
attached) should help. Without more information we are not unable to
help further.

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BLE - multiple connections
  2012-08-22 16:07           ` Ajay KV
  2012-08-22 10:40             ` Anderson Lizardo
@ 2012-08-22 15:13             ` Vinicius Costa Gomes
  2012-08-23 15:59               ` Ajay KV
  1 sibling, 1 reply; 11+ messages in thread
From: Vinicius Costa Gomes @ 2012-08-22 15:13 UTC (permalink / raw)
  To: Ajay KV; +Cc: Anderson Lizardo, linux-bluetooth

Hi,

On 12:07 Wed 22 Aug, Ajay KV wrote:
> On 08/17/2012 12:27 PM, Anderson Lizardo wrote:
> >Hi Ajay
> >
> >[your emails to BlueZ mailing list may be getting blocked because you
> >are using HTML. Please fix that on your mail client. Also remember to
> >not top-post]
> >
> >On Fri, Aug 17, 2012 at 7:34 PM, Ajay KV<ajay.kv@globaledgesoft.com>  wrote:
> >>Thanks for your reply.  i have 2 dongles of different made  (iogear and
> >>chirago)  . "Hciconfig hci0 lestates" gives  this following result
> >>
> >>    Supported link layer states:
> >>[...]
> >>
> >>             Here my issue is to  know whether (connected mode + advertising
> >>mode)  is possible at a time . Once A is connected to B (initiator),  i
> >>could not able to enable advertise in  A  (getting command disallowed ) , so
> >>that  device C is not getting the connectable advertising packets on
> >>scanning.
> >I could not see any reason to get "command disallowed" when enabling
> >LE adv. Did you try changing dongle combinations to make sure it is
> >not some hardware issue?
> >
> >Regards,
> 
> Hi,
>         i could not able to figure it out  yet , why its  showing
> this error " command disallowed" . Here im using fedora 13 with
> kernel 2.6.39 . i tried with both dongles , iogear and cirago . But
> the result is same.  i dont think that  its something wrong with
> kernel version, as we  uses hci commands (hciconfig hci0 leadv )
> that directly talks with controller . please clear this issue..

Most probably the controller is in the page scan or inquiry scan state.
Try doing 'hciconfig hci0 noscan', before enabling advertising.

> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cheers,
-- 
Vinicius

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BLE - multiple connections
       [not found]         ` <CAJdJm_OBh4OzKJejongsaWm1mSx2GN5Yki3B4nYc6C2DbVS=nw@mail.gmail.com>
@ 2012-08-22 16:07           ` Ajay KV
  2012-08-22 10:40             ` Anderson Lizardo
  2012-08-22 15:13             ` Vinicius Costa Gomes
  0 siblings, 2 replies; 11+ messages in thread
From: Ajay KV @ 2012-08-22 16:07 UTC (permalink / raw)
  To: Anderson Lizardo, linux-bluetooth

On 08/17/2012 12:27 PM, Anderson Lizardo wrote:
> Hi Ajay
>
> [your emails to BlueZ mailing list may be getting blocked because you
> are using HTML. Please fix that on your mail client. Also remember to
> not top-post]
>
> On Fri, Aug 17, 2012 at 7:34 PM, Ajay KV<ajay.kv@globaledgesoft.com>  wrote:
>    
>> Thanks for your reply.  i have 2 dongles of different made  (iogear and
>> chirago)  . "Hciconfig hci0 lestates" gives  this following result
>>
>>     Supported link layer states:
>> [...]
>>
>>              Here my issue is to  know whether (connected mode + advertising
>> mode)  is possible at a time . Once A is connected to B (initiator),  i
>> could not able to enable advertise in  A  (getting command disallowed ) , so
>> that  device C is not getting the connectable advertising packets on
>> scanning.
>>      
> I could not see any reason to get "command disallowed" when enabling
> LE adv. Did you try changing dongle combinations to make sure it is
> not some hardware issue?
>
> Regards,
>    

Hi,
         i could not able to figure it out  yet , why its  showing this 
error " command disallowed" . Here im using fedora 13 with kernel 2.6.39 
. i tried with both dongles , iogear and cirago . But the result is 
same.  i dont think that  its something wrong with kernel version, as 
we  uses hci commands (hciconfig hci0 leadv ) that directly talks with 
controller . please clear this issue..



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BLE - multiple connections
  2012-08-22 15:13             ` Vinicius Costa Gomes
@ 2012-08-23 15:59               ` Ajay KV
  2012-08-23 19:09                 ` Anderson Lizardo
  0 siblings, 1 reply; 11+ messages in thread
From: Ajay KV @ 2012-08-23 15:59 UTC (permalink / raw)
  To: Vinicius Costa Gomes; +Cc: Anderson Lizardo, linux-bluetooth

On 08/22/2012 11:13 AM, Vinicius Costa Gomes wrote:
> Hi,
>
> On 12:07 Wed 22 Aug, Ajay KV wrote:
>> On 08/17/2012 12:27 PM, Anderson Lizardo wrote:
>>> Hi Ajay
>>>
>>> [your emails to BlueZ mailing list may be getting blocked because you
>>> are using HTML. Please fix that on your mail client. Also remember to
>>> not top-post]
>>>
>>> On Fri, Aug 17, 2012 at 7:34 PM, Ajay KV<ajay.kv@globaledgesoft.com>   wrote:
>>>> Thanks for your reply.  i have 2 dongles of different made  (iogear and
>>>> chirago)  . "Hciconfig hci0 lestates" gives  this following result
>>>>
>>>>     Supported link layer states:
>>>> [...]
>>>>
>>>>              Here my issue is to  know whether (connected mode + advertising
>>>> mode)  is possible at a time . Once A is connected to B (initiator),  i
>>>> could not able to enable advertise in  A  (getting command disallowed ) , so
>>>> that  device C is not getting the connectable advertising packets on
>>>> scanning.
>>> I could not see any reason to get "command disallowed" when enabling
>>> LE adv. Did you try changing dongle combinations to make sure it is
>>> not some hardware issue?
>>>
>>> Regards,
>>
>> Hi,
>>          i could not able to figure it out  yet , why its  showing
>> this error " command disallowed" . Here im using fedora 13 with
>> kernel 2.6.39 . i tried with both dongles , iogear and cirago . But
>> the result is same.  i dont think that  its something wrong with
>> kernel version, as we  uses hci commands (hciconfig hci0 leadv )
>> that directly talks with controller . please clear this issue..
>
> Most probably the controller is in the page scan or inquiry scan state.
> Try doing 'hciconfig hci0 noscan', before enabling advertising.
>

> Cheers,


Hi,
	Still not working  , getting the same old error. i just want to know , 
whether my dual-mode dongle allows this operation or not (Advertising 
mode+ connected mode)		

Regards,

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BLE - multiple connections
  2012-08-23 15:59               ` Ajay KV
@ 2012-08-23 19:09                 ` Anderson Lizardo
  0 siblings, 0 replies; 11+ messages in thread
From: Anderson Lizardo @ 2012-08-23 19:09 UTC (permalink / raw)
  To: Ajay KV; +Cc: Vinicius Costa Gomes, linux-bluetooth

Hi Ajay,

On Thu, Aug 23, 2012 at 11:59 AM, Ajay KV <ajay.kv@globaledgesoft.com> wrote:
>         Still not working  , getting the same old error. i just want to know
> , whether my dual-mode dongle allows this operation or not (Advertising
> mode+ connected mode)

Did you try my suggestion?

1) Enable LE adv on A
2) Connect from B to A
3) Try to enable LE adv on A (should give the error you are getting)
4) disconnect connection from A side (using hcitool ledc)
5) try to enable LE adv on A

if step (5) works, we have confirmation that a dual mode dongle in
slave mode is not accepting more than one active connection.

Anyway, I finally found the section from Core Spec v4.0, where it
clearly says that a LE device operating in slave mode does not accept
more than one connection (but a master device can create multiple
connections). See Vol. 6, Part B, Section 1.1.1 "State and Role
Combination Restrictions" (page 2195), specially second bullet. I copy
the relevant text here:

"""
The Link Layer may optionally support multiple state machines. If it
does support multiple state machines, the following state and role
restrictions shall apply.
* The Link Layer in the Connection State shall not operate in the
Master Role and Slave Role at the same time.
* The Link Layer in the Connection State operating in the Slave Role
shall have only one connection.
[...]
"""

That means you can't send connectable advertising from a slave LE
device if one connection is active.

Best regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-08-23 19:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-20  6:11 BLE - multiple connections Ajay KV
2012-07-20 14:21 ` Andre Guedes
2012-07-23  5:31   ` Ajay KV
2012-07-23  6:40     ` Chen Ganir
2012-08-17 14:36   ` Ajay KV
2012-08-17 10:57     ` Anderson Lizardo
     [not found]       ` <502ED4E8.9040702@globaledgesoft.com>
     [not found]         ` <CAJdJm_OBh4OzKJejongsaWm1mSx2GN5Yki3B4nYc6C2DbVS=nw@mail.gmail.com>
2012-08-22 16:07           ` Ajay KV
2012-08-22 10:40             ` Anderson Lizardo
2012-08-22 15:13             ` Vinicius Costa Gomes
2012-08-23 15:59               ` Ajay KV
2012-08-23 19:09                 ` Anderson Lizardo

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).