Failed to add database of "wiced_bt_dev_add_device_to_address_resolution_db" API

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KEKA_4568351
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Failed to add link_keys database in wiced_bt_dev_add_device_to_address_resolution_db.

The return value is "8042: ILLEGAL_ACTION".

[QA]

1. Please tell me the contents of the error value of "8042: ILLEGAL_ACTION".

2. Please let me know if you know how to handle "8042: ILLEGAL_ACTION" error.

【procedure】

1. Perform pairing with BLE peripheral. (Save link_keys data in DCT_APP_SECTION)

2. Exit program

3. Start the program (Read link_keys data in DCT_APP_SECTION)

4. Database registration by wiced_bt_dev_add_device_to_address_resolution_db at the timing of "BTM_ENABLED_EVT" of Management Callback

5. “8042: ILLEGAL_ACTION” is returned.

[Related QA]

About saving bonding information

https://community.cypress.com/thread/51417?start=0&tstart=0

>> Pairing processing is implemented by QA.

regards.

<Japanese>

"wiced_bt_dev_add_device_to_address_resolution_db" APIのデータベース追加に失敗する

wiced_bt_dev_add_device_to_address_resolution_dbのlink_keysのデータベース追加に失敗します。

リターン値は、「8042:ILLEGAL_ACTION」になります。

【QA】

1.「8042:ILLEGAL_ACTION」のエラー値の内容を教えてください。

2.「8042:ILLEGAL_ACTION」のエラーの対象方法がわかりましたら、教えてください。

【手順】

1.BLE ペリフェラルによるペアリングを実行。(DCT_APP_SECTIONに、link_keysのデータを保存)

2.プログラムを終了

3.プログラムを開始(DCT_APP_SECTIONに、link_keysのデータを読み込み)

4.Management Callbackの「BTM_ENABLED_EVT」のタイミングで、wiced_bt_dev_add_device_to_address_resolution_dbによるデータベース登録

5.「8042:ILLEGAL_ACTION」がリターンされる。

【関連するQA】

About saving bonding information

https://community.cypress.com/thread/51417?start=0&tstart=0

>>ペアリング処理は、QAによる実装を行っている。

よろしくお願いいたします。

0 Likes
1 Solution

Hi KEKA_4568351 ,

Error code ILLEGAL_ACTION. This is triggered if the identity key of the peer device is not available when wiced_bt_dev_add_device_to_address_resolution_db is called. So this is majorly needed when the peer device uses Random Bluetooth device  address . Mostly NRF dongle won't be using random address , rather it will be using public address which will be same value always.

I think you can call the wiced_bt_dev_add_device_to_address_resolution_db API only when the peer identity key is available. Add check as below before adding to RPA database (wiced_bt_dev_add_device_to_address_resolution_db API):

if(p_event_data->paired_device_link_keys_update.key_data.le_keys_available_mask & BTM_LE_KEY_PID)

Regards,
Anjana

View solution in original post

5 Replies
KEKA_4568351
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

In the BLE_test confirmation with additional information, the return was "0".

Attach source and log.

<Log>

[2020-03-18 16:05:24.442]  BTM_ENABLED_EVT link key set!(0) BLEctrl_mng_callback(169)

<Japanese>

追加情報で、BLE_testの確認では、リターン「0」でした。

ソース、ログを添付します。

0 Likes

In the sample code, there is no problem, but there is a problem in the actual code.

サンプルコードでは、問題がないが、実際のコードで問題がある状態です。

0 Likes

The phenomenon was an error due to the BLE dongle.

It doesn't seem to happen on smartphones.

Below is the environment.

・ NRFConnect 3.3.0 (PC)

・ Nordic 52840-Dongle

0 Likes

When executed with the BLE dongle, it became "8042: ILLEGAL_ACTION" even in BLE_test.

【procedure】

1. Start BLE_test program

2. Execute pairing.

3. End BLE_test program

4. Start BLE_test program

5. Failed to add link_keys database of wiced_bt_dev_add_device_to_address_resolution_db. The return value is “8042: ILLEGAL_ACTION”.

[Environment]

・ NRFConnect 3.3.0 (PC)

・ Nordic 52840-Dongle

<Japanese>

BLEドングルで実行すると、BLE_test でも「8042:ILLEGAL_ACTION」になりました。

【手順】

1.BLE_testプログラムを起動

2.ペアリングを実行。

3.BLE_testプログラムを終了

4.BLE_testプログラムを起動

5.wiced_bt_dev_add_device_to_address_resolution_dbのlink_keysのデータベース追加に失敗。リターン値は、「8042:ILLEGAL_ACTION」。

[Environment]

・ NRFConnect 3.3.0 (PC)

・ Nordic 52840-Dongle

0 Likes

Hi KEKA_4568351 ,

Error code ILLEGAL_ACTION. This is triggered if the identity key of the peer device is not available when wiced_bt_dev_add_device_to_address_resolution_db is called. So this is majorly needed when the peer device uses Random Bluetooth device  address . Mostly NRF dongle won't be using random address , rather it will be using public address which will be same value always.

I think you can call the wiced_bt_dev_add_device_to_address_resolution_db API only when the peer identity key is available. Add check as below before adding to RPA database (wiced_bt_dev_add_device_to_address_resolution_db API):

if(p_event_data->paired_device_link_keys_update.key_data.le_keys_available_mask & BTM_LE_KEY_PID)

Regards,
Anjana