Date   

Re: [Zephyr-users] [Zephyr-devel] How to change Bluetooth default TX power ?

Ryan Erickson
 

I'd like to put in a vote for changing the TX power at runtime. Our use case would be making the TX power less during advertisements and then increasing it once the connection is made.

Thanks,

Ryan

From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On Behalf Of Chettimada, Vinayak Kariappa
Sent: Monday, June 4, 2018 13:13
To: Vikrant More <vikrant8051@gmail.com>
Cc: Abderrezak Mekkaoui <ab.mekka@gmail.com>; devel@lists.zephyrproject.org; users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] [Zephyr-devel] How to change Bluetooth default TX power ?

Vikrant,

Sure, I will send a PR for that one as soon as I can (tomorrow maybe).

Regards,
Vinayak


On 4 Jun 2018, at 23:41, Vikrant More <mailto:vikrant8051@gmail.com> wrote:

Hi Vinayak, 
As of now, I need build time configuration option to change Tx power. It will be great, if we could do it by editing prj.conf.

Thank You !!

On Mon, Jun 4, 2018, 11:29 PM Chettimada, Vinayak Kariappa <mailto:vinayak.kariappa.chettimada@nordicsemi.no> wrote:
Hi Vikrant and Abderrezak,

Please elaborate on your applications' use case for Tx power change. Do you want to use a build time custom Tx power setting or runtime dynamic update to Tx Power?

As there is no HCI command to update Tx power, except in Extended Advertising feature, it is important to define a Host API for a dynamic update well suited targeting an use case for legacy advertising and connections.
This will then need to define vendor specific HCI extensions to update the settings in the controller’s radio implementations.

Regards,
Vinayak


On 4 Jun 2018, at 19:28, Abderrezak Mekkaoui <mailto:ab.mekka@gmail.com> wrote:

Hi All,
I have the same issue. This is clearly an app variable imho.
Thanks
Abderrezak

On 6/4/2018 9:45 AM, vikrant8051 wrote:
Hi,

If anyone want to edit tx power of #nRF52840_PDK, then have to edit two file ..
1) $zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c: L5882
2)  $zephyr/subsys/bluetooth/controller/ll_sw/ll_test.c: L189

which are part of Bluetooth Stack.

How to modify TX power at APP level (after reboot or in middle of firmware execution) ?
Is it possible to use some configuration parameter for it ?

Thank You !!


Re: [Zephyr-users] [Zephyr-devel] How to change Bluetooth default TX power ?

Chettimada, Vinayak Kariappa
 

Vikrant,

Sure, I will send a PR for that one as soon as I can (tomorrow maybe).

Regards,
Vinayak

On 4 Jun 2018, at 23:41, Vikrant More <vikrant8051@...> wrote:

Hi Vinayak, 
As of now, I need build time configuration option to change Tx power. It will be great, if we could do it by editing prj.conf.

Thank You !!

On Mon, Jun 4, 2018, 11:29 PM Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...> wrote:
Hi Vikrant and Abderrezak,

Please elaborate on your applications' use case for Tx power change. Do you want to use a build time custom Tx power setting or runtime dynamic update to Tx Power?

As there is no HCI command to update Tx power, except in Extended Advertising feature, it is important to define a Host API for a dynamic update well suited targeting an use case for legacy advertising and connections.
This will then need to define vendor specific HCI extensions to update the settings in the controller’s radio implementations.

Regards,
Vinayak

On 4 Jun 2018, at 19:28, Abderrezak Mekkaoui <ab.mekka@...> wrote:

Hi All,

I have the same issue. This is clearly an app variable imho.
Thanks

Abderrezak


On 6/4/2018 9:45 AM, vikrant8051 wrote:
Hi,

If anyone want to edit tx power of #nRF52840_PDK, then have to edit two file ..
1) $zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c: L5882
2)  $zephyr/subsys/bluetooth/controller/ll_sw/ll_test.c: L189

which are part of Bluetooth Stack.

How to modify TX power at APP level (after reboot or in middle of firmware execution) ?
Is it possible to use some configuration parameter for it ?

Thank You !!






Re: [Zephyr-users] [Zephyr-devel] How to change Bluetooth default TX power ?

vikrant8051 <vikrant8051@...>
 

Hi Vinayak, 
As of now, I need build time configuration option to change Tx power. It will be great, if we could do it by editing prj.conf.

Thank You !!

On Mon, Jun 4, 2018, 11:29 PM Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...> wrote:
Hi Vikrant and Abderrezak,

Please elaborate on your applications' use case for Tx power change. Do you want to use a build time custom Tx power setting or runtime dynamic update to Tx Power?

