Date   

What information shall be persistent to restore BLE bond after power cycling?

Li, Jun R
 

Hi,

 

I’m building a BLE application based on a NRF51 board with pass key support. The device can be connected and bonded with a mobile phone after the pass key was correctly entered, and can be reconnected after disconnection. However, the connection can’t be established any more after the device rebooted unless I click “Forget the device” in my phone’s Bluetooth settings. I guess that some parameters related to bonding shall be stored into “settings”, but wasn’t able to figure out what kind of parameters shall be saved and restored. Can anyone give any clue to this? Thank you!

 

Also, I’ve called “settings_load()” in the function “bt_ready()” but it seems not helpful.

 

Regards,

Jun Li

 


Re: Bluetooth Multiple Central Connections

Daniel Widmann
 

Hi,

I think I figured out whats going on:
Zephyr will lock up if I try to enable scanning in the 'Failed to connect' callback.
In the failed to connect case, the callback is called from the hci tx thread while a command is processed (I assume BT_HCI_OP_LE_CREATE_CONN_CANCEL). This behavior was recently introduced here. In  bt_le_scan_start, Zephyr will wait forever when it tries to allocate a new buffer from hci_cmd_pool.

Should it be possible to enable scanning 'Failed to connect' callback? Currently the Bluetooth central sample will simply stop if it failed to connect. 


Stack trace for the connected callback:
callback on hci thread.PNG
​ 

Cheers,
Daniel

On Mon, Jun 11, 2018 at 9:24 AM Daniel Widmann <widmann.daniel@...> wrote:
Hi Carles,

It doesn't solve the second issue. I am doing more investigation on that issue right now.

Cheers,
Daniel

On Mon, Jun 11, 2018 at 9:22 AM Cufi, Carles <Carles.Cufi@...> wrote:

Hi Daniel,

 

Can you confirm that this fixes both issues you described in your original email_

 

Thanks,

 

Carles

 

From: Daniel Widmann <widmann.daniel@...>
Sent: 11 June 2018 17:55
To: luiz.von.dentz@...
Cc: Cufi, Carles <carles.cufi@...>; devel@...
Subject: Re: [Zephyr-devel] Bluetooth Multiple Central Connections

 

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


Using a predefined passkey on a BLE peripheral device with no input/output

Li, Jun R
 

Hi everyone,

 

I have a NRF51 BLE device which doesn’t have either a display or a keyboard, and would like to use a static passkey to secure the connection establishment. Is it possible to use a static pre-defined passkey in Zephyr’s BLE  stack and how is the static passkey defined? Thank you!

 

Regards,

Jun Li

 


Zephyr 1.12.0 released

Maureen Helm
 

Hi all,

 

We are pleased to announce the release of Zephyr kernel version 1.12.0.

 

Major enhancements with this release include:

 

- Asymmetric multiprocessing (AMP) via integration of OpenAMP

- Persistent storage support for Bluetooth Low Energy including Mesh

- 802.1Q - Virtual Local Area Network (VLAN) traffic on an Ethernet network

- Support multiple concurrent filesystem devices, partitions, and FS types

- Ethernet network management interface

- Networking traffic prioritization on a per-connection basis

- Support for Ethernet statistical counters

- Support for TAP net device on the the native POSIX port

- Command-line Zephyr meta-tool "west"

- SPI slave support

- Runtime non-volatile configuration data storage system (settings)

 

Detailed changes since 1.11.0 can be found here:

https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v1.12.0

 

Many thanks to everyone that contributed to this release! Almost 2000 patches (1978 to be exact) from 111 authors were merged, and 523 GitHub issues were closed in the three months since our last release.

 

The master branch is now open again for development.

 

Regards,

Maureen


Re: Bluetooth Multiple Central Connections

Von Dentz, Luiz <luiz.von.dentz@...>
 

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@nordicsemi.no> 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@lists.zephyrproject.org> on behalf of Daniel Widmann
<widmann.daniel@gmail.com>
Date: Sunday, 10 June 2018 at 19:31
To: "devel@lists.zephyrproject.org" <devel@lists.zephyrproject.org>
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














Re: Mbedtls_pk_verify error

christian tavares
 

