Date   

Re: [Zephyr-devel] 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 !!



echo_client / echo_server ttl

Diana Rivera
 

Hello,

I am currently working on an OpenThread app based on the echo_client and echo_server. I am currently trying to use the hop-limit field by setting it as follows:

In the echo_client udp.c file:
static void send_udp_data(struct net_app_ctx *ctx, struct data *data)
{
    struct net_pkt *pkt;
    size_t len;
    int ret;

    data->expecting_udp = ipsum_len;

    pkt = prepare_send_pkt(ctx, data->proto, &data->expecting_udp);
    if (!pkt) {
        return;
    }
   
    net_pkt_set_ipv6_hop_limit(pkt, 8);
    NET_INFO("Hop limit set to: %d", net_pkt_ipv6_hop_limit(pkt));
    len = net_pkt_get_len(pkt);


    NET_ASSERT_INFO(data->expecting_udp == len,
            "Data to send %d bytes, real len %zu",
            data->expecting_udp, len);

    ret = net_app_send_pkt(ctx, pkt, NULL, 0, K_FOREVER,
                   UINT_TO_POINTER(len));
    if (ret < 0) {
        NET_ERR("Cannot send %s data to peer (%d)", data->proto, ret);

        net_pkt_unref(pkt);
    }

    k_delayed_work_submit(&data->recv, WAIT_TIME);
}

In the echo_server udp.c:

struct net_pkt *build_reply_pkt(const char *name,
                struct net_app_ctx *ctx,
                struct net_pkt *pkt)
{
    struct net_pkt *reply_pkt;
    struct net_buf *frag, *tmp;
    int header_len = 0, recv_len, reply_len;
    u8_t *ptr = net_pkt_appdata(pkt);
    // hop_lim = pkt->ipv6_hop_limit;
    // hop_lim = net_pkt_ipv6_hop_limit(pkt);

    NET_INFO("Application message received: %s, hop limit: %d\n", ptr, net_pkt_ipv6_hop_limit(pkt));
    NET_INFO("%s received %d bytes", name, net_pkt_appdatalen(pkt));


    if (net_pkt_appdatalen(pkt) == 0) {
        return NULL;
    }

    reply_pkt = net_app_get_net_pkt(ctx, net_pkt_family(pkt), K_FOREVER);

    NET_ASSERT(reply_pkt);
    NET_ASSERT(net_pkt_family(reply_pkt) == net_pkt_family(pkt));

    recv_len = net_pkt_get_len(pkt);

    tmp = pkt->frags;

    /* If we have link layer headers, then get rid of them here. */
    if (recv_len != net_pkt_appdatalen(pkt)) {
        /* First fragment will contain IP header so move the data
         * down in order to get rid of it.
         */
        header_len = net_pkt_appdata(pkt) - tmp->data;

        NET_ASSERT(header_len < CONFIG_NET_BUF_DATA_SIZE);

        /* After this pull, the tmp->data points directly to application
         * data.
         */
        net_buf_pull(tmp, header_len);
    }

    net_pkt_set_appdatalen(reply_pkt, net_pkt_appdatalen(pkt));

    while (tmp) {
        frag = net_app_get_net_buf(ctx, reply_pkt, K_FOREVER);

        if (net_buf_headroom(tmp) == 0) {
            /* If there is no link layer headers in the
             * received fragment, then get rid of that also
             * in the sending fragment. We end up here
             * if MTU is larger than fragment size, this
             * is typical for ethernet.
             */
            net_buf_push(frag, net_buf_headroom(frag));

            frag->len = 0; /* to make fragment empty */

            /* Make sure to set the reserve so that
             * in sending side we add the link layer
             * header if needed.
             */
            net_pkt_set_ll_reserve(reply_pkt, 0);
        }

        NET_ASSERT_INFO(net_buf_tailroom(frag) >= tmp->len,
                "tail %zd longer than len %d",
                net_buf_tailroom(frag), tmp->len);

        memcpy(net_buf_add(frag, tmp->len), tmp->data, tmp->len);

        tmp = net_pkt_frag_del(pkt, NULL, tmp);
    }

    reply_len = net_pkt_get_len(reply_pkt);

    NET_ASSERT_INFO((recv_len - header_len) == reply_len,
            "Received %d bytes, sending %d bytes",
            recv_len - header_len, reply_len);

    return reply_pkt;
}

On the client side, I'm able to observe that the hop limit has been set to 8; however, by the time I read the hop limit field at the server, this value returns zero, instead of having decreased by just 1 as expected.
Am I making a mistake in the way I'm using the   net_pkt_set_ipv6_hop_limit and   net_pkt_ipv6_hop_limit functions? Or is there another way to be able to use the hop limit field in OT?

Thank you in advance for your answer,
Diana


Re: offsets.c:25:24: fatal error: gen_offset.h: No such file or directory #stm32

Carles Cufi
 

Hi  Stefan,

 

