Community Translation - PIN Setting During BT Connection - KBA225063

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

cross mob
lock attach
Attachments are accessible only for community members.
KaNa_3391246
Level 5
Level 5
Distributor - Marubun (Japan)
10 solutions authored First comment on KBA 5 solutions authored

Hi,

I tried to translate following one into Japanese.

PIN Setting During BT Connection - KBA225063

https://community.cypress.com/docs/DOC-15791

=========================

タイトル:

BT接続時のPIN設定

Bluetooth PINは、ペアリング手順における相互リンクキーを作成する際に、2つのBluetoothデバイスを相互に認証するために使用されます。PINは、ペアリング手順の中で、初期リンクキーを生成するために使用されます。PINは、数字を入力する機能を持つデバイスを用いて、接続中にUIレベルで入力されます。

この記事では、サンプルアプリケーションを使用してPINを設定する方法について説明します。 SPP[BJ1] に基づくデモコードがこのKBAに添付されています。

1. 添付ファイルをダウンロードして解凍し、 btm_init.h ファイルをプロジェクトにコピーします。

2. WICED® Studio SDK にヘッダーファイル btm_init.h を含めます。

#include "btm_init.h"

3. アプリケーションのコールバック関数にて、セキュリティモードをBTM_SEC_MODE_SERVICEに設定します。

btm_cb.security_mode = 2;

4. アプリケーションのコールバック関数にて、以下の関数を追加して、単純なペアリングとセキュアな接続ホストのサポートを無効にします。

btsnd_hcic_write_simple_pairing_mode( HCI_SP_MODE_UNDEFINED);

btsnd_hcic_write_secure_conns_support(HCI_SC_MODE_DISABLED);

5. BTM_PIN_REQUEST_EVTで、以下の関数を使用してPIN要求を応答します。

wiced_bt_dev_pin_code_reply(*p_event_data->pin_request.bd_addr, result, 4, &pincode[0]);

6. コードの変数宣言部分にてPINを設定します。 コードはASCII形式です。例えば、以下のコードはPINコードを「0123」に設定します。

uint8_t pincode[4] = { 0x30, 0x31, 0x32, 0x33 };

PINの詳細については、添付コードを参照して下さい。

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

Hello,

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

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

Due to the current delay of processed work, 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
0 Likes