Thanks for you answer me. I followed your tips and corrected that problems and I resolved to simplify the code removing the server side and letting just application working. But the problem doesn't resolve yet If you could see again o code modified I'll be grateful to help me. Thanks again.
https://github.com/chtavares592/verify_signature/blob/master/verify_signature/src/main.c


Re: Bluetooth Multiple Central Connections

Daniel Widmann
 

Hi Carles,

It doesn't solve the second issue. I am doing more investigation on that issue right now.

Cheers,
Daniel

On Mon, Jun 11, 2018 at 9:22 AM Cufi, Carles <Carles.Cufi@...> wrote:

Hi Daniel,

 

Can you confirm that this fixes both issues you described in your original email_

 

Thanks,

 

Carles

 

From: Daniel Widmann <widmann.daniel@...>
Sent: 11 June 2018 17:55
To: luiz.von.dentz@...
Cc: Cufi, Carles <carles.cufi@...>; devel@...
Subject: Re: [Zephyr-devel] Bluetooth Multiple Central Connections

 

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


Re: Bluetooth Multiple Central Connections

Carles Cufi
 

Hi Daniel,

 

Can you confirm that this fixes both issues you described in your original email_

 

Thanks,

 

Carles

 

From: Daniel Widmann <widmann.daniel@...>
Sent: 11 June 2018 17:55
To: luiz.von.dentz@...
Cc: Cufi, Carles <carles.cufi@...>; devel@...
Subject: Re: [Zephyr-devel] Bluetooth Multiple Central Connections

 

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


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


Re: [Zephyr-users] is it possible to enable LE Coded PHY for #BluetoothMesh Nodes / #BLE devices? #bluetoothmesh #ble

Chettimada, Vinayak Kariappa
 

Hi Vikrant,

Advertising on Coded PHY needs the implementation of Extended Advertising feature of BT V5.0. This feature has not been implementation, only a initial effort was attempted.
That said, any contribution are welcome and I am available to assist in reviews.

Regards,
Vinayak


On 11 Jun 2018, at 17:48, vikrant8051 <vikrant8051@...> wrote:

Hi,


Is concept of, LE Codded PHY present in current Zephyr implementation to increase range
between two #BluetoothMesh Nodes ?

What is default configuration out of
- LE M1
- LE M2
- LE Coded ?


Thank You !!



is it possible to enable LE Coded PHY for #BluetoothMesh Nodes / #BLE devices? #bluetoothmesh #ble

vikrant8051 <vikrant8051@...>
 

Hi,


Is concept of, LE Codded PHY present in current Zephyr implementation to increase range
between two #BluetoothMesh Nodes ?

What is default configuration out of
- LE M1
- LE M2
- LE Coded ?


Thank You !!


Re: build zephyr samples/hello_world on WSL reporting error

Carles Cufi
 

Hi there,

 

This is a bug introduced to WSL recently, so there’s nothing we can do on the Zephyr side except wait for Microsoft to fix it. You can downgrade your WSL in the meantime. For more information please see:

https://github.com/Microsoft/WSL/issues/3154

 

Regards,

 

Carles

 

From: devel@... <devel@...> On Behalf Of ???
Sent: 11 June 2018 03:55
To: devel@...
Subject: [Zephyr-devel] build zephyr samples/hello_world on WSL reporting error

 

 

I'm using WSL (Ubuntu on Windows)

I setup build environment as "Getting Started Guide" said, and build samples/hello_world demo appbut cmake reporting error, the error message is:

 

/home/wmx/usb/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc: 1: /home/wmx/usb/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc: Syntax error: ")" unexpected

CMake Error at /home/wmx/win/zephyr/cmake/compiler/gcc.cmake:48 (string):

  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to

  command.

Call Stack (most recent call first):

  /home/wmx/win/zephyr/cmake/toolchain.cmake:40 (include)

  /home/wmx/win/zephyr/cmake/app/boilerplate.cmake:242 (include)

  CMakeLists.txt:2 (include)

 

 

/home/wmx/usb/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc: 1: /home/wmx/usb/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc: Syntax error: ")" unexpected

CMake Error at /home/wmx/win/zephyr/cmake/extensions.cmake:1081 (message):

  No such file or directory: LIBGCC_FILE_NAME: ''

