-
Notifications
You must be signed in to change notification settings - Fork 669
Description
Environment
i.MX6 (VAR-SOM-SOLO) with WL18MODGI using SafeRTOS (FreeRTOS similar). BTstack version : 1.6.2.
Issue:
When using BTstack with a WL18MODGI (CC256x-compatible) module, the init script set via btstack_chipset_cc256x_set_init_script() is silently ignored during HCI initialization.
Expected Behavior :
After calling:
btstack_chipset_cc256x_set_init_script(&cc256x_init_script, cc256x_init_script_size);
hci_set_chipset(btstack_chipset_cc256x_instance());
btstack_main(0, NULL);
btstack_run_loop_execute();
BTstack should, at one point, use chipset_next_command(..) to send chipset firmware datas
Observed behavior:
HCI Reset is correctly sent and acknowledged
Standard HCI commands continue
Vendor-specific CC256x commands are never sent
Chipset remains unconfigured with default firmware
Serial HCI Log
[00:00:02.451] LOG -- btstack_run_loop_safertos.c.228: run loop init, task 0x100295b0, queue item size 8
[00:00:02.482] LOG -- btstack_chipset_cc256x.c.164: cc256x: using custom init script
[00:00:02.497] LOG -- hci.c.5546: hci_power_control: 1, current mode 0
[00:00:02.504] LOG -- btstack_chipset_cc256x.c.164: cc256x: using custom init script
[00:00:02.621] LOG -- hci.c.8159: BTSTACK_EVENT_STATE 1
[00:00:02.623] LOG -- hci.c.1873: hci_initializing_run: substate 0, can send 1
[00:00:02.630] CMD => 03 0C 00
[00:00:02.655] LOG -- hci.c.1873: hci_initializing_run: substate 1, can send 0
[00:00:02.662] LOG -- btstack_run_loop_safertos.c.197: RL: wait with timeout 169
[00:00:02.669] LOG -- btstack_run_loop_safertos.c.197: RL: wait with timeout 162
[00:00:02.837] LOG -- hci.c.1814: Resend HCI Reset
[00:00:02.839] LOG -- hci.c.1873: hci_initializing_run: substate 0, can send 1
[00:00:02.846] CMD => 03 0C 00
[00:00:02.848] LOG -- btstack_run_loop_safertos.c.197: RL: wait with timeout 210
[00:00:02.855] LOG -- hci.c.1873: hci_initializing_run: substate 1, can send 0
[00:00:02.862] LOG -- btstack_run_loop_safertos.c.197: RL: wait with timeout 185
[00:00:03.054] LOG -- hci.c.1814: Resend HCI Reset
[00:00:03.056] LOG -- hci.c.1873: hci_initializing_run: substate 0, can send 1
[00:00:03.063] CMD => 03 0C 00
[00:00:03.065] LOG -- btstack_run_loop_safertos.c.197: RL: wait with timeout 209
[00:00:03.072] LOG -- hci.c.1873: hci_initializing_run: substate 1, can send 0
[00:00:03.079] EVT <= 0E 04 01 03 0C 00
[00:00:03.083] LOG -- hci.c.2408: Command complete for expected opcode 0c03 at substate 1
[00:00:03.090] LOG -- hci.c.1873: hci_initializing_run: substate 2, can send 1
[00:00:03.097] CMD => 01 10 00
[00:03:47.861] LOG -- btstack_run_loop_safertos.c.197: RL: wait with timeout 4294967295
[00:03:47.868] LOG -- hci.c.1873: hci_initializing_run: substate 3, can send 0
[00:03:48.898] LOG -- btstack_run_loop_safertos.c.197: RL: wait with timeout 4294967295
Is there a strict call order between hci_set_chipset() and other BTstack init calls?
Any known quirks with WL18MODGI compared to CC256x?
Is there something specific to do to trigger the pre initialization?
Best regards