samples/bluetooth/encrypted_advertising/README.html · samples/bluetooth/encrypted_advertising/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Bluetooth · EAD

Bluetooth Encrypted Advertising

두 board가 pairing한 뒤 encrypted advertising data를 전송하고 복호화합니다.

Official pathsamples/bluetooth/encrypted_advertising/README.html
Source filesamples/bluetooth/encrypted_advertising/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

Key Material, Randomizer·RPA 갱신과 Peripheral/Central 전체 출력을 설명합니다.

Kconfig

CONFIG_BT_EAD

Crypto

Encrypt · Decrypt

Pairing

Button confirmation

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 E092F85C5DFFA74A998518128A1D231DF7447019B88F9F1C0221975051032BA1
.. _bluetooth_encrypted_advertising_sample:

Bluetooth: Encrypted Advertising
################################

Overview
********

This sample demonstrates the use of the encrypted advertising feature, such as:

 - the exchange of the session key and the initialization vector using the Key
   Material characteristic,
 - the encryption of advertising payloads,
 - the decryption of those advertising payloads,
 - and the update of the Randomizer field whenever the RPA is changed.

To use the `bt_ead_encrypt` and `bt_ead_decrypt` functions, you must enable
the Kconfig symbol :kconfig:option:`CONFIG_BT_EAD`.

While this sample uses extended advertising, it is **not** mandatory when using
the encrypted advertising. The feature can be used with legacy advertising as
well.

Requirements
************

* Two boards with Bluetooth Low Energy support
* Two boards with a push button connected via a GPIO pin, see the :zephyr:code-sample:`button`
  sample for more details

Building and Running
********************

This sample can be found under
:zephyr_file:`samples/bluetooth/encrypted_advertising` in the Zephyr tree.

See :ref:`bluetooth samples section <bluetooth-samples>` for details.

This sample uses two applications, so two devices need to be setup.
Flash one device with the central application, and another device with the
peripheral application.

The two devices should automatically connect if they are close enough.

After the boards are connected, you will be asked to press the configured push
button on both boards to confirm the pairing request.

Here are the outputs you should get by default:

Peripheral:

.. code-block:: console

        *** Booting Zephyr OS build zephyr-v3.3.0-1872-g6fac3c7581dc ***
        <inf> ead_peripheral_sample: Advertising data size: 64
        Passkey for 46:04:2E:6F:80:12 (random): 059306
        Confirm passkey by pressing button at gpio@50000000 pin 11...
        Passkey confirmed.
        <inf> ead_peripheral_sample: Advertising data size: 64


Central:

.. code-block:: console

        *** Booting Zephyr OS build zephyr-v3.3.0-1872-g6fac3c7581dc ***
        Passkey for 6C:7F:67:C2:8B:29 (random): 059306
        Confirm passkey by pressing button at gpio@50000000 pin 11...
        Passkey confirmed.
        <inf> ead_central_sample: Received data size: 64
        <inf> ead_central_sample: len : 10
        <inf> ead_central_sample: type: 0x09
        <inf> ead_central_sample: data:
                                  45 41 44 20 53 61 6d 70  6c 65                   |EAD Samp le
        <inf> ead_central_sample: len : 8
        <inf> ead_central_sample: type: 0xff
        <inf> ead_central_sample: data:
                                  05 f1 5a 65 70 68 79 72                          |..Zephyr
        <inf> ead_central_sample: len : 7
        <inf> ead_central_sample: type: 0xff
        <inf> ead_central_sample: data:
                                  05 f1 49 d2 f4 55 76                             |..I..Uv
        <inf> ead_central_sample: len : 4
        <inf> ead_central_sample: type: 0xff
        <inf> ead_central_sample: data:
                                  05 f1 c1 25                                      |...%
        <inf> ead_central_sample: len : 3
        <inf> ead_central_sample: type: 0xff
        <inf> ead_central_sample: data:
                                  05 f1 17                                         |...

Part 3

한국어 전문 번역

개요

Encrypted Advertising 기능의 다음 사용법을 보여주는 sample입니다.

  • Key Material characteristic을 사용한 session key와 initialization vector 교환
  • Advertising payload encryption
  • Encrypted advertising payload decryption
  • RPA가 바뀔 때마다 Randomizer field 갱신

bt_ead_encrypt와 bt_ead_decrypt 함수를 사용하려면 CONFIG_BT_EAD Kconfig symbol을 활성화해야 합니다.

이 sample은 Extended Advertising을 사용하지만 Encrypted Advertising에 필수는 아닙니다. 이 기능은 legacy advertising에서도 사용할 수 있습니다.

요구사항

  • Bluetooth Low Energy를 지원하는 board 두 개
  • GPIO pin에 push button이 연결된 board 두 개. 자세한 내용은 Button sample을 참조하십시오.

Build와 실행

Zephyr tree의 samples/bluetooth/encrypted_advertising에서 이 sample을 찾을 수 있습니다. 자세한 공통 사항은 Bluetooth sample section을 참조하십시오.

이 sample은 application 두 개를 사용하므로 device 두 개를 준비해야 합니다. 한 device에는 Central application을, 다른 device에는 Peripheral application을 flash합니다.

두 device가 충분히 가까우면 자동으로 연결됩니다. 연결된 뒤 두 board 모두에서 configuration된 push button을 눌러 pairing request를 확인하라는 요청이 나타납니다.

기본적으로 다음과 같은 출력이 나타납니다.

Peripheral

*** Booting Zephyr OS build zephyr-v3.3.0-1872-g6fac3c7581dc ***
<inf> ead_peripheral_sample: Advertising data size: 64
Passkey for 46:04:2E:6F:80:12 (random): 059306
Confirm passkey by pressing button at gpio@50000000 pin 11...
Passkey confirmed.
<inf> ead_peripheral_sample: Advertising data size: 64

Central

*** Booting Zephyr OS build zephyr-v3.3.0-1872-g6fac3c7581dc ***
Passkey for 6C:7F:67:C2:8B:29 (random): 059306
Confirm passkey by pressing button at gpio@50000000 pin 11...
Passkey confirmed.
<inf> ead_central_sample: Received data size: 64
<inf> ead_central_sample: len : 10
<inf> ead_central_sample: type: 0x09
<inf> ead_central_sample: data:
                          45 41 44 20 53 61 6d 70  6c 65                   |EAD Samp le
<inf> ead_central_sample: len : 8
<inf> ead_central_sample: type: 0xff
<inf> ead_central_sample: data:
                          05 f1 5a 65 70 68 79 72                          |..Zephyr
<inf> ead_central_sample: len : 7
<inf> ead_central_sample: type: 0xff
<inf> ead_central_sample: data:
                          05 f1 49 d2 f4 55 76                             |..I..Uv
<inf> ead_central_sample: len : 4
<inf> ead_central_sample: type: 0xff
<inf> ead_central_sample: data:
                          05 f1 c1 25                                      |...%
<inf> ead_central_sample: len : 3
<inf> ead_central_sample: type: 0xff
<inf> ead_central_sample: data:
                          05 f1 17                                         |...

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.