Date   

Re: mcuboot : nrf52: warning during build

vikrant8051 <vikrant8051@...>
 

Hi Marti,
I followed your steps & its works for me.
Thank You !!


On Sun, Feb 10, 2019 at 1:50 AM Marti Bolivar <marti@...> wrote:
Hi Vikrant,

Thanks for the report.

The warnings are a known issue; please see: https://github.com/zephyrproject-rtos/zephyr/issues/13194.

The reason mcuboot is not working with mainline zephyr is because this PR has not yet been merged:


You can apply mcuboot 405 to your local tree, build, and ignore the warnings for now until it is merged into mcuboot mainline. The power management warnings are unrelated.

Thanks,
Marti


On Sat, Feb 9, 2019, 12:30 PM vikrant8051 <vikrant8051@... wrote:
Hello,
I am getting following warning while building mcuboot :

warning: ‘enum power_states’ declared inside parameter list will not be visible outside of this definition or declaration
 void sys_power_state_post_ops(enum power_states state);


After this if we flash mcuboot + signed.hex, then that code is not
executing.
-----------------------------------------------------------------------------------------------------------------

To solve this issue temporarily, I executed

cd zephyr
git checkout <old commit>

& repeat the process. Here everything works perfectly normal.

That means some bug has recently introduced.





Re: mcuboot : nrf52: warning during build

Marti Bolivar <marti@...>
 

Hi Vikrant,

Thanks for the report.

The warnings are a known issue; please see: https://github.com/zephyrproject-rtos/zephyr/issues/13194.

The reason mcuboot is not working with mainline zephyr is because this PR has not yet been merged:


You can apply mcuboot 405 to your local tree, build, and ignore the warnings for now until it is merged into mcuboot mainline. The power management warnings are unrelated.

Thanks,
Marti


On Sat, Feb 9, 2019, 12:30 PM vikrant8051 <vikrant8051@... wrote:
Hello,
I am getting following warning while building mcuboot :

warning: ‘enum power_states’ declared inside parameter list will not be visible outside of this definition or declaration
 void sys_power_state_post_ops(enum power_states state);


After this if we flash mcuboot + signed.hex, then that code is not
executing.
-----------------------------------------------------------------------------------------------------------------

To solve this issue temporarily, I executed

cd zephyr
git checkout <old commit>

& repeat the process. Here everything works perfectly normal.

That means some bug has recently introduced.





mcuboot : nrf52: warning during build

vikrant8051 <vikrant8051@...>
 

Hello,
I am getting following warning while building mcuboot :

warning: ‘enum power_states’ declared inside parameter list will not be visible outside of this definition or declaration
 void sys_power_state_post_ops(enum power_states state);


After this if we flash mcuboot + signed.hex, then that code is not
executing.
-----------------------------------------------------------------------------------------------------------------

To solve this issue temporarily, I executed

cd zephyr
git checkout <old commit>

& repeat the process. Here everything works perfectly normal.

That means some bug has recently introduced.





Re: Zephyr SDK 0.10.0-rc2 available

Nashif, Anas
 

Do we make Zephyr 1.14 release with the stable 0.9.5 SDK?
No, Zephyr release is not tied to a toolchain. The SDK was always a one stop for everything you need to build and use zephyr, but you should be able to use any toolchain.

Anas

-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@...]
Sent: Tuesday, February 5, 2019 12:21 PM
To: Nashif, Anas <anas.nashif@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] Zephyr SDK 0.10.0-rc2 available

Hello Anas,

Do we make Zephyr 1.14 release with the stable 0.9.5 SDK?

On Tue, 5 Feb 2019 12:55:48 +0000
"Nashif, Anas" <anas.nashif@...> wrote:

Hi,
We are excited to announce the availability of a new pre-release of
the Zephyr SDK.

This release of the SDK provides a major update to all tools and
toolchains. The current SDK was based on yocto, this release uses
crosstool-ng for the toolchains and yocto for the host tools.

Major changes in this release:
[]

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: Zephyr SDK 0.10.0-rc2 available

Nashif, Anas
 

