You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Krishna Badam <Kr...@imgtec.com> on 2018/02/05 12:55:51 UTC

Having trouble with bletiny on ubuntu 17.10 arch X86_64

Hi Mynewt Team,

I am facing issues with execution of 'bletiny' on my machine. Can you please help me in coming out this hurdle.

BT Dongle(CSR 4.0):
----------------------
$lsusb
Bus 002 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Desktop Details:
----------------------
OS: Ubuntu 17.10
Os type: 64-bit
Processor: Intel® Core™ i5-2400 CPU @ 3.10GHz × 4
gcc version:  gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
$ uname -a
Linux user-OptiPlex-790 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


Followed steps provided for apt-get method at https://mynewt.apache.org/latest/newt/install/newt_linux/  (Method 1 of section 'Installing the Latest Release of Newt from a Binary Package')

NEWT Details:
--------------------
mynewt version: latest

newt version: Apache Newt version: 1.3.0

$newt target show
targets/bleprph
    app=@apache-mynewt-core/apps/bleprph
    bsp=@apache-mynewt-core/hw/bsp/native
    build_profile=debug
targets/bletiny
    app=@apache-mynewt-core/apps/bletiny
    bsp=@apache-mynewt-core/hw/bsp/native
    build_profile=debug
targets/my_blinky_sim
    app=apps/blinky
    bsp=@apache-mynewt-core/hw/bsp/native
    build_profile=debug


After building bletiny at the time of execution getting below backtrace:
============================================
(gdb) bt
#0  0xf7fd5db9 in __kernel_vsyscall ()
#1  0xf7d4b352 in raise () from /lib32/libc.so.6
#2  0xf7d4ca51 in abort () from /lib32/libc.so.6
#3  0xf7d43525 in ?? () from /lib32/libc.so.6
#4  0xf7d435ab in __assert_fail () from /lib32/libc.so.6
#5  0x56567a2e in os_eventq_get (evq=0x565f38cc <g_ble_ll_data+12>) at repos/apache-mynewt-core/kernel/os/src/os_eventq.c:141
#6  0x56567b87 in os_eventq_run (evq=0x565f38cc <g_ble_ll_data+12>) at repos/apache-mynewt-core/kernel/os/src/os_eventq.c:175
#7  0x5656d261 in ble_ll_task (arg=0x0) at repos/apache-mynewt-core/net/nimble/controller/src/ble_ll.c:1030
#8  0x5656bb8e in sim_task_start (sf=0x565f3b84 <g_ble_ll_stack+196>, rc=1) at repos/apache-mynewt-core/kernel/sim/src/sim_sched_gen.c:172
#9  0x56566125 in os_arch_task_start (sf=0x565f3b84 <g_ble_ll_stack+196>, rc=1) at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch.c:33
#10 0x565a3860 in os_arch_frame_init () at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch_stack_frame.s:98
#11 0x565a3860 in os_arch_frame_init () at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch_stack_frame.s:98
============================

NOTE:
Modified BLE_LL_PRIO value from 0 to 3, to make execution proceed(file:repos/apache-mynewt-core/net/nimble/controller/syscfg.yml).

Please let me know if you want any further details to corner out this issue.

Thanks & Regards,
Krishna B

Re: Having trouble with bletiny on ubuntu 17.10 arch X86_64

Posted by Christopher Collins <ch...@runtime.io>.
Hi Krishna,

Did you see my response on Feb 5?  I am including here in case you
didn't get it.  Let me know if you still have questions.

------

Hi Krishna,

Thanks for the report; I see the same behavior.  The problem is that
both the BLE controller task and the UART poller task use the same task
priority: 0.  A few things:

1. The bletiny app has been superseded by the btshell app.  Both apps
serve the same purpose, but btshell is more up-to-date and has more
features.

2. The nimble controller really isn't meant to run in sim (i.e.,
hw/bsp/native).  It builds, but that is just to enable unit tests to
run.  If you want to use that dongle as your Bluetooth controller,
you'll need to switch to btshell, and then make a change to your
target's configuration:

    newt target append <target-name>