Your logs suggest something is wrong with Kconfig or dtc, but I cannot reproduce it. I copied the hello_world folder into ZEPHYR_BASE/mysample and then built it for nucleo_f412zg without any issues at all. I notice that you are not invoking cmake with -DBOARD= nucleo_f412zg, can you try with that? I ran:

 

carles@zweck ~/src/zephyr/mysample/b (master)

$ cmake -DBOARD=nucleo_f412zg ..

 

Regards,

 

Carles

 

 

From: <users@...> on behalf of Stefan Jaritz <stefan@...>
Date: Friday, 1 June 2018 at 18:34
To: "users@..." <users@...>
Subject: [Zephyr-users] offsets.c:25:24: fatal error: gen_offset.h: No such file or directory #stm32

 

[Edited Message Follows]

Hej

I am new to Zephyr. I checkout the latest version on the master branch (1.12.0-rc2). I created an own board for a custom PCB based on the nucleo_f412zg board. I put up a simple hello world program by copying it from the sample folder.

It worked the last time when. After getting to the latest version I got following error:

zephyr/arch/arm/core/offsets/offsets.c:25:24: fatal error: gen_offset.h: No such file or directory
 #include <gen_offset.h>
                        ^
compilation terminated.
ninja: build stopped: subcommand failed.

Any ideas what went wrong?

Stefan

PS: same error occur when using the nucleo eval board and a sample app (blink led)

stefan@stefan-UX550VD:~/zephyr/hpfw/build$ cmake ..
CMake Deprecation Warning at /home/stefan/zephyr/cmake/app/boilerplate.cmake:38 (cmake_policy):
  The OLD behavior for policy CMP0000 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)


-- Selected BOARD nucleo_f412zg
Zephyr version: 1.12.0
Parsing Kconfig tree in /home/stefan/zephyr/Kconfig
Using /home/stefan/zephyr/boards/arm/nucleo_f412zg/nucleo_f412zg_defconfig as base
Merging /home/stefan/zephyr/hpfw/prj.conf
fatal: No names found, cannot describe anything.
-- Generating zephyr/include/generated/generated_dts_board.h
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart3@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart3@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart2@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart2@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@2 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart6@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@2 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /gpio_keys/button@0 has a unit name, but no reg property
extract_dts_includes.py: Merge of 'title': 'STM32 OTGFS'  overwrites 'USB Base Structure'.
extract_dts_includes.py: Merge of 'description': 'This binding gives a base representation of the STM32 OTGFS controller
'  overwrites 'This binding gives the base structures for all USB devices
'.
extract_dts_includes.py: Merge of 'node_type': '['USB-EP', 'USB']'  overwrites '['USB']'.
extract_dts_includes.py: Merge of 'description': 'Clock gate control information'  overwrites 'Clock gate information'.
-- Cache files will be written to: /home/stefan/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stefan/zephyr/hpfw/build


offsets.c:25:24: fatal error: gen_offset.h: No such file or directory #stm32

Stefan Jaritz
 
Edited

Hej

I am new to Zephyr. I checkout the latest version on the master branch (1.12.0-rc2). I created an own board for a custom PCB based on the nucleo_f412zg board. I put up a simple hello world program by copying it from the sample folder.

It worked the last time when. After getting to the latest version I got following error:

zephyr/arch/arm/core/offsets/offsets.c:25:24: fatal error: gen_offset.h: No such file or directory
 #include <gen_offset.h>
                        ^
compilation terminated.
ninja: build stopped: subcommand failed.

Any ideas what went wrong?

Stefan

PS: same error occur when using the nucleo eval board and a sample app (blink led)

stefan@stefan-UX550VD:~/zephyr/hpfw/build$ ninja
[0/1] Re-running CMake...
CMake Deprecation Warning at /home/stefan/zephyr/cmake/app/boilerplate.cmake:38 (cmake_policy):
  The OLD behavior for policy CMP0000 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)


