Date   

Integration of central and peripheral code #nrf52832

Akash Naidu <akashnaiduece@...>
 

Hi all,
is there any example that supports both central and peripheral roles?

I would like to integrate central and peripheral roles into rpl_node example.
I have successfully integrated peripheral code, but couldn't enable the central code.

could please help me to enable central role (which should support 7 servers)in rpl_node?

Advance in thanks.

Regards
Akash.


How to build images for client or server in bluetooth mesh examples? #bluetoothmesh

wxzzzh
 

I noticed that in these examples, there's only one main.c file, and only one image file would be built, it can support different hardware, but seems not different roles?
Bluetooth Mesh is supposed to be run in different roles, right?
If one image is enough, how to set it for different roles?


Re: PCA10059 without additional debugger - non-volatile storage of settings

Martin <ma@...>
 

Hi Jamie,
thanks!
I was already trying different values, such as

storage_partition: partition@b0000 {
label = "storage";
reg = < 0xb0000 0x4000 >;
};

unfortunately without success.. The display of nRF Connect does not
change here, such that it does not show an additional region for the
config (I don't know if it is supposed to).

Best regards,
Martin

Am Do., 27. Dez. 2018 um 15:07 Uhr schrieb Jamie Mccrae
<Jamie.Mccrae@...>:


Hi Martin,
You have this in your DTS:
storage_partition: partition@fa000 {
label = "storage";
reg = < 0xfa000 0x4000 >;
};

You are setting the storage partition to 0xfa000, from your picture, the Nordic bootloader starts at 0xe0000, so yes the settings will never work because you're attempting to overwrite the bootloader. Luckily for you it looks like the bootloader enables write protection using ACL, otherwise it's likely your module would no longer be working.
Thanks,
Jamie


Re: PCA10059 without additional debugger - non-volatile storage of settings

lairdjm
 

Hi Martin,
You have this in your DTS:
storage_partition: partition@fa000 {
label = "storage";
reg = < 0xfa000 0x4000 >;
};

You are setting the storage partition to 0xfa000, from your picture, the Nordic bootloader starts at 0xe0000, so yes the settings will never work because you're attempting to overwrite the bootloader. Luckily for you it looks like the bootloader enables write protection using ACL, otherwise it's likely your module would no longer be working.
Thanks,
Jamie


PCA10059 without additional debugger - non-volatile storage of settings

Martin <ma@...>
 

Hi,
I know it is a quite specific question, but I thought that maybe
someone has an idea into which direction to go..

I have some PCA10059 (nRF52-Dongles) lying around and would like to
make experiments with them running Zephyr OS. Unfortunately, I do not
have a an appropriate cable for connecting it to my nRF52 DK to flash
it and buying a cable would crash my budget.

Luckily, work has been ongoing to make flashing the PCA10059 possible
without an external debugger. The solution (how I understand it) is
that the stock Nordic bootloader remains on the PCA10059, loads
MCUboot, which in turn loads Zephyr OS. The merge request can be found
here: https://github.com/zephyrproject-rtos/zephyr/pull/11210

I have playing around with it (i.e. flash samples/bluetooth/mesh) and
can report that it is working. I had to make two modifications:
Comment storage_partition in
boards\arm\nrf52840_pca10059\nrf52840_pca10059.dts, such that there is
no duplicate collision with dts/common/nrf52840-nrf5-*.overlay and
strangely (I would interpret the documention differently) keep Kconfig
settings how they are (leave CONFIG_BOOTLOADER_MCUBOOT=n).

The "only" problem I have: Storage of settings does not work. The
symptoms are that I have to re-provision the PCA10059 every time it is
power-cycled.

I have been playing around with storage settings in the .dts-files
(changing the memory regions) with no success. Attached is the
_dts_compiled that is generated during the build phase and a
screenshot of nrf connect showing in which regions code resides.

Has anyone already gotten storage of settings with PCA10059 to work
(possibly even with the traditional debugger solution)? And does
anyone have a clue / an idea why it is not working and where I should
look into?

Thanks,
Martin


Re: Possibility to reduce the power consumption of peripheral device #ble #nrf52480

Zięcik, Piotr <piotr.ziecik@...>
 

Hi.

 

It looks that you have HFCLK running all the time.

This is probably caused by small issue in power management code.

Please try to remove the calls to nrf_power_task_trigger() from soc/arm/nordic_nrf/nrf52/power.c

Piotr ZIĘCIK | Senior Firmware Engineer
M +48 698 726 973| Kraków, Poland
nordicsemi.com | devzone.nordicsemi.com

Nordic_logo_signature

 

From: devel@... <devel@...> On Behalf Of swapnil
Sent: Sunday, December 23, 2018 7:05 PM
To: devel@...
Subject: [Zephyr-devel] Possibility to reduce the power consumption of peripheral device #ble #nrf52480

 

Hello,

In order to use the peripheral and central device for energy efficient application, I performed some power measurement test with the following configuration using nrf52 DK.

Central_hr sample application is used as it is without making any changes.

In Peripheral_hr sample application notification time is changed to 1 sec.

In menuconfig :

·               Device drivers:

o   Console drivers

o   Serial drivers

o   GPIO drivers

o   Use legacy SPI API

are disabled

·                 Debugging Options: everything is disabled

·                 Bluetooth: none of the debug option is enabled

 

The average Current consumption on Peripheral device is 390 μA and average power consumption is 1.31mW with 3.35 V source.

 

Once the peripheral starts notifying, there are continuous spikes in the measurements between 2 notifications. I also checked with different connection intervals and different notification periods but still, there are same spikes.

Is there any possibility to improve energy consumption even further? 

Thank you in advance.

Regards,
Swapnil


Re: zephyr thread

Raj Gundi
 

The stack is not allocated in your example when you are using k_thread_create. Use the below code instead.

 

 

static K_THREAD_STACK_DEFINE(threadStack1, 1024);

static struct k_thread thread1;

k_thread_create(&thread1, threadStack1, 1024, (void*)DL_StateMachine_ModeHandler, NULL, NULL, NULL, 7, 0, K_NO_WAIT);

 

 

K_THREAD_STACK_DEFINE is called internally if you use K_THREAD_DEFINE instead of k_thread_create,

 

Regards,

Raj

 

From: devel@... [mailto:devel@...] On Behalf Of Florian Fouillet
Sent: Wednesday, December 26, 2018 11:07 PM
To: devel@...
Subject: [Zephyr-devel] zephyr thread

 

Hi everyone,

 

I am currently working on the Zephyr OS with a FDRM_K64f board from NXP.

 

To create thread I was first using K_THREAD_DEFINE.

 

I want to create an abstraction layer if I need to use different OS (a platform with generic definition for thread) so I won't have to modify the source code.

 

Since I can't call K_THREAD_DEFINE inside a function (I was ending up with an error). I am trying to use k_thread_create.

 

It's working when I create 1 thread but I have error as soon as I am trying to create multiple one.

 

Here for example I am creating 2 threads:

 

struct k_thread thread1 ;

k_thread_stack_t threadStack1 ;

 

struct k_thread thread2 ;

k_thread_stack_t threadStack2 ;

 

 

k_thread_create(&thread1, & threadStack1, 1024, (void*)DL_StateMachine_ModeHandler, NULL, NULL, NULL, 7, 0, K_NO_WAIT);

k_thread_create(&thread2, & threadStack2, 1024, (void*)DL_StateMachine_MsgHandler, NULL, NULL, NULL, 7, 0, K_NO_WAIT);

 

 

it compiles but then when I am trying to execute it I have the following issue:

 

 

 

 

Does anyone know how to correctly use the k_thread_create? My other question is, what’s k_thread_stack_t and what to do with it?

 

 

Thank you,

 

 

 

 


zephyr thread

Florian Fouillet <Florian.Fouillet@...>
 

Hi everyone,

 

I am currently working on the Zephyr OS with a FDRM_K64f board from NXP.

 

To create thread I was first using K_THREAD_DEFINE.

 

I want to create an abstraction layer if I need to use different OS (a platform with generic definition for thread) so I won't have to modify the source code.

 

Since I can't call K_THREAD_DEFINE inside a function (I was ending up with an error). I am trying to use k_thread_create.

 

It's working when I create 1 thread but I have error as soon as I am trying to create multiple one.

 

Here for example I am creating 2 threads:

 

struct k_thread thread1 ;

k_thread_stack_t threadStack1 ;

 

struct k_thread thread2 ;

k_thread_stack_t threadStack2 ;

 

 

k_thread_create(&thread1, & threadStack1, 1024, (void*)DL_StateMachine_ModeHandler, NULL, NULL, NULL, 7, 0, K_NO_WAIT);

k_thread_create(&thread2, & threadStack2, 1024, (void*)DL_StateMachine_MsgHandler, NULL, NULL, NULL, 7, 0, K_NO_WAIT);

 

 

it compiles but then when I am trying to execute it I have the following issue:

 

 

 

 

Does anyone know how to correctly use the k_thread_create? My other question is, what’s k_thread_stack_t and what to do with it?

 

 

Thank you,

 

 

 

 


Possibility to reduce the power consumption of peripheral device #ble #nrf52480

swapnil <swapnil2007kadam@...>
 

Hello,

In order to use the peripheral and central device for energy efficient application, I performed some power measurement test with the following configuration using nrf52 DK.

Central_hr sample application is used as it is without making any changes.

In Peripheral_hr sample application notification time is changed to 1 sec.

In menuconfig :

·               Device drivers:

o   Console drivers

o   Serial drivers

o   GPIO drivers

o   Use legacy SPI API

are disabled

·                 Debugging Options: everything is disabled

·                 Bluetooth: none of the debug option is enabled

 

The average Current consumption on Peripheral device is 390 μA and average power consumption is 1.31mW with 3.35 V source.

 

Once the peripheral starts notifying, there are continuous spikes in the measurements between 2 notifications. I also checked with different connection intervals and different notification periods but still, there are same spikes.

Is there any possibility to improve energy consumption even further? 

Thank you in advance.

Regards,
Swapnil


Does zephry support standard c io library?

ljh_dev@...
 

I finded zephyr source stdio.h only support a minimal io system, it did not include such as FILE ..defines,etc, does it support c io library ?


Re: Opus codec on nrf52840

Zięcik, Piotr <piotr.ziecik@...>
 

Hi.

 

Great to hear that!

Do you have any information about resource usage (Flash/RAM used, CPU load etc)?

 

Piotr ZIĘCIK | Senior Firmware Engineer
M +48 698 726 973| Kraków, Poland
nordicsemi.com | devzone.nordicsemi.com

Nordic_logo_signature

 

From: nicolas lantz <nicolas.lantz@...>
Sent: Wednesday, December 19, 2018 10:15 AM
To: Zięcik, Piotr <Piotr.Ziecik@...>; Cufi, Carles <Carles.Cufi@...>; devel@...
Subject: Re: [Zephyr-devel] Opus codec on nrf52840

 

Hello,

I have a "net_opus" server sample that is able to compress and then decode an audio PCM stream with the opus codec.
- It work on the fly in realtime with an opus codec configured in low complexity on the nrf52840-dk board.
- the stream come from a  TCP client like netcat, it's encoded with opus, then decoded, and the output pcm stream is sent back to the TCP client.

Running the demo give something like that :
nc 192.0.2.1 4242 < Test_16000Hz_mono_16bit.raw  | aplay -t raw -f S16_LE -r 16000 -c 1 -

If someone is interested on it :
https://gitlab.com/ubicore/zephyr/commit/177a410c6902ecacb9552c907f1e4f60e7a23b1a



Regards,
Nicolas
 
Nicolas LANTZ
M : +33 (0)6 19 07 43 43
T : +33 (0)9 52 96 81 86
www.ubicore.net

Le 04/12/2018 à 10:38, nicolas lantz a écrit :

Thanks you for the reponse.
I took the time to extract the modified opus library code from the Smart Ready project (from the .exe to linux) and compared it to the origin opus lib.
Now i will try to use it in a zephry project
 
Regards,
 
Nicolas
Nicolas LANTZ
M : +33 (0)6 19 07 43 43
T : +33 (0)9 52 96 81 86
www.ubicore.net

Le 29/11/2018 à 12:56, Zięcik, Piotr a écrit :

Hello.

 

I can recommend looking into https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRFready-Smart-Remote-3-for-nRF52-Series

Unfortunately it is not based on the Zephyr, however it implements audio streaming using Opus and contains an optimized version of the codec

(with reduced memory requirements as well as using DPS extensions available on the Nordic chips).

 

If you require any further information, feel free to contact me.

Piotr ZIĘCIK | Senior Firmware Engineer
M +48 698 726 973| Kraków, Poland
nordicsemi.com | devzone.nordicsemi.com

Nordic_logo_signature

 

From: Cufi, Carles
Sent: Thursday, November 29, 2018 12:49 PM
To: nicolas lantz <nicolas.lantz@...>; devel@...; Zięcik, Piotr <Piotr.Ziecik@...>
Subject: RE: [Zephyr-devel] Opus codec on nrf52840

 

+ Piotr

 

From: devel@... <devel@...> On Behalf Of nicolas lantz
Sent: 29 November 2018 12:41
To: devel@...
Subject: [Zephyr-devel] Opus codec on nrf52840

 

Hi,

I would like to use the Opus codec with zephyr on a nrf52840 to encode or decode an audio stream.
Has anyone have a suggestion on this project?


Regards,
 
Nicolas
 

 

 


Re: Opus codec on nrf52840

nicolas lantz
 

Hello,

I have a "net_opus" server sample that is able to compress and then decode an audio PCM stream with the opus codec.
- It work on the fly in realtime with an opus codec configured in low complexity on the nrf52840-dk board.
- the stream come from a  TCP client like netcat, it's encoded with opus, then decoded, and the output pcm stream is sent back to the TCP client.

Running the demo give something like that :
nc 192.0.2.1 4242 < Test_16000Hz_mono_16bit.raw  | aplay -t raw -f S16_LE -r 16000 -c 1 -

If someone is interested on it :
https://gitlab.com/ubicore/zephyr/commit/177a410c6902ecacb9552c907f1e4f60e7a23b1a


Regards,
Nicolas

Nicolas LANTZ
M : +33 (0)6 19 07 43 43
T : +33 (0)9 52 96 81 86
www.ubicore.net
Le 04/12/2018 à 10:38, nicolas lantz a écrit :

Thanks you for the reponse.
I took the time to extract the modified opus library code from the Smart Ready project (from the .exe to linux) and compared it to the origin opus lib.
Now i will try to use it in a zephry project

Regards,
 
Nicolas
Nicolas LANTZ
M : +33 (0)6 19 07 43 43
T : +33 (0)9 52 96 81 86
www.ubicore.net
Le 29/11/2018 à 12:56, Zięcik, Piotr a écrit :

Hello.

 

I can recommend looking into https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRFready-Smart-Remote-3-for-nRF52-Series

Unfortunately it is not based on the Zephyr, however it implements audio streaming using Opus and contains an optimized version of the codec

(with reduced memory requirements as well as using DPS extensions available on the Nordic chips).

 

If you require any further information, feel free to contact me.

Piotr ZIĘCIK | Senior Firmware Engineer
M +48 698 726 973| Kraków, Poland
nordicsemi.com | devzone.nordicsemi.com

Nordic_logo_signature

 

From: Cufi, Carles
Sent: Thursday, November 29, 2018 12:49 PM
To: nicolas lantz <nicolas.lantz@...>; devel@...; Zięcik, Piotr <Piotr.Ziecik@...>
Subject: RE: [Zephyr-devel] Opus codec on nrf52840

 

+ Piotr

 

From: devel@... <devel@...> On Behalf Of nicolas lantz
Sent: 29 November 2018 12:41
To: devel@...
Subject: [Zephyr-devel] Opus codec on nrf52840

 

Hi,

I would like to use the Opus codec with zephyr on a nrf52840 to encode or decode an audio stream.
Has anyone have a suggestion on this project?

Regards,
 
Nicolas
 



STM32F091 - UARTs sharing IRQ don't work together

Rodrigo Peixoto <rodrigopex@...>
 

Hello everyone.

I am facing issues when trying to use UART3 and UART4 of the STM32F091 (they were not available at the original DTS, I had to include them). I have noticed that these UARTs share the same interrupt number 29. When both are enabled I can send no data to them. Any clue?

I will try to do a pull request after solving the problem. 

Thank you.
Best regards,
Rodrigo Peixoto
Co-founder and Technical advisor

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex



Meetings today cancelled

Carles Cufi
 

Hi all,

Apologies for the late notice. Due to most TSC members being on vacation we are not going to have our regular API and Release Readiness meeting today.

Regards,

Carles


compare mcumgr image hash with compiled/signed .bin/.hex hash

florian.gaertner@...
 

Hi there,

Is there an easy way to compare the mcumgr image hash response to the hash of the hex or binary file (signed or unsigned)?

# mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' image list

e.g. with
# sha256sum signed-image.hex

Best regards
Florian


How to integrated BLE central code with RPL Node example? #nrf52832 #zephyrbluetoothmesh

Akash Naidu <akashnaiduece@...>
 

Hi All,
I have been working on RPL node example(which is in zephyr/samples/net/rpl_node), to work it as both central and peripheral concurrently.
I have successfully integrated peripheral code with RPL node example, and device has been able to Advertise and able to establish the connection also.
To act as peripheral, i have edited "prj.conf" file and has been working as peripheral.
If i do same thing for central, device was not getting enter into scan mode.
my aim is, each device should act as peripheral and central and on top of BLE links will send IPV6 packets by using RPL protocol.

could you please help me to integrate Central(nrf52832 DK) with RPL_node?

Thanks in Adavnce.
BR
Akash.


Disabling Multithreading

Raj Gundi
 

Hi Carles,

 

I am trying to build Zephyr to fit in a memory constrained device of 64kB. My device doesn’t require multithreading and hence I disabled multithreading to save on the memory. However, this is throwing me exceptions since I have UART and SPI Flash drivers enabled. It appears the semaphore accesses in those drivers are not “single-thread” aware. Is there anything that can be done to work-around this? Does just “nop”ing it out suffice? Please let me know.

 

Regards,

Raj


problems linking custom board (terasic sockit) and soc for altera nios2

mazaun@...
 

Hi,
I'm working on creating a custom out-of-tree board with soc for the Terasic SocKit board. Though there are certainly many things not done correct yet, I'm currently stuck at linking the simple hello_world sample. I uploaded the code to https://github.com/mzau/altera-sockit-zephyr. Please see https://github.com/mzau/altera-sockit-zephyr/tree/master/hello_world/README.md  for details.

Any help or hints are very appreciated :)