syscfg=BLE_HCI_TRANSPORT_NIMBLE_BUILTIN=0:BLE_HCI_TRANSPORT_SOCKET=1

This disables the built-in controller, and configures the target to
communicate with your dongle via a Linux Bluetooth socket.

3. Just an observation: we need to fix some packages.  All task
priorities should be specified with `type: 'task_priority'`.  That way,
newt will complain about conflicting priorities at build time.

Chris


On Mon, Feb 05, 2018 at 12:55:51PM +0000, Krishna Badam wrote:
> Hi Mynewt Team,
> 
> I am facing issues with execution of 'bletiny' on my machine. Can you please help me in coming out this hurdle.
> 
> BT Dongle(CSR 4.0):
> ----------------------
> $lsusb
> Bus 002 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
> 
> Desktop Details:
> ----------------------
> OS: Ubuntu 17.10
> Os type: 64-bit
> Processor: Intel® Core™ i5-2400 CPU @ 3.10GHz × 4
> gcc version:  gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
> $ uname -a
> Linux user-OptiPlex-790 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
> 
> 
> Followed steps provided for apt-get method at https://mynewt.apache.org/latest/newt/install/newt_linux/  (Method 1 of section 'Installing the Latest Release of Newt from a Binary Package')
> 
> NEWT Details:
> --------------------
> mynewt version: latest
> 
> newt version: Apache Newt version: 1.3.0
> 
> $newt target show
> targets/bleprph
>     app=@apache-mynewt-core/apps/bleprph
>     bsp=@apache-mynewt-core/hw/bsp/native
>     build_profile=debug
> targets/bletiny
>     app=@apache-mynewt-core/apps/bletiny
>     bsp=@apache-mynewt-core/hw/bsp/native
>     build_profile=debug
> targets/my_blinky_sim
>     app=apps/blinky
>     bsp=@apache-mynewt-core/hw/bsp/native
>     build_profile=debug
> 
> 
> After building bletiny at the time of execution getting below backtrace:
> ============================================
> (gdb) bt
> #0  0xf7fd5db9 in __kernel_vsyscall ()
> #1  0xf7d4b352 in raise () from /lib32/libc.so.6
> #2  0xf7d4ca51 in abort () from /lib32/libc.so.6
> #3  0xf7d43525 in ?? () from /lib32/libc.so.6
> #4  0xf7d435ab in __assert_fail () from /lib32/libc.so.6
> #5  0x56567a2e in os_eventq_get (evq=0x565f38cc <g_ble_ll_data+12>) at repos/apache-mynewt-core/kernel/os/src/os_eventq.c:141
> #6  0x56567b87 in os_eventq_run (evq=0x565f38cc <g_ble_ll_data+12>) at repos/apache-mynewt-core/kernel/os/src/os_eventq.c:175
> #7  0x5656d261 in ble_ll_task (arg=0x0) at repos/apache-mynewt-core/net/nimble/controller/src/ble_ll.c:1030
> #8  0x5656bb8e in sim_task_start (sf=0x565f3b84 <g_ble_ll_stack+196>, rc=1) at repos/apache-mynewt-core/kernel/sim/src/sim_sched_gen.c:172
> #9  0x56566125 in os_arch_task_start (sf=0x565f3b84 <g_ble_ll_stack+196>, rc=1) at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch.c:33
> #10 0x565a3860 in os_arch_frame_init () at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch_stack_frame.s:98
> #11 0x565a3860 in os_arch_frame_init () at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch_stack_frame.s:98
> ============================
> 
> NOTE:
> Modified BLE_LL_PRIO value from 0 to 3, to make execution proceed(file:repos/apache-mynewt-core/net/nimble/controller/syscfg.yml).
> 
> Please let me know if you want any further details to corner out this issue.
> 
> Thanks & Regards,
> Krishna B

Re: Having trouble with bletiny on ubuntu 17.10 arch X86_64