As there is no HCI command to update Tx power, except in Extended Advertising feature, it is important to define a Host API for a dynamic update well suited targeting an use case for legacy advertising and connections.
This will then need to define vendor specific HCI extensions to update the settings in the controller’s radio implementations.

Regards,
Vinayak

On 4 Jun 2018, at 19:28, Abderrezak Mekkaoui <ab.mekka@...> wrote:

Hi All,

I have the same issue. This is clearly an app variable imho.
Thanks

Abderrezak


On 6/4/2018 9:45 AM, vikrant8051 wrote:
Hi,

If anyone want to edit tx power of #nRF52840_PDK, then have to edit two file ..
1) $zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c: L5882
2)  $zephyr/subsys/bluetooth/controller/ll_sw/ll_test.c: L189

which are part of Bluetooth Stack.

How to modify TX power at APP level (after reboot or in middle of firmware execution) ?
Is it possible to use some configuration parameter for it ?

Thank You !!





Re: [Zephyr-users] [Zephyr-devel] How to change Bluetooth default TX power ?

Chettimada, Vinayak Kariappa
 

Hi Vikrant and Abderrezak,

Please elaborate on your applications' use case for Tx power change. Do you want to use a build time custom Tx power setting or runtime dynamic update to Tx Power?

As there is no HCI command to update Tx power, except in Extended Advertising feature, it is important to define a Host API for a dynamic update well suited targeting an use case for legacy advertising and connections.
This will then need to define vendor specific HCI extensions to update the settings in the controller’s radio implementations.

Regards,
Vinayak

On 4 Jun 2018, at 19:28, Abderrezak Mekkaoui <ab.mekka@...> wrote:

Hi All,

I have the same issue. This is clearly an app variable imho.
Thanks

Abderrezak


On 6/4/2018 9:45 AM, vikrant8051 wrote:
Hi,

If anyone want to edit tx power of #nRF52840_PDK, then have to edit two file ..
1) $zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c: L5882
2)  $zephyr/subsys/bluetooth/controller/ll_sw/ll_test.c: L189

which are part of Bluetooth Stack.

How to modify TX power at APP level (after reboot or in middle of firmware execution) ?
Is it possible to use some configuration parameter for it ?

Thank You !!





Re: How to change Bluetooth default TX power ?

Abderrezak Mekkaoui <ab.mekka@...>
 

Hi All,

I have the same issue. This is clearly an app variable imho.
Thanks

Abderrezak


On 6/4/2018 9:45 AM, vikrant8051 wrote:
Hi,

If anyone want to edit tx power of #nRF52840_PDK, then have to edit two file ..
1) $zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c: L5882
2)  $zephyr/subsys/bluetooth/controller/ll_sw/ll_test.c: L189

which are part of Bluetooth Stack.

How to modify TX power at APP level (after reboot or in middle of firmware execution) ?
Is it possible to use some configuration parameter for it ?

Thank You !!




How to configure #NVS if #FCB in used for #BluetoothMesh ? #nvs #fcb #bluetoothmesh

vikrant8051 <vikrant8051@...>
 

Hi all,

I wanna use #NVS to save #BluetoothMesh Models states.

As per current implementation, #BluetoothMesh stack is using #FCB for persistent storage.

If I use #NVS (with default setting) along with #FCB, and try to save some data using it, then it pushes NODE into unprovisioned state. This should be because of overlapping.

Solution is to modify NVS's storage offset. For e.g.

#define NVS_STORAGE_OFFSET (FLASH_AREA_STORAGE_OFFSET - 4096)

But it will be not a good idea, if #DFU_OTA going to be part of project. Am i right ?

Do anyone have better solution ?

Thank You !!







How to change Bluetooth default TX power ?

vikrant8051 <vikrant8051@...>
 

Hi,

If anyone want to edit tx power of #nRF52840_PDK, then have to edit two file ..
1) $zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c: L5882
2)  $zephyr/subsys/bluetooth/controller/ll_sw/ll_test.c: L189

which are part of Bluetooth Stack.

How to modify TX power at APP level (after reboot or in middle of firmware execution) ?
Is it possible to use some configuration parameter for it ?

Thank You !!



Re: File exist error on settings_subsys_init

Carles Cufi
 

Hi Daniele,

 

Thanks for the suggested change.

Instead of sending a patch through the mailing list, could you open a pull request? It makes it simpler to discuss the change and it will be included if accepted.

It’s quite easy to send one via GitHub, you can find more details here: http://docs.zephyrproject.org/contribute/contribute_guidelines.html

 