Btw, nice upgrade in size comparing to "non-NG" SDK - from 300MB to 700MB. No chance that we just fix up the old SDK? ;-)
That's due to multilib arm and arc both 80% of the SDK if I remember correctly :)

Anas

-----Original Message-----
From: devel@... [mailto:devel@...] On Behalf Of Paul Sokolovsky
Sent: Friday, February 8, 2019 11:24 AM
To: Nashif, Anas <anas.nashif@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] Zephyr SDK 0.10.0-rc2 available

Hello,

On Tue, 5 Feb 2019 20:21:01 +0300
"Paul Sokolovsky" <paul.sokolovsky@...> wrote:

Hello Anas,

Do we make Zephyr 1.14 release with the stable 0.9.5 SDK?
Ping @nashif.

Btw, nice upgrade in size comparing to "non-NG" SDK - from 300MB to 700MB. No chance that we just fix up the old SDK? ;-)


On Tue, 5 Feb 2019 12:55:48 +0000
"Nashif, Anas" <anas.nashif@...> wrote:

Hi,
We are excited to announce the availability of a new pre-release of
the Zephyr SDK.

This release of the SDK provides a major update to all tools and
toolchains. The current SDK was based on yocto, this release uses
crosstool-ng for the toolchains and yocto for the host tools.

Major changes in this release:
[]


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: Zephyr SDK 0.10.0-rc2 available

Paul Sokolovsky
 

Hello,

On Tue, 5 Feb 2019 20:21:01 +0300
"Paul Sokolovsky" <paul.sokolovsky@...> wrote:

Hello Anas,

Do we make Zephyr 1.14 release with the stable 0.9.5 SDK?
Ping @nashif.

Btw, nice upgrade in size comparing to "non-NG" SDK - from 300MB to
700MB. No chance that we just fix up the old SDK? ;-)


On Tue, 5 Feb 2019 12:55:48 +0000
"Nashif, Anas" <anas.nashif@...> wrote:

Hi,
We are excited to announce the availability of a new pre-release of
the Zephyr SDK.

This release of the SDK provides a major update to all tools and
toolchains. The current SDK was based on yocto, this release uses
crosstool-ng for the toolchains and yocto for the host tools.

Major changes in this release:
[]


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


BT MESH SENSOR MODEL: BT_MESH_MODEL_ID_SENSOR_SRV #bluetoothmesh #zephyrbluetoothmesh

William Fish
 

Hi All,
I am looking at implementing a sensor network via BLE Mesh and am looking for any information on the implementation of the SENSOR MESH MODEL.

Can anyone point me in the right direction? 

Many thanks in advance.

Billy..


Re: Pairing/bonding Zephyr API? Pairing info?

frv
 

Hi Johan,

The QEMU concept looks great, just what I'm looking for. Thanks,
Best regards,
Frank


Re: Code Freeze for 1.14 on Friday Feb 1st

Armando Visconti
 


Just wanted to remind everyone that the code freeze for 1.14 will be
this Friday. Please tag any PR as with 1.14 milestone that you feel
should try and get merged as part of 1.14.
So, did the freeze officially happen on last Friday? What next steps
can we expect?
I guess it has been postponed to this Friday:

https://github.com/zephyrproject-rtos/zephyr/wiki/Program-Management

Armando


Re: Pairing/bonding Zephyr API? Pairing info?

Johan Hedberg
 

Hi Frank,

On 6 Feb 2019, at 11.21, frv <@frv> wrote:
It all works like a charm now, after a power cycle the BLE central applic reconnects without authentication issues anymore.
Good to hear!

I know you can run an emulator on a host PC but probably without the BT HW this is hard to do unless the host BT device can be used? Is this possible?
Yes, it’s possible, however you need to use Linux as your development environment (in case you were using MacOS or Windows until now).

There are instructions available here:

https://docs.zephyrproject.org/latest/subsystems/bluetooth/devel.html#bluetooth-qemu

Johan


Re: Pairing/bonding Zephyr API? Pairing info?

frv
 

Hi Johan, all,


It all works like a charm now, after a power cycle the BLE central applic reconnects without authentication issues anymore. 

So indeed flash configuration was required as demonstrated in the BT peripheral applic. 