Posted by Christopher Collins <ch...@runtime.io>.
Hi Krishna,

Thanks for the report; I see the same behavior.  The problem is that
both the BLE controller task and the UART poller task use the same task
priority: 0.  A few things:

1. The bletiny app has been superseded by the btshell app.  Both apps
serve the same purpose, but btshell is more up-to-date and has more
features.

2. The nimble controller really isn't meant to run in sim (i.e.,
hw/bsp/native).  It builds, but that is just to enable unit tests to
run.  If you want to use that dongle as your Bluetooth controller,
you'll need to switch to btshell, and then make a change to your
target's configuration:

    newt target append <target-name> syscfg=BLE_HCI_TRANSPORT_NIMBLE_BUILTIN=0:BLE_HCI_TRANSPORT_SOCKET=1

This disables the built-in controller, and configures the target to
communicate with your dongle via a Linux Bluetooth socket.

3. Just an observation: we need to fix some packages.  All task
priorities should be specified with `type: 'task_priority'`.  That way,
newt will complain about conflicting priorities at build time.

Chris

On Mon, Feb 05, 2018 at 12:55:51PM +0000, Krishna Badam wrote:
> Hi Mynewt Team,
> 
> I am facing issues with execution of 'bletiny' on my machine. Can you please help me in coming out this hurdle.
> 
> BT Dongle(CSR 4.0):
> ----------------------
> $lsusb
> Bus 002 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
> 
> Desktop Details:
> ----------------------
> OS: Ubuntu 17.10
> Os type: 64-bit
> Processor: Intel® Core™ i5-2400 CPU @ 3.10GHz × 4
> gcc version:  gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
> $ uname -a
> Linux user-OptiPlex-790 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
> 
> 
> Followed steps provided for apt-get method at https://mynewt.apache.org/latest/newt/install/newt_linux/  (Method 1 of section 'Installing the Latest Release of Newt from a Binary Package')
> 
> NEWT Details:
> --------------------
> mynewt version: latest
> 
> newt version: Apache Newt version: 1.3.0
> 
> $newt target show
> targets/bleprph
>     app=@apache-mynewt-core/apps/bleprph
>     bsp=@apache-mynewt-core/hw/bsp/native
>     build_profile=debug
> targets/bletiny
>     app=@apache-mynewt-core/apps/bletiny
>     bsp=@apache-mynewt-core/hw/bsp/native
>     build_profile=debug
> targets/my_blinky_sim
>     app=apps/blinky
>     bsp=@apache-mynewt-core/hw/bsp/native
>     build_profile=debug
> 
> 
> After building bletiny at the time of execution getting below backtrace:
> ============================================
> (gdb) bt
> #0  0xf7fd5db9 in __kernel_vsyscall ()
> #1  0xf7d4b352 in raise () from /lib32/libc.so.6
> #2  0xf7d4ca51 in abort () from /lib32/libc.so.6
> #3  0xf7d43525 in ?? () from /lib32/libc.so.6
> #4  0xf7d435ab in __assert_fail () from /lib32/libc.so.6
> #5  0x56567a2e in os_eventq_get (evq=0x565f38cc <g_ble_ll_data+12>) at repos/apache-mynewt-core/kernel/os/src/os_eventq.c:141
> #6  0x56567b87 in os_eventq_run (evq=0x565f38cc <g_ble_ll_data+12>) at repos/apache-mynewt-core/kernel/os/src/os_eventq.c:175
> #7  0x5656d261 in ble_ll_task (arg=0x0) at repos/apache-mynewt-core/net/nimble/controller/src/ble_ll.c:1030
> #8  0x5656bb8e in sim_task_start (sf=0x565f3b84 <g_ble_ll_stack+196>, rc=1) at repos/apache-mynewt-core/kernel/sim/src/sim_sched_gen.c:172
> #9  0x56566125 in os_arch_task_start (sf=0x565f3b84 <g_ble_ll_stack+196>, rc=1) at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch.c:33
> #10 0x565a3860 in os_arch_frame_init () at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch_stack_frame.s:98
> #11 0x565a3860 in os_arch_frame_init () at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch_stack_frame.s:98
> ============================
> 
> NOTE:
> Modified BLE_LL_PRIO value from 0 to 3, to make execution proceed(file:repos/apache-mynewt-core/net/nimble/controller/syscfg.yml).
> 
> Please let me know if you want any further details to corner out this issue.
> 
> Thanks & Regards,
> Krishna B

