Nimble error?
I have tried the bleprph and bleuart and both fail at this point in the
ble_hci_ram.c
assert(ble_hci_ram_rx_cmd_ll_cb != NULL);
Either I'm missing a setting or maybe an error in Nimble
/////////////////////This is the whole trace////////////////////////////////
#12 0x08020b30 in os_eventq_run (evq=<optimized out>) at
repos/apache-mynewt-core/kernel/os/src/os_eventq.c:162
162 ev->ev_cb(ev);
(gdb)
#11 0x08025c12 in ble_hs_event_start (ev=<optimized out>) at
repos/apache-mynewt-nimble/nimble/host/src/ble_hs.c:498
498 rc = ble_hs_start();
(gdb)
#10 0x08025bf6 in ble_hs_start () at
repos/apache-mynewt-nimble/nimble/host/src/ble_hs.c:563
563 ble_hs_sync();
(gdb)
#9 0x08025966 in ble_hs_sync () at
repos/apache-mynewt-nimble/nimble/host/src/ble_hs.c:325
325 rc = ble_hs_startup_go();
(gdb)
#8 0x0802800e in ble_hs_startup_go () at
repos/apache-mynewt-nimble/nimble/host/src/ble_hs_startup.c:341
341 rc = ble_hs_startup_reset_tx();
(gdb)
#7 0x08027d52 in ble_hs_startup_reset_tx () at
repos/apache-mynewt-nimble/nimble/host/src/ble_hs_startup.c:326
326 rc =
ble_hs_hci_cmd_tx_empty_ack(BLE_HCI_OP(BLE_HCI_OGF_CTLR_BASEBAND,
(gdb)
#6 0x0802696a in ble_hs_hci_cmd_tx_empty_ack (opcode=opcode@entry=3075,
cmd=cmd@entry=0x0,
cmd_len=cmd_len@entry=0 '\000') at
repos/apache-mynewt-nimble/nimble/host/src/ble_hs_hci.c:332
332 rc = ble_hs_hci_cmd_tx(opcode, cmd, cmd_len, NULL, 0, NULL);
(gdb)
#5 0x08026906 in ble_hs_hci_cmd_tx (opcode=<optimized out>, cmd=cmd@entry=0x0,
cmd_len=<optimized out>,
evt_buf=evt_buf@entry=0x0, evt_buf_len=evt_buf_len@entry=0 '\000',
out_evt_buf_len=out_evt_buf_len@entry=0x0)
at repos/apache-mynewt-nimble/nimble/host/src/ble_hs_hci.c:294
294 rc = ble_hs_hci_cmd_send_buf(opcode, cmd, cmd_len);
(gdb)
#4 0x08026efc in ble_hs_hci_cmd_send_buf (opcode=opcode@entry=3075,
buf=buf@entry=0x0,
buf_len=buf_len@entry=0 '\000') at
repos/apache-mynewt-nimble/nimble/host/src/ble_hs_hci_cmd.c:122
122 return ble_hs_hci_cmd_send(opcode, buf_len, buf);
(gdb)
#3 0x08026d0e in ble_hs_hci_cmd_send (opcode=opcode@entry=3075,
len=len@entry=0 '\000', cmddata=cmddata@entry=0x0)
at repos/apache-mynewt-nimble/nimble/host/src/ble_hs_hci_cmd.c:90
90 rc = ble_hs_hci_cmd_transport(buf);
(gdb)
#2 0x08026c9e in ble_hs_hci_cmd_transport (cmdbuf=cmdbuf@entry=0x0)
at repos/apache-mynewt-nimble/nimble/host/src/ble_hs_hci_cmd.c:42
42 rc = ble_hci_trans_hs_cmd_tx(cmdbuf);
(gdb)
#1 0x0802e834 in ble_hci_trans_hs_cmd_tx (cmd=cmd@entry=0x0)
at repos/apache-mynewt-nimble/nimble/transport/ram/src/ble_hci_ram.c:89
89 assert(ble_hci_ram_rx_cmd_ll_cb != NULL);
(gdb)
#0 __assert_func (file=file@entry=0x0, line=line@entry=0, func=func@entry=0x0,
e=e@entry=0x0)
at repos/apache-mynewt-core/kernel/os/src/arch/cortex_m4/os_fault.c:137
137 asm("bkpt");
-----Original Message-----
From: Christopher Collins <[email protected]>
Sent: Monday, June 25, 2018 11:25 PM
To: [email protected]
Subject: Re: bleprph using HCI 4 wire
Hi Jeff,
My responses are inline.
On Tue, Jun 26, 2018 at 02:11:46AM +0000, Jeff Belz wrote:
> All:
>
>
> I'm using a BroadCom(Cypress)43438 Bluetooth chip that receives a 4
> wire HCI. I got one response that said I just have to change the
> syscfg setting in my target to
>
>
>
> BLE_HCI_TRANSPORT_NIMBLE_BUILTIN: 0
> BLE_HCI_TRANSPORT_UART: 1
>
> 1. I can't find any documentation to what these lines do?
The documentation for syscfg settings is in the packages themselves.
Both of the above settings are defined by the
@apache-mynewt-nimble/nimble/transport package. You can see the full list of
settings in a project, along with their descriptions, with this
command:
newt target config show <target-name>
However, I don't think you will see either of these settings if you execute
this command. From the dependency list you quoted, it looks like you are using
an older version of Mynewt which does not support these two settings. I
believe you are using Mynewt 1.3.0; you will want to upgrade to 1.4.0, released
about one week ago. There was a long delay between the releases of 1.3.0 and
1.4.0, and I mistakenly forgot that 1.4.0 was not yet released when I wrote my
original email.
The latest version introduces some fairly major changes, so I suggest you
upgrade as follows:
1. Download Newt 1.4.0 as described here:
http://mynewt.apache.org/develop/get_started/native_install/index.html
2. Upgrade the Mynewt repos to 1.4.0 by running:
newt upgrade
inside your project directory.
> 2. How can I make sure it's configuring the right UART?
There is a syscfg setting defined by
@apache-mynewt-nimble/nimble/transport/uart called `BLE_HCI_UART_PORT`.
By default, this is defined to be 0. You can change its value if you need to
use a different UART.
> 3. Do I change the target syscfg or the one in the app folder?
I recommend changing the target's syscfg. The target configuration overrides
the app configuration, and it is best not to change a foreign repo except when
necessary. The syscfg system is described in more detail here:
http://mynewt.apache.org/develop/os/modules/sysinitconfig/sysinitconfig.html
> 4. Do I really need the bootloader? If so, is there documentation to why,
> I will eventually need to modify this.
The boot loader is not strictly required, but much of the Mynewt infrastructure
assumes it is present. When you are getting Mynewt up and running for the
first time, I recommend you use the boot loader so that you can follow the
documentation more closely.
Chris