Why now ERR_UNKNOWN_HCI_COMMAND return value to aci_hal_get_anchor_period()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-28 2:06 AM
Hello - I was using the results of aci_hal_get_anchor_period() just a few months ago, but now in v1.13.3 BLE_full_stack, it is returning ERR_UNKNOWN_HCI_COMMAND. Is there some command that needs to be sent to enable getting the anchor period? If there is no way to successfully invoke this in v1.13.3, please - what is the last version in which it was enabled?
Solved! Go to Solution.
- Labels:
-
STM32WB series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-29 5:49 AM
Hello,
Indeed, other modifications need to be done inside the application to be compatible with BLE full extended, the better solution is to wait release v1.14.0. The aci_hal_get_anchor_period() command will be reintegrated in the BLE full stack for release v1.14.0.
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-28 6:11 AM
Hello,
Indeed this command isn't supported in BLE Full stack v1.13.3. To use this command, you shall used the BLE Full Extended stack.
In order to use BLE Full Extended stack, it is necessary to adapt the scatter file in the BLE applications as:
- The RAM_A shared range shall be reduced to memory range [0x20030000:0x200307FF]
- The Mail-box buffers(MB_MEM1, MB_MEM2) shall be located in RAM_B shared defined in memory range [0x20038000:0x2003A7FF]
- The RAM_B shared shall be added to Total_RAM_region
define symbol __ICFEDIT_region_RAM_SHARED_start__ = 0x20030000;
define symbol __ICFEDIT_region_RAM_SHARED_end__ = 0x200307FF;
define symbol __ICFEDIT_region_RAM_B_SHARED_start__ = 0x20038000;
define symbol __ICFEDIT_region_RAM_B_SHARED_end__ = 0x2003A7FF;
define region RAM_B_SHARED_region = mem:[from __ICFEDIT_region_RAM_B_SHARED_start__ to __ICFEDIT_region_RAM_B_SHARED_end__];
define region Total_RAM_region = RAM_region | RAM_SHARED_region | RAM_B_SHARED_region;
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-28 4:33 PM
@Remy ISSALYS​ thanks for this insight. I made simple linker file change and programmed the v1.13.3 BLE full-Extended stack. Startup procedure as expected until this step where it hangs here:
static void APP_BLE_Init(void)
{
HCI_TL_HciInitConf_t Hci_Tl_Init_Conf = {
.p_cmdbuffer = (void *)&BleCmdBuffer,
.StatusNotCallBack = BLE_StatusNot
};
hci_init(BLE_UserEvtRx, &Hci_Tl_Init_Conf);
SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet =
{
.Header = { .MetaData = {0} }, // Does not need to be initialized by the user.
.Param = {
.pBleBufferAddress = NULL, // NOT USED - shall be set to 0.
.BleBufferSize = 0, // NOT USED - shall be set to 0.
.NumAttrRecord = CFG_BLE_NUM_GATT_ATTRIBUTES,
.NumAttrServ = CFG_BLE_NUM_GATT_SERVICES,
.AttrValueArrSize = CFG_BLE_ATT_VALUE_ARRAY_SIZE,
.NumOfLinks = CFG_BLE_NUM_LINK,
.ExtendedPacketLengthEnable = CFG_BLE_DATA_LENGTH_EXTENSION,
.PrWriteListSize = CFG_BLE_PREPARE_WRITE_LIST_SIZE,
.MblockCount = CFG_BLE_MBLOCK_COUNT,
.AttMtu = CFG_BLE_MAX_ATT_MTU,
.SlaveSca = CFG_BLE_SLAVE_SCA,
.MasterSca = CFG_BLE_MASTER_SCA,
.LsSource = CFG_BLE_LSE_SOURCE,
.MaxConnEventLength = CFG_BLE_MAX_CONN_EVENT_LENGTH,
.HsStartupTime = CFG_BLE_HSE_STARTUP_TIME,
.ViterbiEnable = CFG_BLE_VITERBI_MODE,
.Options = CFG_BLE_OPTIONS,
.HwVersion = 0, // Reserved for future use - shall be set to 0.
.max_coc_initiator_nbr = CFG_BLE_MAX_COC_INITIATOR_NBR,
.min_tx_power = CFG_BLE_MIN_TX_POWER, // Range: -127 .. 20
.max_tx_power = CFG_BLE_MAX_TX_POWER,
.rx_model_config = CFG_BLE_RX_MODEL_CONFIG
}
};
ASSERT_RETURN(SHCI_Success == SHCI_C2_BLE_Init((void *)&ble_init_cmd_packet)); // Starts the BLE Stack on CPU2.
}
So it would seem that some parameter in the SHCI_C2_Ble_Init_Cmd_Packet_t is not good for the Extended stack, even as it is working fine with the Full stack. Can you give any more hints on how to make the Full stack run, or do we have to wait for v1.14. in June?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-29 5:49 AM
Hello,
Indeed, other modifications need to be done inside the application to be compatible with BLE full extended, the better solution is to wait release v1.14.0. The aci_hal_get_anchor_period() command will be reintegrated in the BLE full stack for release v1.14.0.
Best Regards