Regards,

 

Carles

 

From: devel@... <devel@...> On Behalf Of Daniele
Sent: 04 June 2018 13:29
To: devel@...
Subject: [Zephyr-devel] File exist error on settings_subsys_init

 

Hello everyone,
Playing around the permanent storage of bluetooth settings, I think I found an issue in the settings subsystem.
Enabling the CONFIG_SETTINGS_FS option
If I restart my device after the settings has been saved on the flash I allways get the error -17 (EEXIST).
I think the issue comes from the settings_subsys_init() funtion in /subsys/settings/src/settings_init.c.
The fs_mkdir generate the error due to the fact that the setting folder already exist.
I think this error should be ignored.
So I have modified settings_subsys_init() this way:

@@ -115,6 +115,12 @@ int settings_subsys_init(void)
         * Must be called after root FS has been initialized.
         */
        err = fs_mkdir(CONFIG_SETTINGS_FS_DIR);
+    /*
+     * The following lines mask the file exist error.
+     */
+    if (err == -EEXIST) {
+        err = 0;
+    }

What do you think about?

Good day
Daniele


File exist error on settings_subsys_init

Daniele
 

Hello everyone,
Playing around the permanent storage of bluetooth settings, I think I found an issue in the settings subsystem.
Enabling the CONFIG_SETTINGS_FS option
If I restart my device after the settings has been saved on the flash I allways get the error -17 (EEXIST).
I think the issue comes from the settings_subsys_init() funtion in /subsys/settings/src/settings_init.c.
The fs_mkdir generate the error due to the fact that the setting folder already exist.
I think this error should be ignored.
So I have modified settings_subsys_init() this way:

@@ -115,6 +115,12 @@ int settings_subsys_init(void)
         * Must be called after root FS has been initialized.
         */
        err = fs_mkdir(CONFIG_SETTINGS_FS_DIR);
+    /*
+     * The following lines mask the file exist error.
+     */
+    if (err == -EEXIST) {
+        err = 0;
+    }

What do you think about?

Good day
Daniele


Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

vikrant8051 <vikrant8051@...>
 

Hi Andy,