Sometimes hard to follow what happens behind the scene, e.g. settings_load. So a lot of work for me to understand better Zephyr and some of it subsystems. 


I'm wondering what will be my next issue. Anyhow very happy with the result so far. 

Basically I have all that is needed for the prototyping of our use case. Just have to replace the BT HR applic with a BT peripheral applic that keeps track of a button press on the nRF52 board. 


As I just do little modifications to the existing BT demo software, I wondering if there exist a better way to develop and debug coding on Zephyr without having to re-flash all the time when something needs to be modified in application. 


I know you can run an emulator on a host PC but probably without the BT HW this is hard to do unless the host BT device can be used? Is this possible?


Thanks!


Best regards,

Frank


Re: Pairing/bonding Zephyr API? Pairing info?

frv
 

Hi Johan,


Sorry for messing up my messages on the forum.

I will try to remember, unfortunately not the first time, I will do my best to do better in the future.


Anyway thanks for pointing me in the right direction.


I'm still getting familar with Zephyr and also with Bluetooth LE. 

Programming in different languages (C / C++) and platforms(Linux / Zephyr) makes it not easier, anyhow we love the challenges as SW developer :).


Ok, I will have a look at the Peripheral example and see how to continue with finalizing my BLE implementation on Zephyr. 


Thanks again for your feedback and I will keep the forum informed on the progress I'm making.


Best regards,

Frank


Van: Hedberg, Johan <johan.hedberg@...>
Verzonden: dinsdag 5 februari 2019 20:45:06
Aan: Vieren Frank
CC: devel@...
Onderwerp: Re: [Zephyr-devel] Pairing/bonding Zephyr API? Pairing info?
 
Hi Frank,

Please try not to use any “edit” feature on the mailing lists web-interface. It makes it very difficult to understand what’s going on when reading your emails with a normal email client.

> On 5 Feb 2019, at 19.48, frv <F.Vieren@...> wrote:
> When I run make menuconfig,
> BT_SETTINGS(=n) "Store Bluetooth state and configuration persistently"
> I can't seem to get this to y(es).
>
> When entering it "Store Bluetooth state and configuration persistenly (NEW) is in red. And nothing can be selected
>
> Normal?
>
> Probably need to first get the Disk/Flash configured

Yes, you need to have flash and the settings subsystem enabled. Simplest is probably to look at any of the existing Bluetooth samples that already successfully use BT_SETTINGS. E.g. samples/bluetooth/peripheral is one such sample. peripheral_hr is (unfortunately) not. Note that even after enabling the Kconfig options you’ll also need to update your app to make a call to settings_load() after calling bt_enable(). Take a look at how and where the peripheral app does this in its main.c. As for the Kconfig options, I believe the following from the peripheral app’s prj.conf are the necessary options, assuming you’re ok with the FCB backend (there’s also an NFFS one):

CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_FCB=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y

Johan


Re: Pairing/bonding Zephyr API? Pairing info?

Johan Hedberg
 

Hi Frank,

Please try not to use any “edit” feature on the mailing lists web-interface. It makes it very difficult to understand what’s going on when reading your emails with a normal email client.

On 5 Feb 2019, at 19.48, frv <@frv> wrote:
When I run make menuconfig,
BT_SETTINGS(=n) "Store Bluetooth state and configuration persistently"
I can't seem to get this to y(es).

When entering it "Store Bluetooth state and configuration persistenly (NEW) is in red. And nothing can be selected

Normal?

Probably need to first get the Disk/Flash configured
Yes, you need to have flash and the settings subsystem enabled. Simplest is probably to look at any of the existing Bluetooth samples that already successfully use BT_SETTINGS. E.g. samples/bluetooth/peripheral is one such sample. peripheral_hr is (unfortunately) not. Note that even after enabling the Kconfig options you’ll also need to update your app to make a call to settings_load() after calling bt_enable(). Take a look at how and where the peripheral app does this in its main.c. As for the Kconfig options, I believe the following from the peripheral app’s prj.conf are the necessary options, assuming you’re ok with the FCB backend (there’s also an NFFS one):

CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_FCB=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y

Johan


Re: Pairing/bonding Zephyr API? Pairing info?

