samples/net/cellular_modem/README.html · samples/net/cellular_modem/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Networking · Modem

Cellular Modem

Devicetree modem alias, PPP interface, interrupt·async UART와 APN을 설정합니다.

Official pathsamples/net/cellular_modem/README.html
Source filesamples/net/cellular_modem/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

Quectel BG9x 예제 node와 UART·APN 요구 조건, test-endpoint.com 동작을 빠짐없이 설명합니다.

Transport

PPP · UDP

Lookup

DNS

UART

IRQ · Async

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 DF8BC2CF9808A944D318E490FB85B667C916F74A59727A928531276E0B3BDD9E
.. zephyr:code-sample:: cellular-modem
   :name: Cellular modem

   Use a cellular modem to communicate with a UDP server.

Overview
********

This sample consists of a simple application which powers on
the modem, brings up the net interface, then sends a packet
with pseudo random data to the endpoint test-endpoint.com,
which is a publicly hosted server which runs the Python
script found in the server folder. DNS is used to look
up the IP of test-endpoint.com.

Notes
*****

This sample uses the devicetree alias ``modem`` to identify
the modem instance to use. The sample also presumes that
the modem driver creates the only PPP network interface.

Setup
*****

Start by setting up the devicetree with the required
devicetree node:

.. code-block:: devicetree

   /dts-v1/;

   / {
           aliases {
                   modem = &modem;
           };
   };

   &usart2 {
           pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3 &usart2_rts_pa1 &usart2_cts_pa0>;
           pinctrl-names = "default";
           current-speed = <115200>;
           hw-flow-control;
           status = "okay";

           modem: modem {
                   compatible = "quectel,bg9x";
                   mdm-power-gpios = <&gpioe 2 GPIO_ACTIVE_HIGH>;
                   mdm-reset-gpios = <&gpioe 3 GPIO_ACTIVE_HIGH>;
                   status = "okay";
           };
   };

Next, the UART API must be specified using ``CONFIG_UART_INTERRUPT_DRIVEN=y`` or
``CONFIG_UART_ASYNC_API=y``. The driver doesn't support UART polling.

Lastly, the APN must be configured using ``CONFIG_MODEM_CELLULAR_APN=""``.

Part 3

한국어 전문 번역

개요

이 sample은 modem 전원을 켜고 network interface를 활성화한 다음, pseudo-random data가 든 packet을 test-endpoint.com endpoint로 보내는 간단한 application입니다.

test-endpoint.com은 public server이며 server folder에 있는 Python script를 실행합니다. Application은 DNS를 사용해 test-endpoint.com의 IP address를 조회합니다.

주의 사항

이 sample은 사용할 modem instance를 식별하기 위해 Devicetree alias modem을 사용합니다.

또한 modem driver가 유일한 PPP network interface를 생성한다고 가정합니다.

설정

먼저 필요한 Devicetree node를 추가합니다. 다음 예는 usart2에 115200 baud와 hardware flow control을 설정하고 Quectel BG9x modem의 power·reset GPIO를 연결합니다.

/dts-v1/;

/ {
        aliases {
                modem = &modem;
        };
};

&usart2 {
        pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3 &usart2_rts_pa1 &usart2_cts_pa0>;
        pinctrl-names = "default";
        current-speed = <115200>;
        hw-flow-control;
        status = "okay";

        modem: modem {
                compatible = "quectel,bg9x";
                mdm-power-gpios = <&gpioe 2 GPIO_ACTIVE_HIGH>;
                mdm-reset-gpios = <&gpioe 3 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
};

다음으로 UART API를 CONFIG_UART_INTERRUPT_DRIVEN=y 또는 CONFIG_UART_ASYNC_API=y로 지정해야 합니다. 이 driver는 UART polling을 지원하지 않습니다.

마지막으로 CONFIG_MODEM_CELLULAR_APN=""을 사용해 APN을 설정해야 합니다.

Source

출처

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