-- Selected BOARD nucleo_f412zg
Zephyr version: 1.12.0
Parsing Kconfig tree in /home/stefan/zephyr/Kconfig
Using /home/stefan/zephyr/hpfw/build/zephyr/.config as base
fatal: No names found, cannot describe anything.
-- Generating zephyr/include/generated/generated_dts_board.h
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart3@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart3@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart2@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart2@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart1@2 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /soc/pin-controller@40020000/usart6@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@0 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@1 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@2 has a unit name, but no reg property
nucleo_f412zg.dts_compiled: Warning (unit_address_vs_reg): Node /gpio_keys/button@0 has a unit name, but no reg property
extract_dts_includes.py: Merge of 'title': 'STM32 OTGFS'  overwrites 'USB Base Structure'.
extract_dts_includes.py: Merge of 'description': 'This binding gives a base representation of the STM32 OTGFS controller
'  overwrites 'This binding gives the base structures for all USB devices
'.
extract_dts_includes.py: Merge of 'node_type': '['USB-EP', 'USB']'  overwrites '['USB']'.
extract_dts_includes.py: Merge of 'description': 'Clock gate control information'  overwrites 'Clock gate information'.
-- Cache files will be written to: /home/stefan/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stefan/zephyr/hpfw/build
[1/116] Generating always_rebuild
Building for board nucleo_f412zg
[7/116] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
FAILED: zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
ccache /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc -DKERNEL -DSTM32F412Zx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -I../../kernel/include -I../../arch/arm/include -I../../arch/arm/soc/st_stm32/stm32f4 -I../../arch/arm/soc/st_stm32/stm32f4/include -I../../arch/arm/soc/st_stm32/include -I../../boards/arm/nucleo_f412zg -I../../include -I../../include/drivers -Izephyr/include/generated -isystem /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/lib/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/include -isystem /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/lib/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/include-fixed -I../../drivers -I../../lib/libc/minimal/include -I../../ext/hal/cmsis/Include -I../../ext/hal/st/stm32cube/stm32f4xx/soc -I../../ext/hal/st/stm32cube/stm32f4xx/drivers/include -I../../ext/hal/st/stm32cube/stm32f4xx/drivers/include/Legacy -Os -g -Wall -Wformat -Wformat-security -Wno-format-zero-length -imacros /home/stefan/zephyr/hpfw/build/zephyr/include/generated/autoconf.h -ffreestanding -Wno-main --sysroot /opt/zephyr-sdk/sysroots/armv5-zephyr-eabi/usr -mthumb -mcpu=cortex-m4 -std=c99 -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -Wno-pointer-sign -Wno-unused-but-set-variable -fno-reorder-functions -fno-defer-pop -Werror=implicit-int -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -MD -MT zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj   -c /home/stefan/zephyr/arch/arm/core/offsets/offsets.c
/home/stefan/zephyr/arch/arm/core/offsets/offsets.c:25:24: fatal error: gen_offset.h: No such file or directory
 #include <gen_offset.h>
                        ^
compilation terminated.
ninja: build stopped: subcommand failed.


Re: [Zephyr-devel] [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-devel] [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: [Zephyr-devel] [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-devel] [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-devel] [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 !!

 

 

 

 

 

 

 

 

 

 


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

vikrant8051 <vikrant8051@...>
 

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-devel] cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

vikrant8051 <vikrant8051@...>
 

Hi,
I re-downloaded entire git repository & now it works for me !!

On Thu, May 31, 2018 at 7:07 PM, vikrant8051 <vikrant8051@...> wrote:
Hi,
But I'm facing this error just after updating to latest version of zephyr which I did just an half hour ago.

Thank You !!

On Thu, May 31, 2018 at 7:02 PM, Bøe, Sebastian <Sebastian.Boe@...> wrote:
https://stackoverflow.com/questions/47081317/zephyr-cmake-error
________________________________________
From: devel@... <devel@...> on behalf of vikrant8051 <vikrant8051@...>
Sent: Thursday, 31 May 2018 3:20:09 PM
To: devel@...; users@...
Subject: [Zephyr-devel] cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

Hi,

After executing,
cmake -DBOARD=nrf52840_pca10056 ..

I got following error ...
(tried it with samples/bluetooth/mesh as well as samples/basic/blink_led/build)
-------------------------------------------------------------------------------------------------------------------------

CMake Error at CMakeLists.txt:1 (include):
  include could not find load file:

    /cmake/app/boilerplate.cmake


-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/vikrant/projects/zephyr/zephyr/samples/basic/blink_led/build/CMakeFiles/CMakeOutput.log".


Thank You !!




Re: [Zephyr-devel] cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

vikrant8051 <vikrant8051@...>
 

Hi,
But I'm facing this error just after updating to latest version of zephyr which I did just an half hour ago.

Thank You !!

On Thu, May 31, 2018 at 7:02 PM, Bøe, Sebastian <Sebastian.Boe@...> wrote:
https://stackoverflow.com/questions/47081317/zephyr-cmake-error
________________________________________
From: devel@... <devel@...> on behalf of vikrant8051 <vikrant8051@...>
Sent: Thursday, 31 May 2018 3:20:09 PM
To: devel@...; users@...
Subject: [Zephyr-devel] cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

Hi,

After executing,
cmake -DBOARD=nrf52840_pca10056 ..

I got following error ...
(tried it with samples/bluetooth/mesh as well as samples/basic/blink_led/build)
-------------------------------------------------------------------------------------------------------------------------

CMake Error at CMakeLists.txt:1 (include):
  include could not find load file:

    /cmake/app/boilerplate.cmake


-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/vikrant/projects/zephyr/zephyr/samples/basic/blink_led/build/CMakeFiles/CMakeOutput.log".


Thank You !!



Re: [Zephyr-devel] cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

Bøe, Sebastian <Sebastian.Boe@...>
 

https://stackoverflow.com/questions/47081317/zephyr-cmake-error
________________________________________
From: devel@... <devel@...> on behalf of vikrant8051 <vikrant8051@...>
Sent: Thursday, 31 May 2018 3:20:09 PM
To: devel@...; users@...
Subject: [Zephyr-devel] cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

Hi,

After executing,
cmake -DBOARD=nrf52840_pca10056 ..

I got following error ...
(tried it with samples/bluetooth/mesh as well as samples/basic/blink_led/build)
-------------------------------------------------------------------------------------------------------------------------

CMake Error at CMakeLists.txt:1 (include):
include could not find load file:

/cmake/app/boilerplate.cmake


-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (target_sources):
Cannot specify sources for target "app" which is not built by this project.


CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.5)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/vikrant/projects/zephyr/zephyr/samples/basic/blink_led/build/CMakeFiles/CMakeOutput.log".