RE: Having trouble with bletiny on ubuntu 17.10 arch X86_64

Posted by Krishna Badam <Kr...@imgtec.com>.
Hi Mynewt Team,

Can you please give a comment on this thread.

Thanks & Regards,
Krishna B
________________________________
From: Krishna Badam
Sent: Monday, February 05, 2018 6:25 PM
To: dev@mynewt.incubator.apache.org
Subject: Having trouble with bletiny on ubuntu 17.10 arch X86_64

Hi Mynewt Team,

I am facing issues with execution of 'bletiny' on my machine. Can you please help me in coming out this hurdle.

BT Dongle(CSR 4.0):
----------------------
$lsusb
Bus 002 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Desktop Details:
----------------------
OS: Ubuntu 17.10
Os type: 64-bit
Processor: Intel® Core™ i5-2400 CPU @ 3.10GHz × 4
gcc version:  gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
$ uname -a
Linux user-OptiPlex-790 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


Followed steps provided for apt-get method at https://mynewt.apache.org/latest/newt/install/newt_linux/  (Method 1 of section 'Installing the Latest Release of Newt from a Binary Package')

NEWT Details:
--------------------
mynewt version: latest

newt version: Apache Newt version: 1.3.0

$newt target show
targets/bleprph
    app=@apache-mynewt-core/apps/bleprph
    bsp=@apache-mynewt-core/hw/bsp/native
    build_profile=debug
targets/bletiny
    app=@apache-mynewt-core/apps/bletiny
    bsp=@apache-mynewt-core/hw/bsp/native
    build_profile=debug
targets/my_blinky_sim
    app=apps/blinky
    bsp=@apache-mynewt-core/hw/bsp/native
    build_profile=debug


After building bletiny at the time of execution getting below backtrace:
============================================
(gdb) bt
#0  0xf7fd5db9 in __kernel_vsyscall ()
#1  0xf7d4b352 in raise () from /lib32/libc.so.6
#2  0xf7d4ca51 in abort () from /lib32/libc.so.6
#3  0xf7d43525 in ?? () from /lib32/libc.so.6
#4  0xf7d435ab in __assert_fail () from /lib32/libc.so.6
#5  0x56567a2e in os_eventq_get (evq=0x565f38cc <g_ble_ll_data+12>) at repos/apache-mynewt-core/kernel/os/src/os_eventq.c:141
#6  0x56567b87 in os_eventq_run (evq=0x565f38cc <g_ble_ll_data+12>) at repos/apache-mynewt-core/kernel/os/src/os_eventq.c:175
#7  0x5656d261 in ble_ll_task (arg=0x0) at repos/apache-mynewt-core/net/nimble/controller/src/ble_ll.c:1030
#8  0x5656bb8e in sim_task_start (sf=0x565f3b84 <g_ble_ll_stack+196>, rc=1) at repos/apache-mynewt-core/kernel/sim/src/sim_sched_gen.c:172
#9  0x56566125 in os_arch_task_start (sf=0x565f3b84 <g_ble_ll_stack+196>, rc=1) at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch.c:33
#10 0x565a3860 in os_arch_frame_init () at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch_stack_frame.s:98
#11 0x565a3860 in os_arch_frame_init () at repos/apache-mynewt-core/kernel/os/src/arch/sim/os_arch_stack_frame.s:98
============================

NOTE:
Modified BLE_LL_PRIO value from 0 to 3, to make execution proceed(file:repos/apache-mynewt-core/net/nimble/controller/syscfg.yml).

Please let me know if you want any further details to corner out this issue.

Thanks & Regards,
Krishna B