Community Translation - Changing BLE Attribute Size at Runtime - KBA219049

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

cross mob
HiOm_1802421
Level 5
Level 5
Distributor - Marubun (Japan)
50 replies posted 50 questions asked 25 replies posted

HI,

I tried to translate this KBA219049 into Japanese.

Changing BLE Attribute Size at Runtime - KBA219049

==========

タイトル:実行時にBLEの属性サイズを変更する

質問:

実行時にBLEの属性値サイズを変更するにはどうすればよいですか?

回答:

可変長の特性(キャラクタリスティック)は、関連しない追加データを開示する必要がないため有用です。cyBle_gattDB は、ハンドル、アクセス許可、コンテナサイズ(最大長)、およびフル(16ビット)もしくはパーシャル(128ビット) UUID を定義する CYBLE_GATTS_DB_T 構造体の配列です。

属性サイズは、CYCBLE_EVT_STACK_ON イベントの後で、次のように cyBle_gattDB[] 配列へ書き込んで変更できます。

cyBle_gattDB[CYBLE_CUSTOM_SERVICE_CUSTOM_CHARACTERISTIC_CHAR_HANDLE - 1u].attValue.attFormatValue.attGenericValLen->actualLength = X;

ここで X は属性の長さです。

注意:

属性サイズは減少できますが、BLE コンポーネントで設定されたデフォルトサイズを超えて増加できません。

属性の実際の長さは、次のマクロを使用して取得できます。

 CYBLE_GATT_DB_ATTR_GET_ATTR_GEN_LEN (Handle – 1u);

==========

BR,

Omoi

0 Likes
1 Reply
JennaJo
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello, Omoi-san

We receive your translation, it will be published to KBA to Community.

It will be reviewed internally.

After upload, You will receive the points as the word of KBA.

Due to the current volume of works (waiting review, etc.), Please bear with me for the delayed the response.

It could be delayed, but it will be processed soon.

Thanks for your contribution to CDC!

Will keep you update the status.

Thanks,

Jenna Jo

Jenna Jo