Thank You !!


cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

vikrant8051 <vikrant8051@...>
 

Hi,

After executing,
cmake -DBOARD=nrf52840_pca10056 ..

I got following error ...
(tried it with samples/bluetooth/mesh as well as samples/basic/blink_led/build)
-------------------------------------------------------------------------------------------------------------------------

CMake Error at CMakeLists.txt:1 (include):
  include could not find load file:

    /cmake/app/boilerplate.cmake


-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/vikrant/projects/zephyr/zephyr/samples/basic/blink_led/build/CMakeFiles/CMakeOutput.log".


Thank You !!


Re: Unable to set Static Address on nRF52 using Zephyr v1.11.0

Gurpreet Singh <gurpreet@...>
 

That worked. Thanks Carles! 

-Gurpreet 

On Wed, May 30, 2018 at 7:23 AM, Gurpreet Singh <gurpreet@...> wrote:
Ah perfect. I must've missed this when perusing the documentation. 
I'll try this out today. Thanks! 

Gurpreet 



On May 30, 2018, at 07:13, Cufi, Carles <Carles.Cufi@...> wrote:

Well, I am not sure if it will be an issue or not, I was just suggesting changes since  I cannot reproduce the issue myself.

If you have your own OUI then you need to set and use a public address, not a random static one. To set a public address you need to use a Vendor Specific command:

https://github.com/zephyrproject-rtos/zephyr/blob/master/doc/subsystems/bluetooth/hci.txt#L408

 

I believe you can do that with “hcitool cmd”, which allows you to send an arbitrary HCI command to the controller.

 

From: Gurpreet Singh <gurpreet@...>
Sent: 30 May 2018 16:09
To: Cufi, Carles <carles.cufi@...>
Cc: users@...
Subject: Re: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi Carles

 

Hmmm. I can try disabling my laptop's Bluetooth and attempt this again. 

But would that mean, when I have my actual boards, this won't be an issue?

 

Also, based on what you're saying, however, is there no way to specifically assign an address of my choosing? We have our own OUI, and want to use that for the implementation. 

 

Gurpreet 


On May 30, 2018, at 06:52, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Gurpreet,

 

I do not know why you get that behavior. Typically BlueZ should detect that this is an LE-only controller with no public address and would assign one to it.

Maybe it’s because you seem to have more than one controller? you are using hci1 on your btmgmt log.

 

I just tested this locally by doing:

 

sudo btattach -B /dev/ttyACM0 -S 1000000 -P h4

Attaching Primary controller to /dev/ttyACM0

Switched line discipline from 0 to 15

Device index 0 attached

 

and then:

 

$ sudo btmgmt --index 0

[hci0]# auto-power

Found controller with index 0

[hci0]# advertising on

hci0 Set Advertising complete, settings: powered bondable le advertising secure-conn static-addr

 

And in btmon it clearly set a random static address:

 

@ MGMT Command: Set Advertising (0x0029) plen 1                                           {0x0004} [hci0] 123.901998

        Advertising: Enabled (0x01)

< HCI Command: LE Set Scan Response Data (0x08|0x0009) plen 32                                 #77 [hci0] 123.902018

        Length: 13

        Name (complete): zephyr-nrf

> HCI Event: Command Complete (0x0e) plen 4                                                    #78 [hci0] 123.904563

      LE Set Scan Response Data (0x08|0x0009) ncmd 1

        Status: Success (0x00)

< HCI Command: LE Set Random Address (0x08|0x0005) plen 6                                      #79 [hci0] 123.904604

        Address: 32:82:D4:FE:B2:0F (Non-Resolvable)

> HCI Event: Command Complete (0x0e) plen 4                                                    #80 [hci0] 123.906514

      LE Set Random Address (0x08|0x0005) ncmd 1

        Status: Success (0x00)

< HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15                             #81 [hci0] 123.906548

        Min advertising interval: 1280.000 msec (0x0800)

        Max advertising interval: 1280.000 msec (0x0800)

        Type: Non connectable undirected - ADV_NONCONN_IND (0x03)

        Own address type: Random (0x01)

        Direct address type: Public (0x00)

        Direct address: 00:00:00:00:00:00 (OUI 00-00-00)

        Channel map: 37, 38, 39 (0x07)

        Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00)

