Re: Bluetooth Multiple Central Connections


Daniel Widmann
 

Hi Luiz,

Thanks for pointing me to the bt_att_req. I used the same bt_gatt_write_params for both connections, which caused the issue. I use exactly the same GATT parameters for both connections so I though it wouldn't be an issue.

I wasn't aware that bt_gatt_write_params contains the  bt_att_req struct (Maybe params is not the best name for something containing internal state). Also I didn't expect this behavior when reading the API note: "the parameters need to remains valid while it is active".

Cheers,
Daniel

On Mon, Jun 11, 2018 at 3:17 AM Von Dentz, Luiz <luiz.von.dentz@...> wrote:
Hi Daniel,

Can you send me more details of what the code is doing, for instance,
what are the requests in ATT and how you manage the bt_att_req in use
for each connection.

On Sun, Jun 10, 2018 at 9:06 PM, Cufi, Carles <Carles.Cufi@...> wrote:
> Hi Daniel,
>
> + Luiz, Johan, Vinayak
>
>
>
> Yes, multiple peripherals is supported and what you describe sounds like a
> bug.
>
> Can you let us know what board you are using and also which Zephyr version?
>
>
>
> Also, regarding the ATT null pointer call, could you please file a GitHub
> issue?
>
> The “lockup” that you describe is a bit strange. Can you try scanning or any
> other BLE operation to see if it’s the controller or the host? Can you try
> to reproduce with tests/Bluetooth/shell to see if we can also try to find
> out on our side what the issue might be?
>
>
>
> Any assistance in helping us reproduce the issue is welcome, including a
> snippet app that you might push so we can run it ourselves.
>
>
>
> Thanks in advance!
>
>
>
> Carles
>
>
>
> From: <devel@...> on behalf of Daniel Widmann
> <widmann.daniel@...>
> Date: Sunday, 10 June 2018 at 19:31
> To: "devel@..." <devel@...>
> Subject: [Zephyr-devel] Bluetooth Multiple Central Connections
>
>
>
> Hi,
>
>
>
> I am trying to build a BLE device that connects to multiple peripherals at
> the same time. Is this currently supported? Has anybody tried this recently?
>
>
>
> I tried but it's not very stable:
>
>
>
> * When I try to do GATT request on two peripherals simultaneously, I get a
> usage fault:
>
>  0> ***** USAGE FAULT *****
>
>  0>   Executing thread ID (thread): 0x2000338c
>
>  0>   Faulting instruction address:  0x0
>
>  0>   Illegal use of the EPSR
>
>  0> Fatal fault in thread 0x2000338c! Aborting.
>
> This is caused by calling a NULL function pointer in att.c:L324.
>
>
>
> * I regularly get a timeout error when connecting to a second peripheral
> while already being connected to another peripheral. When this happened,
> something in the system locks up and I can't receive any advertisements
> anymore and existing connections stop working.
>
>
>
> Cheers,
>
> Daniel
>
>
>
>
>
>
>
>
>
>
>
>
>

Join devel@lists.zephyrproject.org to automatically receive all group messages.