frv
 
Edited

On Tue, Feb 5, 2019 at 02:51 PM, Johan Hedberg wrote:
Note that you need to have flash storage support enabled, including CONFIG_BT_SETTINGS, in order for the bonding information to be persistently stored and reloaded after a power cycle.
https://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_BT_SETTINGS.html

Merging /home/frv/zephyr/samples/bluetooth/peripheral_hr/prj.conf warning: BT_SETTINGS (defined at subsys/bluetooth/host/Kconfig:139) was assigned the value 'y' but got the value 'n'.


When I run make menuconfig, 
BT_SETTINGS(=n) "Store Bluetooth state and configuration persistently"
I can't seem to get this to y(es).

When entering it "Store Bluetooth state and configuration persistenly (NEW) is in red. And nothing can be selected

Normal?

Probably need to first get the Disk/Flash configured, what are appropriate values for the Flash?
Currently I'm using 117012 bytes or 22% of 512KB.

Thanks,
Best regards,

Frank


Re: Zephyr SDK 0.10.0-rc2 available

Paul Sokolovsky
 

Hello Anas,

Do we make Zephyr 1.14 release with the stable 0.9.5 SDK?

On Tue, 5 Feb 2019 12:55:48 +0000
"Nashif, Anas" <anas.nashif@...> wrote:

Hi,
We are excited to announce the availability of a new pre-release of
the Zephyr SDK.

This release of the SDK provides a major update to all tools and
toolchains. The current SDK was based on yocto, this release uses
crosstool-ng for the toolchains and yocto for the host tools.

Major changes in this release:
[]

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: Pairing/bonding Zephyr API? Pairing info?

frv
 
Edited

Hi Johan,

thanks for the feedback.

- conn.h and missing function void set_bondable():
Not sure what went wrong but in my git checkout I see after executing the command git branch in the zephyr/include/bluetooth/ : HEAD detached at v1.13.0, and in the conn.h I'm missing the set_bondable function call. 
Nevertheless it is clear for me that this is not an issue for my current problem.

- So why I need to know if I'm paired? Well maybe and probably my wrong doing of using the fixed passkey.... 

So my working flow is :
- in the BLE peripheral applic I use a fixed passkey that is randomly generated and set via the function call : bt_passkey_set
- my BLE central applic initiates the pairing process to the peripheral device. 
- at the central side, the passkey is asked that was generated in the peripheral.
- so after providing the correct passkey (can be done automatically via the BlueZ API, without manual interaction via a keyboard), the pairing is successfully.
- the BLE central applic can now successfully connect to the peripheral applic and subscribe to the "change" notifications of the heart rate measurement characteristic. 

 - now I restart/power cycle the nRF52 running the BLE peripheral applic, so I call again the "bt_passkey_set" as I don't check if the device is already paired (the reason for my question earlier). So this is probably already fishy... 

As the BLE Central application still sees that it is paired with the BLE peripheral, it just calls a function to make a connection, it will not initiate again a pairing process.
But the BLE peripheral, rejects the connection with returning an error, hci error code: 0x05, meaning authorization failure... 

However after rebuilding my Zephyr peripheral applic without the bt_passkey_set, I still get the connection rejection in the peripheral applic throwing the authorization failure as reason.

So what do I still do wrong? Forgive me I'm still learning... 

Best regards,
Frank

ADDITIONAL INFO: 
I used the peripheral_sc_only example to implement a secure connection.

So in my connected callback function I have this:

static void connected(struct bt_conn *conn, u8_t err)
{
        if (err)
        {
                printk("Connection failed (err %u)\n", err);
        }
        else
        {
                default_conn = bt_conn_ref(conn);
                printk("Connected\n");
                if (bt_conn_security(conn, BT_SECURITY_FIPS) < 0)
                {
                        printk("Failed to set security...\n");
                        bt_conn_disconnect(conn, 0);
                }
        }
}
 


Re: Pairing/bonding Zephyr API? Pairing info?

Johan Hedberg
 

Hi Frank,