> HCI Event: Command Complete (0x0e) plen 4                                                    #82 [hci0] 123.907511

      LE Set Advertising Parameters (0x08|0x0006) ncmd 1

        Status: Success (0x00)

< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                    #83 [hci0] 123.907569

        Advertising: Enabled (0x01)

> HCI Event: Command Complete (0x0e) plen 4                                                    #84 [hci0] 123.909506

      LE Set Advertise Enable (0x08|0x000a) ncmd 1

        Status: Success (0x00)

 

 

From: Gurpreet Singh <gurpreet@...>
Sent: 30 May 2018 14:32
To: Cufi, Carles <carles.cufi@...>
Cc: users@...
Subject: Re: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi Carles

 

Yes. I've been doing that but the Mac address comes up as all zeroes. Which is my original  problem. 

So how do I set a Mac address? Or why is it all zeroes? 

 

Gurpreet 

 


On May 30, 2018, at 03:43, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Gurpreet,

 

If you are using BlueZ 5.48 then, as stated in the instructions you don’t need to set the static address manually.

Instead you should just do:

 

sudo btmgmt --index 0

[hci0]# auto-power

 

Regards,

 

Carles

 

From: Gurpreet Singh <gurpreet@...>
Sent: 29 May 2018 19:51
To: Cufi, Carles <carles.cufi@...>
Cc: users@...
Subject: Re: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi Carles,

 

I should have mentioned that I did see those instructions at zephyr and have already updated my  /lib/systemd/system/bluetooth.service file. 

Thats the only real change I've noticed between the blog instructions and the zephyr instructions. 

 

Is there something else that I need to do as well? 

 

Gurpreet 

 

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

Hi there,

 

If you are using a recent version of BlueZ then the sequence that you need to do is different from what’s on that blog post.

Here are updated instructions:

 

http://docs.zephyrproject.org/subsystems/bluetooth/devel.html#using-bluez-with-zephyr

http://docs.zephyrproject.org/subsystems/bluetooth/devel.html#testing-zephyr-based-controllers-with-bluez

 

I will update the blog post to reflect this since I see it’s still being used as a reference.

 

Carles

 

From: users@... <users@...> On Behalf Of Gurpreet Singh
Sent: 28 May 2018 18:40
To: users@...
Subject: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi,

I've been chugging along nicely with Zephyr v1.11.0 and the nRF52DK so far, being able to get it to scan and advertise using the hci_uart sample code and my Linux (ubuntu) computer. 

My linux is on BlueZ 5.48 and kernel ​4.15.0-22. This setup is just to get the ball rolling until we get sample boards from our manufacturer. 


I have run into an issue where setting the address on the chip is being rejected. 

I came across this post in the forum, but have been unable to find any clean resolution for it. 

For advertisements, you can see the all zero source mac address in the attached PCAP. 

Interestingly, the same error persists even when following the blog post on how to use the BLE controller with linux's BlueZ. (Step 5 in particular) ​

--- btmgmt
[hci1]# static-addr FF:02:03:04:05:FF
Set static address failed with status 0x0b (Rejected)
[hci1]#

--- btmon
@ MGMT Command: Set Static Address (0x002b) plen 6 {0x0004} [hci1] 9585.454699
Address: FF:02:03:04:05:FF (Static)
@ MGMT Event: Command Status (0x0002) plen 3 {0x0004} [hci1] 9585.454706
Set Static Address (0x002b)
Status: Rejected (0x0b)

To bring up the chip, I ran:

~ 11:49:30>sudo btattach -B /dev/ttyACM0 -S 1000000 -P h4
Attaching Primary controller to /dev/ttyACM0
Switched line discipline from 0 to 15
Device index 1 attached

The btmon log after this is in the attached txt file. 

Do you have any tips or suggestions on what I could do? 
Essentially, I would like to be able to program the BLE chip with a MAC address that uses the Mist OUI. 

Thanks in advance,

Gurpreet 

 

 

--

 

 

Gurpreet Singh

 

Member of Technical Staff

 

Mist Systems

 

 

e:

gurpreet@...   w:  www.mist.com

 

Sign up for a live demo of the world's first Virtual Network Assistant. Join Demo!

 

 

 



 




--
Gurpreet Singh
Member of Technical Staff
Mist Systems

e:gurpreet@...   w:  www.mist.com
Sign up for a live demo of the world's first Virtual Network Assistant. Join Demo!


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

Boie, Andrew P
 

What board is this on? Check for stack overflow, on devices with NXP MPUs these get reported as bus faults.

 

Andrew

 

From: users@... [mailto:users@...] On Behalf Of Cufi, Carles
Sent: Wednesday, May 30, 2018 7:00 AM
To: Vikrant More <vikrant8051@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Hedberg, Johan <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

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: Unable to set Static Address on nRF52 using Zephyr v1.11.0

Gurpreet Singh <gurpreet@...>
 

Ah perfect. I must've missed this when perusing the documentation. 
I'll try this out today. Thanks! 

Gurpreet 


