samples/drivers/lora/receive/README.html · samples/drivers/lora/receive/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Drivers · LoRa

LoRa 수신

RSSI·SNR과 함께 유한 개수 packet을 받고 수신을 종료합니다.

Official pathsamples/drivers/lora/receive/README.html
Source filesamples/drivers/lora/receive/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

송신 sample 준비, lora0 alias, reset 직후 console 확인 조건을 보존합니다.

Modes

동기 · 비동기

Alias

lora0

Payload

helloworld

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 24FEBE5A021170EE95750B19B6E1811F40A8936C30A751C2B6C5216323E2BA5B
.. zephyr:code-sample:: lora-receive
   :name: LoRa receive
   :relevant-api: lora_api

   Receive packets in both synchronous and asynchronous mode using the LoRa
   radio.

Overview
********

This sample demonstrates how to use the LoRa radio driver to receive packets
both synchronously and asynchronously.

In order to successfully receive messages, build and flash the accompanying
LoRa send sample :zephyr:code-sample:`lora-send` on another board within range.

As this sample receives a finite number of packets and then sleeps infinitely,
the user must be ready to inspect the console output immediately after
resetting the device.

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

Build and flash the sample as follows, changing ``b_l072z_lrwan1`` for
your board, where your board has a ``lora0`` alias in the devicetree.

.. zephyr-app-commands::
   :zephyr-app: zephyr/samples/drivers/lora/receive
   :host-os: unix
   :board: b_l072z_lrwan1
   :goals: build flash
   :compact:

Sample Output
=============

.. code-block:: console

    [00:00:00.235,000] <inf> lora_receive: Synchronous reception
    [00:00:00.956,000] <inf> lora_receive: Received data: helloworld (RSSI:-60dBm, SNR:7dBm)
    [00:00:02.249,000] <inf> lora_receive: Received data: helloworld (RSSI:-57dBm, SNR:9dBm)
    [00:00:03.541,000] <inf> lora_receive: Received data: helloworld (RSSI:-57dBm, SNR:9dBm)
    [00:00:04.834,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:04.834,000] <inf> lora_receive: Asynchronous reception
    [00:00:06.127,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:07.419,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:08.712,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:10.004,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:11.297,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:12.590,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:13.884,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:15.177,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:16.470,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:17.762,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
    [00:00:17.762,000] <inf> lora_receive: Stopping packet receptions

Part 3

한국어 전문 번역

개요

이 sample은 LoRa radio driver를 사용해 packet을 동기 방식과 비동기 방식으로 수신하는 방법을 보여줍니다.

Message를 정상적으로 수신하려면 통신 범위 안의 다른 board에 함께 제공되는 LoRa send sample lora-send를 build하고 flash해야 합니다.

이 sample은 정해진 개수의 packet을 수신한 뒤 무한 sleep에 들어갑니다. 따라서 device를 reset한 직후 console 출력을 바로 확인할 준비를 해야 합니다.

Build와 실행

다음과 같이 sample을 build하고 flash합니다. Board의 devicetree에는 lora0 alias가 있어야 하며, b_l072z_lrwan1은 사용하는 board 이름으로 바꾸십시오.

west build -b b_l072z_lrwan1 zephyr/samples/drivers/lora/receive
west flash

Sample 출력

[00:00:00.235,000] <inf> lora_receive: Synchronous reception
[00:00:00.956,000] <inf> lora_receive: Received data: helloworld (RSSI:-60dBm, SNR:7dBm)
[00:00:02.249,000] <inf> lora_receive: Received data: helloworld (RSSI:-57dBm, SNR:9dBm)
[00:00:03.541,000] <inf> lora_receive: Received data: helloworld (RSSI:-57dBm, SNR:9dBm)
[00:00:04.834,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:04.834,000] <inf> lora_receive: Asynchronous reception
[00:00:06.127,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:07.419,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:08.712,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:10.004,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:11.297,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:12.590,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:13.884,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:15.177,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:16.470,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:17.762,000] <inf> lora_receive: Received data: helloworld (RSSI:-55dBm, SNR:9dBm)
[00:00:17.762,000] <inf> lora_receive: Stopping packet receptions

Source

출처

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