On 5 Feb 2019, at 15.25, frv <@frv> wrote:
If the pairing process has succeeded is bonding automatically done?
I don't really understand the comment in the Bluetooth API for the function call:
"For the vast majority of applications calling this function shouldn’t be needed."

void bt_set_bondable(bool enable)

"Set/clear the Bonding flag in the Authentication Requirements of SMP Pairing Request/Response data. The initial value of this flag depends on BT_BONDABLE Kconfig setting. For the vast majority of applications calling this function shouldn’t be needed."

BTW I don't find this API any longer in Bluetooth code (V1.14), probably no longer valid?
Why do you say that? It’s still there in include/bluetooth/conn.h. However, the comment is correct - Zephyr defaults to bondable, so you only need to touch this stuff if you want to perform qualification tests on non-bondable mode.

Pairing:

Also is there an API call to see if the device is already paired? Because after a board startup(power cycle) I don't want to set a new passkey if the device is already paired.

In my case the BLE peripheral sets a random fixed passkey at startup and the connecting central needs to set this passkey after initiating the pairing process.
You can iterate through existing bonds using the bt_foreach_bond() API, however it’s not clear to me why your application would need to use it - if a device is bonded then the previously stored LTK will be used, and if it’s not bonded then a new pairing process will be triggered. Note that you need to have flash storage support enabled, including CONFIG_BT_SETTINGS, in order for the bonding information to be persistently stored and reloaded after a power cycle.

Johan


Pairing/bonding Zephyr API? Pairing info?

frv
 

Hi,


Bonding:


If the pairing process has succeeded is bonding automatically done? 

I don't really understand the comment in the Bluetooth API  for the function call:

"For the vast majority of applications calling this function shouldn’t be needed."


void bt_set_bondable(bool enable)


"Set/clear the Bonding flag in the Authentication Requirements of SMP Pairing Request/Response data. The initial value of this flag depends on BT_BONDABLE Kconfig setting. For the vast majority of applications calling this function shouldn’t be needed."


BTW I don't find this API any longer in Bluetooth code (V1.14), probably no longer valid?


Pairing:


Also is there an API call to see if the device is already paired? Because after a board startup(power cycle) I don't want to set a new passkey if the device is already paired. 


In my case the BLE peripheral sets a random fixed passkey at startup and the connecting central needs to set this passkey after initiating the pairing process. 


Thanks,

Best regards,

Frank


Zephyr SDK 0.10.0-rc2 available

Nashif, Anas
 

Hi,

We are excited to announce the availability of a new pre-release of the Zephyr SDK.

 

This release of the SDK provides a major update to all tools and toolchains. The current SDK was based on yocto, this release uses crosstool-ng for the toolchains and yocto for the host tools.

 

Major changes in this release:

 

·       Use crosstool-ng for building the toolchains

·       Update toolchains to GCC 8.2

·       bossa: Update to 1.9.1

·       qemu: Update to release 3.1.0

·       Update openocd to Zephyr Branch from 20190130

 

The SDK is available for download from  https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.10.0-rc2

 

 

Knowns issues:

-          Newlib with xtensa targets does not work yet.

-          1 nios2 tests fails to build

 

 

If you find any issues or have general feedback, use the following issue system to report:

 

https://github.com/zephyrproject-rtos/sdk-ng/issues

 

 

Regards,

Anas Nashif

 


Re: Introducing west, Zephyr's meta-tool

Carles Cufi
 

Hi David,

-----Original Message-----
From: David Leach <david.leach@...>
Sent: 05 February 2019 06:40
To: Cufi, Carles <Carles.Cufi@...>; zephyr-devel <zephyr-
devel@...>; zephyr-users@...
Subject: RE: Introducing west, Zephyr's meta-tool

With west merged in does that mean we can no longer use the cmake/ninja
debug type of flow (I'm seeing a problem).
You can definitely continue to use the exact same workflow as before. If there's a problem please let us know via GitHub issue or on Slack.

If not, will the west setup instructions work on an existing working
directory or do we have to start from scratch?
This is thoroughly documented in the new Getting Started guide:

https://docs.zephyrproject.org/latest/getting_started/getting_started.html#get-the-source-code

You can use "west init -l" to initialize an existing copy of zephyr.

Carles