On May 30, 2018, at 07:13, Cufi, Carles <Carles.Cufi@...> wrote:

Well, I am not sure if it will be an issue or not, I was just suggesting changes since  I cannot reproduce the issue myself.

If you have your own OUI then you need to set and use a public address, not a random static one. To set a public address you need to use a Vendor Specific command:

https://github.com/zephyrproject-rtos/zephyr/blob/master/doc/subsystems/bluetooth/hci.txt#L408

 

I believe you can do that with “hcitool cmd”, which allows you to send an arbitrary HCI command to the controller.

 

From: Gurpreet Singh <gurpreet@...>
Sent: 30 May 2018 16:09
To: Cufi, Carles <carles.cufi@...>
Cc: users@...
Subject: Re: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi Carles

 

Hmmm. I can try disabling my laptop's Bluetooth and attempt this again. 

But would that mean, when I have my actual boards, this won't be an issue?

 

Also, based on what you're saying, however, is there no way to specifically assign an address of my choosing? We have our own OUI, and want to use that for the implementation. 

 

Gurpreet 


On May 30, 2018, at 06:52, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Gurpreet,

 

I do not know why you get that behavior. Typically BlueZ should detect that this is an LE-only controller with no public address and would assign one to it.

Maybe it’s because you seem to have more than one controller? you are using hci1 on your btmgmt log.

 

I just tested this locally by doing:

 

sudo btattach -B /dev/ttyACM0 -S 1000000 -P h4

Attaching Primary controller to /dev/ttyACM0

Switched line discipline from 0 to 15

Device index 0 attached

 

and then:

 

$ sudo btmgmt --index 0

[hci0]# auto-power

Found controller with index 0

[hci0]# advertising on

hci0 Set Advertising complete, settings: powered bondable le advertising secure-conn static-addr

 

And in btmon it clearly set a random static address:

 

@ MGMT Command: Set Advertising (0x0029) plen 1                                           {0x0004} [hci0] 123.901998

        Advertising: Enabled (0x01)

< HCI Command: LE Set Scan Response Data (0x08|0x0009) plen 32                                 #77 [hci0] 123.902018

        Length: 13

        Name (complete): zephyr-nrf

> HCI Event: Command Complete (0x0e) plen 4                                                    #78 [hci0] 123.904563

      LE Set Scan Response Data (0x08|0x0009) ncmd 1

        Status: Success (0x00)

< HCI Command: LE Set Random Address (0x08|0x0005) plen 6                                      #79 [hci0] 123.904604

        Address: 32:82:D4:FE:B2:0F (Non-Resolvable)

> HCI Event: Command Complete (0x0e) plen 4                                                    #80 [hci0] 123.906514

      LE Set Random Address (0x08|0x0005) ncmd 1

        Status: Success (0x00)

< HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15                             #81 [hci0] 123.906548

        Min advertising interval: 1280.000 msec (0x0800)

        Max advertising interval: 1280.000 msec (0x0800)

        Type: Non connectable undirected - ADV_NONCONN_IND (0x03)

        Own address type: Random (0x01)

        Direct address type: Public (0x00)

        Direct address: 00:00:00:00:00:00 (OUI 00-00-00)

        Channel map: 37, 38, 39 (0x07)

        Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00)

> HCI Event: Command Complete (0x0e) plen 4                                                    #82 [hci0] 123.907511

      LE Set Advertising Parameters (0x08|0x0006) ncmd 1

        Status: Success (0x00)

< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                    #83 [hci0] 123.907569

        Advertising: Enabled (0x01)

> HCI Event: Command Complete (0x0e) plen 4                                                    #84 [hci0] 123.909506

      LE Set Advertise Enable (0x08|0x000a) ncmd 1

        Status: Success (0x00)

 

 

From: Gurpreet Singh <gurpreet@...>
Sent: 30 May 2018 14:32
To: Cufi, Carles <carles.cufi@...>
Cc: users@...
Subject: Re: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi Carles

 

Yes. I've been doing that but the Mac address comes up as all zeroes. Which is my original  problem. 

So how do I set a Mac address? Or why is it all zeroes? 

 

Gurpreet 

 


On May 30, 2018, at 03:43, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Gurpreet,

 

If you are using BlueZ 5.48 then, as stated in the instructions you don’t need to set the static address manually.

Instead you should just do:

 

sudo btmgmt --index 0

[hci0]# auto-power

 

Regards,

 

Carles

 

From: Gurpreet Singh <gurpreet@...>
Sent: 29 May 2018 19:51
To: Cufi, Carles <carles.cufi@...>
Cc: users@...
Subject: Re: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi Carles,

 

I should have mentioned that I did see those instructions at zephyr and have already updated my  /lib/systemd/system/bluetooth.service file. 

Thats the only real change I've noticed between the blog instructions and the zephyr instructions. 

 

Is there something else that I need to do as well? 

 

Gurpreet 

 

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

Hi there,

 

If you are using a recent version of BlueZ then the sequence that you need to do is different from what’s on that blog post.