Regards


Re: To current Zephyr HTTP API users

Paul Sokolovsky
 

Hello Jukka,

On Thu, 13 Dec 2018 18:01:42 +0200
"Jukka Rissanen" <jukka.rissanen@...> wrote:

Hello,

currently Zephyr has HTTP server & client APIs that are built on top
of net-app API. As we are currently trying to deprecate the net-app
API, the HTTP APIs would need to be rewritten to use the BSD socket
API instead of net-app API.

Would there be anyone interested in writing such HTTP server / client
APIs?
Well, I kinda was interested in this, given all my criticism of the
older API and implementation. But I'm in reservations after the TLS
zstream case, where a bunch of effort was spent to do it right, and all
that went to /dev/null.

If there are no users for existing HTTP APIs, we could also
optionally start to deprecate them.
IMHO before we provide a replacement, we should not deprecate
anything.

The new HTTP APIs could also be
based to some existing open source library if you know any.
I think that given that we have "in house" implementation of COAP,
LWM2M, MQTT, that it would be indeed a refreshing change to not try to
invent our own API, but try to port an existing. Well, at least to
survey the landscape trying to find one which would be suitable for our
code/RAM size requirements.

So please
raise your hand if you could help here.
So, I think we should decide if it would be OK to bet on 3rd-party
lib at all, then focus a call exactly like that: Are there suggestions
of existing lib to port, satisfying our requirements (which is, again,
being small)?

Myself, I think my plate is more than full for 1.14, and I already
subscribed to port another lib to Zephyr (OPC-UA). However, if we agree
on 3rd-party solution to be OK in principle, I start surveying too in
the background in the meantime.



Cheers,
Jukka
[]

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


To current Zephyr HTTP API users

Jukka Rissanen
 

Hello,

currently Zephyr has HTTP server & client APIs that are built on top of
net-app API. As we are currently trying to deprecate the net-app API,
the HTTP APIs would need to be rewritten to use the BSD socket API
instead of net-app API.

Would there be anyone interested in writing such HTTP server / client
APIs? If there are no users for existing HTTP APIs, we could also
optionally start to deprecate them. The new HTTP APIs could also be
based to some existing open source library if you know any. So please
raise your hand if you could help here.


Cheers,
Jukka