Call Stack (most recent call first):

  /home/wmx/win/zephyr/cmake/compiler/gcc.cmake:100 (assert_exists)

  /home/wmx/win/zephyr/cmake/toolchain.cmake:40 (include)

  /home/wmx/win/zephyr/cmake/app/boilerplate.cmake:242 (include)

  CMakeLists.txt:2 (include)


build zephyr samples/hello_world on WSL reporting error

XIVN1987@...
 


I'm using WSL (Ubuntu on Windows)
I setup build environment as "Getting Started Guide" said, and build samples/hello_world demo app,but cmake reporting error, the error message is:

/home/wmx/usb/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc: 1: /home/wmx/usb/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc: Syntax error: ")" unexpected
CMake Error at /home/wmx/win/zephyr/cmake/compiler/gcc.cmake:48 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  /home/wmx/win/zephyr/cmake/toolchain.cmake:40 (include)
  /home/wmx/win/zephyr/cmake/app/boilerplate.cmake:242 (include)
  CMakeLists.txt:2 (include)


/home/wmx/usb/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc: 1: /home/wmx/usb/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc: Syntax error: ")" unexpected
CMake Error at /home/wmx/win/zephyr/cmake/extensions.cmake:1081 (message):
  No such file or directory: LIBGCC_FILE_NAME: ''
Call Stack (most recent call first):
  /home/wmx/win/zephyr/cmake/compiler/gcc.cmake:100 (assert_exists)
  /home/wmx/win/zephyr/cmake/toolchain.cmake:40 (include)
  /home/wmx/win/zephyr/cmake/app/boilerplate.cmake:242 (include)
  CMakeLists.txt:2 (include)


Re: Bluetooth Multiple Central Connections

Carles Cufi
 

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

 

 

 

 

 

 


Bluetooth Multiple Central Connections

Daniel Widmann
 

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







Re: Mbedtls_pk_verify error

David Brown
 

I’m not sure exactly what is wrong, but I can spot numerous buffer overflows just by looking through the code. For example, in verify_signature, you’re calling:

 

snprintk(b1, sizeof(1), “%c”, msg[i]);

 

To start with, I’m not sure why you’re using snprintk of a single character, when you can just compare the character directly. But, sizeof(1) will be ‘4’ on most of our platforms, much more than the single character in the buffer.

 

I would guess initially that this is the problem with the code. In general, I wouldn’t expect this code to be making any calls to functions like ‘snprintk’, ‘strmp’, or the likes.

 

David

 

From: <devel@...> on behalf of christian tavares <christiantavarest@...>
Date: Friday, June 8, 2018 at 10:52 AM
To: "devel@..." <devel@...>
Subject: [Zephyr-devel] Mbedtls_pk_verify error

 

I developed a http_client app and that app receives a signature (BASE64), that signature is made with a hash(sha256) of the string data and the private key. At my app, I catch my public key and call "mbedtls_pk_parse_public_key" and returns 0. In order to verify I call "mbedtls_pk_can_do( &pk, MBEDTLS_PK_RSA )" and "mbedtls_rsa_check_pubkey" and that's functions return 0.

After I decode the server_signature using "mbedtls_base64_decode" and return 0.

But, when I call the verification function "mbedtls_pk_verify" returns MBEDTLS_ERR_RSA_VERIFY_FAILED, don't understand the reason.

 

I already tested the same data using OpenSSL and the verification returns true. I tested the verification on the server side and returns true too.

Here https://github.com/chtavares592/verify_signature I developed my simple example. I put the zephyr's app, the server and the keys. I don't know the reason for this problem if somebody can help I will be grateful. Thanks 

github.com

verify_signature - This is an example where the server sends a signature made with hash (sha256) of data and the private key (rsa) and the client needs to verify this signature with your public key

 

 


Mbedtls_pk_verify error

christian tavares
 

I developed a http_client app and that app receives a signature (BASE64), that signature is made with a hash(sha256) of the string data and the private key. At my app, I catch my public key and call "mbedtls_pk_parse_public_key" and returns 0. In order to verify I call "mbedtls_pk_can_do( &pk, MBEDTLS_PK_RSA )" and "mbedtls_rsa_check_pubkey" and that's functions return 0.
After I decode the server_signature using "mbedtls_base64_decode" and return 0.
But, when I call the verification function "mbedtls_pk_verify" returns MBEDTLS_ERR_RSA_VERIFY_FAILED, don't understand the reason.