commit 43553da9b2bb9e537185695899fb5184c3b17ebe
Author: Andy Ross <andrew.j.ross@...>
Date:   Thu May 31 11:13:49 2018 -0700

    kernel/sched: Fix preemption logic
   
    The should_preempt() code was catching some of the "unrunnable" cases
    but not all of them, opening the possibility of failing to preempt a
    just-pended thread and thus waking it up synchronously.  There are
    reports of this causing spin loops over k_poll() in the network stack
    work queues (see #8049).
   
    Note that the previous _is_dummy() call is folded into (the somewhat
    verbosely named) _is_thread_prevented_from_running(), and that the
    order of tests has been changed/optimized to hopefully catch common
    cases earlier.
   
    Suggested-by: Michael Scott <michael@...>
    Signed-off-by: Andy Ross <andrew.j.ross@...>

Is this what you are pointing?
It is there in my local repository.
May I now comment out line no. line no. 3318 of subsys/bluetooth/host/hci_core.c?

--------------------------------------------------------------------------------------------------------------------------------------

Could anybody help me to find out serious bugs in my PR:8101?


It is very simple & will help for testing. I am not interested in merging it, but
need a complete bug free/easy to test App which will help in such scenarios.

Thank You !!



On Sat, Jun 2, 2018 at 4:10 AM, Andy Ross <andrew.j.ross@...> wrote:
Vikrant8051 <vikrant8051@...> wrote:
> I commented line no. 3318 of subsys/bluetooth/host/hci_core.c i.e. //
> BT_ASSERT(buf);
>
> And after that everything is working perfectly normal.

I was pointed to this on IRC.  The symptom you've got there sounds a
lot like a scheduler mistake that got fixed yesterday, where
ostensibly-pended threads could be incorrectly swapped back in.  They
would then wake up (generally with an -EAGAIN return value from
_Swap()) and take whatever default action is approparite (like
returning a NULL value from the empty list), so it's a little subtle
to recognize as a bug and often "recoverable" by existing handling.

But it's a real bug.  Can you verify that you tree contains commit
43553da9b2bb9e5 and see if that was the same root cause?

There's at least one other report of instability after that merged,
but this definitely sounds like it might be your local problem.  I'm
trying to track this down locally, but alas our test suite passes, so
I'm hoping to get more information.

Andy


Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

Andy Ross
 

Vikrant8051 <vikrant8051@gmail.com> wrote:
I commented line no. 3318 of subsys/bluetooth/host/hci_core.c i.e. //
BT_ASSERT(buf);

And after that everything is working perfectly normal.
I was pointed to this on IRC. The symptom you've got there sounds a
lot like a scheduler mistake that got fixed yesterday, where
ostensibly-pended threads could be incorrectly swapped back in. They
would then wake up (generally with an -EAGAIN return value from
_Swap()) and take whatever default action is approparite (like
returning a NULL value from the empty list), so it's a little subtle
to recognize as a bug and often "recoverable" by existing handling.

But it's a real bug. Can you verify that you tree contains commit
43553da9b2bb9e5 and see if that was the same root cause?

There's at least one other report of instability after that merged,
but this definitely sounds like it might be your local problem. I'm
trying to track this down locally, but alas our test suite passes, so
I'm hoping to get more information.

Andy


Re: SODAQ One V3 porting

Henrik Brix Andersen
 

Hi Léonard

On 18 May 2018, at 11.56, Léonard Bise <leodido99@gmail.com> wrote:
I'm going to work on a project which is going to use the SODAQ One board (https://shop.sodaq.com/en/sodaq-one-eu-rn2483-v3.html).
Sweet.

In the supported hardware I see that the Adafruit Feather M0 Basic Prot is listed, which has this exact same microcontroller. I also read the Board Porting Guide and as I understand it basically I'd need to take the Adafruit configuration as a base and add these new components to the kconfiguration. All of the aspects related to the microcontroller are already there.
I did the port to the Adafruit Feather M0 Basic Proto. Let me know if I can help with the port for the SODAQ board.

In particular I'm also wondering how to handle the LoRa microchip, since Zephyr has no LoRaWAN stack what would be the best way to handle the porting of this part?
Perhaps a simple solution could be to just add a sample application using the LoRaWAN chip over UART from the application layer?

Best regards,
Brix
--
Henrik Brix Andersen


Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

vikrant8051 <vikrant8051@...>
 

Hi,


It is basically modified version of samples/bluetooth/mesh
as well as inspired from samples/boards/nrf52/mesh/onoff-app.

Thank You !!

On Fri, Jun 1, 2018 at 2:52 PM, vikrant8051 <vikrant8051@...> wrote:
Hi,

I commented line no. 3318 of subsys/bluetooth/host/hci_core.c i.e. // BT_ASSERT(buf);

And after that everything is working perfectly normal.

Thanks !!

On Thu, May 31, 2018 at 8:36 PM, vikrant8051 <vikrant8051@...> wrote:
Hi Carles,

I tried it with samples/boards/nrf52/mesh/onoff-app ....Here too, I faced kernel OOPS.
But in that case, occurrence frequency was very low.

I'm facing all these issues after 1.12.0-rc2 update. Previously, everything was working perfectly.

Let me again thoroughly go through with my code. 🤔

Thank You !!

On Thu, May 31, 2018 at 7:53 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please try to reproduce this with standard samples present in the Zephyr tree?

 

Thanks,

 

Carles

 

From: Vikrant More <vikrant8051@...>
Sent: 31 May 2018 16:13


To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi,

 

These are today's OOPS & Faults

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a7c4

==>  /home/vikrant/projects/zephyr/zephyr/include/net/buf.h:370

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a550

==> /home/vikrant/projects/zephyr/zephyr/subsys/net/buf.c:60

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x6e46

==> /home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/conn.c:1354

 

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x4ea8

==> /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/include/generated/syscalls/kernel.h:99

 

Thank You !!

 

On Wed, May 30, 2018 at 7:30 PM, Cufi, Carles <Carles.Cufi@...> wrote:

This is starting to look more and more like a memory corruption or kernel issue at this point.

I cannot reproduce this easily by running our standard Bluetooth samples, so I am a bit at a loss here. I will try to run a mesh sample to see if it fails in the same way.

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 13:05
To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi to all,

 

Suddenly get this non-stoppable FAULT

 

***** BUS FAULT *****
  Executing thread ID (thread): 0x20000220
  Faulting instruction address:  0x1c9a4
  Precise data bus error
  Address: 0xe5f7ffbe
Fatal fault in thread 0x20000220! Aborting.

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1c9a4

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/kernel/include/ksched.h:153

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

On Wed, May 30, 2018 at 4:20 PM, vikrant8051 <vikrant8051@...> wrote:

Hi Carles,

 

Now get these FAULT/OOPS,

 

***** MPU FAULT *****

  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Instruction Access Violation
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** Kernel OOPS! *****
Current thread ID = 0x20001eb0
Faulting instruction address = 0x14f10

Fatal fault in ISR! Spinning...

 

 

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x14f10

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:4702

 

 

Thanks !!

 

 

On Wed, May 30, 2018 at 4:11 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Thanks for looking into this. It seems like we do not get a buffer back from the command tx queue: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L3318

 

I have copied Luiz and Johan from Intel in case they know what the cause might be.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 12:31


To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

Input ->

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x5222

 

Output ->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3318

 

Thank You !!

 

On Wed, May 30, 2018 at 3:51 PM, Cufi, Carles <Carles.Cufi@...> wrote:

If you are using the Zephyr SDK:

 

path-to-zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e zephyr.elf <addr>

 

Carles

 

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 12:11
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I will but don't know, how to do that ?

 

 

On Wed, May 30, 2018 at 3:19 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please run addr2line with this address present in the error log: 0x5222?

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 11:29
To: devel@...; users@...
Subject: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hello World !!

 

Today after upgrading to v1.12.0-rc2, I'm getting following error while playing with sample code which is inspired from sample/bluetooth/mesh

 

 

[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [ERR] event_scan_prepare: assert: '!_radio.ticker_id_prepare' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x1b77e
Fatal fault in ISR! Spinning...

 

-------------------------------------------------------------------------------------------------------------------------

 

Sometime it completely hangs & nothing get displayed on debug terminal

 

-------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

 

 

 

 

 





Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

vikrant8051 <vikrant8051@...>
 

Hi,

I commented line no. 3318 of subsys/bluetooth/host/hci_core.c i.e. // BT_ASSERT(buf);

And after that everything is working perfectly normal.

Thanks !!

On Thu, May 31, 2018 at 8:36 PM, vikrant8051 <vikrant8051@...> wrote:
Hi Carles,

I tried it with samples/boards/nrf52/mesh/onoff-app ....Here too, I faced kernel OOPS.
But in that case, occurrence frequency was very low.

I'm facing all these issues after 1.12.0-rc2 update. Previously, everything was working perfectly.

Let me again thoroughly go through with my code. 🤔

Thank You !!

On Thu, May 31, 2018 at 7:53 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please try to reproduce this with standard samples present in the Zephyr tree?

 

Thanks,

 

Carles

 

From: Vikrant More <vikrant8051@...>
Sent: 31 May 2018 16:13


To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi,

 

These are today's OOPS & Faults

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a7c4

==>  /home/vikrant/projects/zephyr/zephyr/include/net/buf.h:370

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a550

==> /home/vikrant/projects/zephyr/zephyr/subsys/net/buf.c:60

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x6e46

==> /home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/conn.c:1354

 

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x4ea8

==> /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/include/generated/syscalls/kernel.h:99

 

Thank You !!

 

On Wed, May 30, 2018 at 7:30 PM, Cufi, Carles <Carles.Cufi@...> wrote:

This is starting to look more and more like a memory corruption or kernel issue at this point.

I cannot reproduce this easily by running our standard Bluetooth samples, so I am a bit at a loss here. I will try to run a mesh sample to see if it fails in the same way.

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 13:05
To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi to all,

 

Suddenly get this non-stoppable FAULT

 

***** BUS FAULT *****
  Executing thread ID (thread): 0x20000220
  Faulting instruction address:  0x1c9a4
  Precise data bus error
  Address: 0xe5f7ffbe
Fatal fault in thread 0x20000220! Aborting.

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1c9a4

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/kernel/include/ksched.h:153

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

On Wed, May 30, 2018 at 4:20 PM, vikrant8051 <vikrant8051@...> wrote:

Hi Carles,

 

Now get these FAULT/OOPS,

 

***** MPU FAULT *****

  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Instruction Access Violation
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** Kernel OOPS! *****
Current thread ID = 0x20001eb0
Faulting instruction address = 0x14f10

Fatal fault in ISR! Spinning...

 

 

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x14f10

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:4702

 

 

Thanks !!

 

 

On Wed, May 30, 2018 at 4:11 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Thanks for looking into this. It seems like we do not get a buffer back from the command tx queue: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L3318

 

I have copied Luiz and Johan from Intel in case they know what the cause might be.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 12:31


To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

Input ->

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x5222

 

Output ->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3318

 

Thank You !!

 

On Wed, May 30, 2018 at 3:51 PM, Cufi, Carles <Carles.Cufi@...> wrote:

If you are using the Zephyr SDK:

 

path-to-zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e zephyr.elf <addr>

 

Carles

 

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 12:11
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I will but don't know, how to do that ?

 

 

On Wed, May 30, 2018 at 3:19 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please run addr2line with this address present in the error log: 0x5222?

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 11:29
To: devel@...; users@...
Subject: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hello World !!

 

Today after upgrading to v1.12.0-rc2, I'm getting following error while playing with sample code which is inspired from sample/bluetooth/mesh

 

 

[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [ERR] event_scan_prepare: assert: '!_radio.ticker_id_prepare' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x1b77e
Fatal fault in ISR! Spinning...

 

-------------------------------------------------------------------------------------------------------------------------

 

Sometime it completely hangs & nothing get displayed on debug terminal

 

-------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

 

 

 

 

 




Re: Serial Wire Output (SWO) console support

Carles Cufi
 

+ Krzysztof +Piotr

 

From: <devel@...> on behalf of Ryan Erickson <ryan.erickson@...>
Date: Thursday, 31 May 2018 at 23:58
To: "devel@..." <devel@...>
Subject: [Zephyr-devel] Serial Wire Output (SWO) console support

 

I had a look around and couldn't find any support for SWO?  Is it supported?  If not, are there plans to add SWO console output similar to how you can use RTT instead of the UART?


Re: BLE synchronization

Daniel Widmann
 

Hi Carles,

Thanks a lot for the pointers! After digging around a bit, I found a hack that allows to block the current thread until an ACK was received:

* I reduced CONFIG_BT_ATT_TX_MAX to 1
* After the GATT write I want to synchronize, I did a second GATT write (to an invalid handle).

The second GATT write call will block until the first tx request has been completed. Which happens roughly at the same time the GATT write callback is triggered on the peripheral. 
I ran into a bug during disconnects (I created https://github.com/zephyrproject-rtos/zephyr/issues/8083). After commenting out a memset, it seems to work pretty well.

Cheers,
Daniel


On Tue, May 29, 2018 at 1:56 AM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Daniel,

 

Whether a reply is sent in the same connection event really depends on timing between the RX and TX paths, and right now I doubt we can process it in the TIFS 150us window as you point out.

I will defer this question to Vinayak who should be able to give you more info in the matter. He is on holiday for the next week or so so please be patient.

 

Regarding the callback on TX/ACK, this has been asked in GitHub issues, so please add your comments there:

https://github.com/zephyrproject-rtos/zephyr/issues/7659

https://github.com/zephyrproject-rtos/zephyr/issues/7654

 

Regards,

 

Carles

 

From: devel@... <devel@...> On Behalf Of Daniel Widmann
Sent: 28 May 2018 18:27
To: devel@...
Subject: [Zephyr-devel] BLE synchronization

 

Hello there,

 

I want to synchronize an event between a BLE Central and Peripheral with an accuracy of ~1ms. Both devices use a NRF52832 with zephyr. 

 

Using the normal GATT API, there is a significant delay between the API call and the callback on the other side. I believe this happens because zephyr has to wait until the next connection event to send/receive a packet. Even the shortest connection interval (7.5 ms) is too long for what I need.

 

Is it possible for a zephyr peripheral to send a reply within the same connection event? The standard seems to allow this and I think it would solve my problem. But I am not sure if zephyr can reply within 150 us (see https://stackoverflow.com/questions/42560906/).

 

Is it possible to get a callback when a BLE request was sent or the ack was received?

 

 

Thanks,

 

Daniel 



Serial Wire Output (SWO) console support

Ryan Erickson
 

I had a look around and couldn't find any support for SWO?  Is it supported?  If not, are there plans to add SWO console output similar to how you can use RTT instead of the UART?


Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

Carles Cufi
 

Hi Vikrant,

 

OK in that case I will try to run the onoff mesh app to see if I can reproduce at all.

 

Thanks for the help in debugging this.

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 31 May 2018 17:06
To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I tried it with samples/boards/nrf52/mesh/onoff-app ....Here too, I faced kernel OOPS.

But in that case, occurrence frequency was very low.

 

I'm facing all these issues after 1.12.0-rc2 update. Previously, everything was working perfectly.

 

Let me again thoroughly go through with my code. 🤔

 

Thank You !!

 

On Thu, May 31, 2018 at 7:53 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please try to reproduce this with standard samples present in the Zephyr tree?

 

Thanks,

 

Carles

 

From: Vikrant More <vikrant8051@...>
Sent: 31 May 2018 16:13


To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi,

 

These are today's OOPS & Faults

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a7c4

==>  /home/vikrant/projects/zephyr/zephyr/include/net/buf.h:370

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a550

==> /home/vikrant/projects/zephyr/zephyr/subsys/net/buf.c:60

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x6e46

==> /home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/conn.c:1354

 

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x4ea8

==> /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/include/generated/syscalls/kernel.h:99

 

Thank You !!

 

On Wed, May 30, 2018 at 7:30 PM, Cufi, Carles <Carles.Cufi@...> wrote:

This is starting to look more and more like a memory corruption or kernel issue at this point.

I cannot reproduce this easily by running our standard Bluetooth samples, so I am a bit at a loss here. I will try to run a mesh sample to see if it fails in the same way.

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 13:05
To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi to all,

 

Suddenly get this non-stoppable FAULT

 

***** BUS FAULT *****
  Executing thread ID (thread): 0x20000220
  Faulting instruction address:  0x1c9a4
  Precise data bus error
  Address: 0xe5f7ffbe
Fatal fault in thread 0x20000220! Aborting.

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1c9a4

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/kernel/include/ksched.h:153

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

On Wed, May 30, 2018 at 4:20 PM, vikrant8051 <vikrant8051@...> wrote:

Hi Carles,

 

Now get these FAULT/OOPS,

 

***** MPU FAULT *****

  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Instruction Access Violation
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** Kernel OOPS! *****
Current thread ID = 0x20001eb0
Faulting instruction address = 0x14f10

Fatal fault in ISR! Spinning...

 

 

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x14f10

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:4702

 

 

Thanks !!

 

 

On Wed, May 30, 2018 at 4:11 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Thanks for looking into this. It seems like we do not get a buffer back from the command tx queue: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L3318

 

I have copied Luiz and Johan from Intel in case they know what the cause might be.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 12:31


To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

Input ->

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x5222

 

Output ->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3318

 

Thank You !!

 

On Wed, May 30, 2018 at 3:51 PM, Cufi, Carles <Carles.Cufi@...> wrote:

If you are using the Zephyr SDK:

 

path-to-zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e zephyr.elf <addr>

 

Carles

 

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 12:11
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I will but don't know, how to do that ?

 

 

On Wed, May 30, 2018 at 3:19 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please run addr2line with this address present in the error log: 0x5222?

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 11:29
To: devel@...; users@...
Subject: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hello World !!

 

Today after upgrading to v1.12.0-rc2, I'm getting following error while playing with sample code which is inspired from sample/bluetooth/mesh

 

 

[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [ERR] event_scan_prepare: assert: '!_radio.ticker_id_prepare' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x1b77e
Fatal fault in ISR! Spinning...

 

-------------------------------------------------------------------------------------------------------------------------

 

Sometime it completely hangs & nothing get displayed on debug terminal

 

-------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

 

 

 

 

 

 


Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

vikrant8051 <vikrant8051@...>
 

Hi Carles,

I tried it with samples/boards/nrf52/mesh/onoff-app ....Here too, I faced kernel OOPS.
But in that case, occurrence frequency was very low.

I'm facing all these issues after 1.12.0-rc2 update. Previously, everything was working perfectly.

Let me again thoroughly go through with my code. 🤔

Thank You !!

On Thu, May 31, 2018 at 7:53 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please try to reproduce this with standard samples present in the Zephyr tree?

 

Thanks,

 

Carles

 

From: Vikrant More <vikrant8051@...>
Sent: 31 May 2018 16:13


To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi,

 

These are today's OOPS & Faults

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a7c4

==>  /home/vikrant/projects/zephyr/zephyr/include/net/buf.h:370

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a550

==> /home/vikrant/projects/zephyr/zephyr/subsys/net/buf.c:60

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x6e46

==> /home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/conn.c:1354

 

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x4ea8

==> /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/include/generated/syscalls/kernel.h:99

 

Thank You !!

 

On Wed, May 30, 2018 at 7:30 PM, Cufi, Carles <Carles.Cufi@...> wrote:

This is starting to look more and more like a memory corruption or kernel issue at this point.

I cannot reproduce this easily by running our standard Bluetooth samples, so I am a bit at a loss here. I will try to run a mesh sample to see if it fails in the same way.

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 13:05
To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi to all,

 

Suddenly get this non-stoppable FAULT

 

***** BUS FAULT *****
  Executing thread ID (thread): 0x20000220
  Faulting instruction address:  0x1c9a4
  Precise data bus error
  Address: 0xe5f7ffbe
Fatal fault in thread 0x20000220! Aborting.

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1c9a4

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/kernel/include/ksched.h:153

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

On Wed, May 30, 2018 at 4:20 PM, vikrant8051 <vikrant8051@...> wrote:

Hi Carles,

 

Now get these FAULT/OOPS,

 

***** MPU FAULT *****

  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Instruction Access Violation
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** Kernel OOPS! *****
Current thread ID = 0x20001eb0
Faulting instruction address = 0x14f10

Fatal fault in ISR! Spinning...

 

 

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x14f10

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:4702

 

 

Thanks !!

 

 

On Wed, May 30, 2018 at 4:11 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Thanks for looking into this. It seems like we do not get a buffer back from the command tx queue: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L3318

 

I have copied Luiz and Johan from Intel in case they know what the cause might be.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 12:31


To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

Input ->

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x5222

 

Output ->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3318

 

Thank You !!

 

On Wed, May 30, 2018 at 3:51 PM, Cufi, Carles <Carles.Cufi@...> wrote:

If you are using the Zephyr SDK:

 

path-to-zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e zephyr.elf <addr>

 

Carles

 

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 12:11
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I will but don't know, how to do that ?

 

 

On Wed, May 30, 2018 at 3:19 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please run addr2line with this address present in the error log: 0x5222?

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 11:29
To: devel@...; users@...
Subject: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hello World !!

 

Today after upgrading to v1.12.0-rc2, I'm getting following error while playing with sample code which is inspired from sample/bluetooth/mesh

 

 

[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [ERR] event_scan_prepare: assert: '!_radio.ticker_id_prepare' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x1b77e
Fatal fault in ISR! Spinning...

 

-------------------------------------------------------------------------------------------------------------------------

 

Sometime it completely hangs & nothing get displayed on debug terminal

 

-------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

 

 

 

 

 



Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

Carles Cufi
 

Hi Vikrant,

 

Can you please try to reproduce this with standard samples present in the Zephyr tree?

 

Thanks,

 

Carles

 

From: Vikrant More <vikrant8051@...>
Sent: 31 May 2018 16:13
To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi,

 

These are today's OOPS & Faults

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a7c4

==>  /home/vikrant/projects/zephyr/zephyr/include/net/buf.h:370

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a550

==> /home/vikrant/projects/zephyr/zephyr/subsys/net/buf.c:60

 

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x6e46

==> /home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/conn.c:1354

 

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x4ea8

==> /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/include/generated/syscalls/kernel.h:99

 

Thank You !!

 

On Wed, May 30, 2018 at 7:30 PM, Cufi, Carles <Carles.Cufi@...> wrote:

This is starting to look more and more like a memory corruption or kernel issue at this point.

I cannot reproduce this easily by running our standard Bluetooth samples, so I am a bit at a loss here. I will try to run a mesh sample to see if it fails in the same way.

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 13:05
To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi to all,

 

Suddenly get this non-stoppable FAULT

 

***** BUS FAULT *****
  Executing thread ID (thread): 0x20000220
  Faulting instruction address:  0x1c9a4
  Precise data bus error
  Address: 0xe5f7ffbe
Fatal fault in thread 0x20000220! Aborting.

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1c9a4

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/kernel/include/ksched.h:153

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

On Wed, May 30, 2018 at 4:20 PM, vikrant8051 <vikrant8051@...> wrote:

Hi Carles,

 

Now get these FAULT/OOPS,

 

***** MPU FAULT *****

  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Instruction Access Violation
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** Kernel OOPS! *****
Current thread ID = 0x20001eb0
Faulting instruction address = 0x14f10

Fatal fault in ISR! Spinning...

 

 

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x14f10

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:4702

 

 

Thanks !!

 

 

On Wed, May 30, 2018 at 4:11 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Thanks for looking into this. It seems like we do not get a buffer back from the command tx queue: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L3318

 

I have copied Luiz and Johan from Intel in case they know what the cause might be.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 12:31


To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

Input ->

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x5222

 

Output ->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3318

 

Thank You !!

 

On Wed, May 30, 2018 at 3:51 PM, Cufi, Carles <Carles.Cufi@...> wrote:

If you are using the Zephyr SDK:

 

path-to-zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e zephyr.elf <addr>

 

Carles

 

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 12:11
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I will but don't know, how to do that ?

 

 

On Wed, May 30, 2018 at 3:19 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please run addr2line with this address present in the error log: 0x5222?

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 11:29
To: devel@...; users@...
Subject: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hello World !!

 

Today after upgrading to v1.12.0-rc2, I'm getting following error while playing with sample code which is inspired from sample/bluetooth/mesh

 

 

[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [ERR] event_scan_prepare: assert: '!_radio.ticker_id_prepare' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x1b77e
Fatal fault in ISR! Spinning...

 

-------------------------------------------------------------------------------------------------------------------------

 

Sometime it completely hangs & nothing get displayed on debug terminal

 

-------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

 

 

 

 

 

3361 - 3380 of 8033