Here are updated instructions:

 

http://docs.zephyrproject.org/subsystems/bluetooth/devel.html#using-bluez-with-zephyr

http://docs.zephyrproject.org/subsystems/bluetooth/devel.html#testing-zephyr-based-controllers-with-bluez

 

I will update the blog post to reflect this since I see it’s still being used as a reference.

 

Carles

 

From: users@... <users@...> On Behalf Of Gurpreet Singh
Sent: 28 May 2018 18:40
To: users@...
Subject: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi,

I've been chugging along nicely with Zephyr v1.11.0 and the nRF52DK so far, being able to get it to scan and advertise using the hci_uart sample code and my Linux (ubuntu) computer. 

My linux is on BlueZ 5.48 and kernel ​4.15.0-22. This setup is just to get the ball rolling until we get sample boards from our manufacturer. 


I have run into an issue where setting the address on the chip is being rejected. 

I came across this post in the forum, but have been unable to find any clean resolution for it. 

For advertisements, you can see the all zero source mac address in the attached PCAP. 

Interestingly, the same error persists even when following the blog post on how to use the BLE controller with linux's BlueZ. (Step 5 in particular) ​

--- btmgmt
[hci1]# static-addr FF:02:03:04:05:FF
Set static address failed with status 0x0b (Rejected)
[hci1]#

--- btmon
@ MGMT Command: Set Static Address (0x002b) plen 6 {0x0004} [hci1] 9585.454699
Address: FF:02:03:04:05:FF (Static)
@ MGMT Event: Command Status (0x0002) plen 3 {0x0004} [hci1] 9585.454706
Set Static Address (0x002b)
Status: Rejected (0x0b)

To bring up the chip, I ran:

~ 11:49:30>sudo btattach -B /dev/ttyACM0 -S 1000000 -P h4
Attaching Primary controller to /dev/ttyACM0
Switched line discipline from 0 to 15
Device index 1 attached

The btmon log after this is in the attached txt file. 

Do you have any tips or suggestions on what I could do? 
Essentially, I would like to be able to program the BLE chip with a MAC address that uses the Mist OUI. 

Thanks in advance,

Gurpreet 

 

 

--

 

 

Gurpreet Singh

 

Member of Technical Staff

 

Mist Systems

 

 

e:

gurpreet@...   w:  www.mist.com

 

Sign up for a live demo of the world's first Virtual Network Assistant. Join Demo!

 

 

 



 


Re: Unable to set Static Address on nRF52 using Zephyr v1.11.0

Carles Cufi
 

Well, I am not sure if it will be an issue or not, I was just suggesting changes since  I cannot reproduce the issue myself.

If you have your own OUI then you need to set and use a public address, not a random static one. To set a public address you need to use a Vendor Specific command:

https://github.com/zephyrproject-rtos/zephyr/blob/master/doc/subsystems/bluetooth/hci.txt#L408

 

I believe you can do that with “hcitool cmd”, which allows you to send an arbitrary HCI command to the controller.

 

From: Gurpreet Singh <gurpreet@...>
Sent: 30 May 2018 16:09
To: Cufi, Carles <carles.cufi@...>
Cc: users@...
Subject: Re: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi Carles

 

Hmmm. I can try disabling my laptop's Bluetooth and attempt this again. 

But would that mean, when I have my actual boards, this won't be an issue?

 

Also, based on what you're saying, however, is there no way to specifically assign an address of my choosing? We have our own OUI, and want to use that for the implementation. 

 

Gurpreet 


On May 30, 2018, at 06:52, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Gurpreet,

 

I do not know why you get that behavior. Typically BlueZ should detect that this is an LE-only controller with no public address and would assign one to it.

Maybe it’s because you seem to have more than one controller? you are using hci1 on your btmgmt log.

 

I just tested this locally by doing:

 

sudo btattach -B /dev/ttyACM0 -S 1000000 -P h4

Attaching Primary controller to /dev/ttyACM0

Switched line discipline from 0 to 15

Device index 0 attached

 

and then:

 

$ sudo btmgmt --index 0

[hci0]# auto-power

Found controller with index 0

[hci0]# advertising on

hci0 Set Advertising complete, settings: powered bondable le advertising secure-conn static-addr

 

And in btmon it clearly set a random static address:

 

@ MGMT Command: Set Advertising (0x0029) plen 1                                           {0x0004} [hci0] 123.901998

        Advertising: Enabled (0x01)

< HCI Command: LE Set Scan Response Data (0x08|0x0009) plen 32                                 #77 [hci0] 123.902018

        Length: 13

        Name (complete): zephyr-nrf

> HCI Event: Command Complete (0x0e) plen 4                                                    #78 [hci0] 123.904563

      LE Set Scan Response Data (0x08|0x0009) ncmd 1

        Status: Success (0x00)

< HCI Command: LE Set Random Address (0x08|0x0005) plen 6                                      #79 [hci0] 123.904604

        Address: 32:82:D4:FE:B2:0F (Non-Resolvable)