I already tested the same data using OpenSSL and the verification returns true. I tested the verification on the server side and returns true too.
Here https://github.com/chtavares592/verify_signature I developed my simple example. I put the zephyr's app, the server and the keys. I don't know the reason for this problem if somebody can help I will be grateful. Thanks 
github.com
verify_signature - This is an example where the server sends a signature made with hash (sha256) of data and the private key (rsa) and the client needs to verify this signature with your public key




Re: [Zephyr-users] Segger RTT support

Carles Cufi
 

Hi Marcio,

 

Can you try adding:

 

CONFIG_UART_CONSOLE=n

 

to your prj.conf?

 

More info here:

 

http://docs.zephyrproject.org/tools/nordic_segger.html#rtt-console

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of Marcio Montenegro
Sent: 08 June 2018 16:30
To: zephyr-users@...; zephyr-devel@...
Subject: [Zephyr-users] Segger RTT support

 

Hi all,

 

I am trying to setup my nrf51 project to use Segger RTT console.I am compiling last version of Zephyr but any previous version can be used.

My nrf51 hardware is ok and  I can use RTT on Keil IDE.

 

This is my prj.conf file

 

CONFIG_BT=y

CONFIG_BT_DEBUG_LOG=y

CONFIG_BT_DEVICE_NAME="Test beacon"

CONFIG_CLOCK_CONTROL_NRF5_K32SRC_RC=y

CONFIG_CLOCK_CONTROL_NRF5_K32SRC_250PPM=y

CONFIG_I2C_NRF5=y

CONFIG_I2C_0=y

CONFIG_I2C_NRF5_0_GPIO_SDA_PIN=26

CONFIG_I2C_NRF5_0_GPIO_SCL_PIN=27

CONFIG_I2C_0_IRQ_PRI=7       

CONFIG_CONSOLE_HAS_DRIVER=y

CONFIG_RTT_CONSOLE=y

CONFIG_HAS_SEGGER_RTT=y

 

On ninja menuconfig I can't find any option for Segger RTT.

Is there any documentation or example ? Am I missing a step ?

Best,

Marcio Montenegro

 

 

 

 


Segger RTT support

Marcio Montenegro
 

Hi all,

I am trying to setup my nrf51 project to use Segger RTT console.I am compiling last version of Zephyr but any previous version can be used.
My nrf51 hardware is ok and  I can use RTT on Keil IDE.

This is my prj.conf file

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_DEVICE_NAME="Test beacon"
CONFIG_CLOCK_CONTROL_NRF5_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF5_K32SRC_250PPM=y
CONFIG_I2C_NRF5=y
CONFIG_I2C_0=y
CONFIG_I2C_NRF5_0_GPIO_SDA_PIN=26
CONFIG_I2C_NRF5_0_GPIO_SCL_PIN=27
CONFIG_I2C_0_IRQ_PRI=7
CONFIG_CONSOLE_HAS_DRIVER=y
CONFIG_RTT_CONSOLE=y
CONFIG_HAS_SEGGER_RTT=y

On ninja menuconfig I can't find any option for Segger RTT.
Is there any documentation or example ? Am I missing a step ?
Best,
Marcio Montenegro





Re: Bluetooth Mesh Provisioning with Zephyr

vikrant8051 <vikrant8051@...>
 

Hi Johan,
Ok.


On Fri, Jun 8, 2018 at 1:16 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Vikrant,

On Fri, Jun 08, 2018, Vikrant More wrote:
> zephyr/samples/boards/nrf52/mesh/onoff-app
> do not save provisioning & configuration on SoC flash. Since persistent
> storage not yet enable in it.
> You may be reseting device after provisioning, that is why you are not able
> to control LED using Silicon Lab App.
>
> I've already created this PR:
> https://github.com/zephyrproject-rtos/zephyr/pull/8273 for an app
> which support per persistent storage.

Wouldn't it be simple to add BT_SETTINGS support to mesh/onoff-app as
well? Could you send a PR for that?

Johan

3461 - 3480 of 8189