> HCI Event: Command Complete (0x0e) plen 4                                                    #80 [hci0] 123.906514

      LE Set Random Address (0x08|0x0005) ncmd 1

        Status: Success (0x00)

< HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15                             #81 [hci0] 123.906548

        Min advertising interval: 1280.000 msec (0x0800)

        Max advertising interval: 1280.000 msec (0x0800)

        Type: Non connectable undirected - ADV_NONCONN_IND (0x03)

        Own address type: Random (0x01)

        Direct address type: Public (0x00)

        Direct address: 00:00:00:00:00:00 (OUI 00-00-00)

        Channel map: 37, 38, 39 (0x07)

        Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00)

> HCI Event: Command Complete (0x0e) plen 4                                                    #82 [hci0] 123.907511

      LE Set Advertising Parameters (0x08|0x0006) ncmd 1

        Status: Success (0x00)

< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                    #83 [hci0] 123.907569

        Advertising: Enabled (0x01)

> HCI Event: Command Complete (0x0e) plen 4                                                    #84 [hci0] 123.909506

      LE Set Advertise Enable (0x08|0x000a) ncmd 1

        Status: Success (0x00)

 

 

From: Gurpreet Singh <gurpreet@...>
Sent: 30 May 2018 14:32
To: Cufi, Carles <carles.cufi@...>
Cc: users@...
Subject: Re: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi Carles

 

Yes. I've been doing that but the Mac address comes up as all zeroes. Which is my original  problem. 

So how do I set a Mac address? Or why is it all zeroes? 

 

Gurpreet 

 


On May 30, 2018, at 03:43, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Gurpreet,

 

If you are using BlueZ 5.48 then, as stated in the instructions you don’t need to set the static address manually.

Instead you should just do:

 

sudo btmgmt --index 0

[hci0]# auto-power

 

Regards,

 

Carles

 

From: Gurpreet Singh <gurpreet@...>
Sent: 29 May 2018 19:51
To: Cufi, Carles <carles.cufi@...>
Cc: users@...
Subject: Re: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi Carles,

 

I should have mentioned that I did see those instructions at zephyr and have already updated my  /lib/systemd/system/bluetooth.service file. 

Thats the only real change I've noticed between the blog instructions and the zephyr instructions. 

 

Is there something else that I need to do as well? 

 

Gurpreet 

 

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

Hi there,

 

If you are using a recent version of BlueZ then the sequence that you need to do is different from what’s on that blog post.

Here are updated instructions:

 

http://docs.zephyrproject.org/subsystems/bluetooth/devel.html#using-bluez-with-zephyr

http://docs.zephyrproject.org/subsystems/bluetooth/devel.html#testing-zephyr-based-controllers-with-bluez

 

I will update the blog post to reflect this since I see it’s still being used as a reference.

 

Carles

 

From: users@... <users@...> On Behalf Of Gurpreet Singh
Sent: 28 May 2018 18:40
To: users@...
Subject: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0

 

Hi,

I've been chugging along nicely with Zephyr v1.11.0 and the nRF52DK so far, being able to get it to scan and advertise using the hci_uart sample code and my Linux (ubuntu) computer. 

My linux is on BlueZ 5.48 and kernel ​4.15.0-22. This setup is just to get the ball rolling until we get sample boards from our manufacturer. 


I have run into an issue where setting the address on the chip is being rejected. 

I came across this post in the forum, but have been unable to find any clean resolution for it. 

For advertisements, you can see the all zero source mac address in the attached PCAP. 

Interestingly, the same error persists even when following the blog post on how to use the BLE controller with linux's BlueZ. (Step 5 in particular) ​

--- btmgmt
[hci1]# static-addr FF:02:03:04:05:FF
Set static address failed with status 0x0b (Rejected)
[hci1]#

--- btmon
@ MGMT Command: Set Static Address (0x002b) plen 6 {0x0004} [hci1] 9585.454699
Address: FF:02:03:04:05:FF (Static)
@ MGMT Event: Command Status (0x0002) plen 3 {0x0004} [hci1] 9585.454706
Set Static Address (0x002b)
Status: Rejected (0x0b)

To bring up the chip, I ran:

~ 11:49:30>sudo btattach -B /dev/ttyACM0 -S 1000000 -P h4
Attaching Primary controller to /dev/ttyACM0
Switched line discipline from 0 to 15
Device index 1 attached

The btmon log after this is in the attached txt file. 

Do you have any tips or suggestions on what I could do? 
Essentially, I would like to be able to program the BLE chip with a MAC address that uses the Mist OUI. 

Thanks in advance,

Gurpreet 

 

 

--

 

 

Gurpreet Singh

 

Member of Technical Staff

 

Mist Systems

 

 

e:

gurpreet@...   w:  www.mist.com

 

Sign up for a live demo of the world's first Virtual Network Assistant. Join Demo!

 

 

 



 

2181 - 2200 of 3031