From f0ecd70fd7072b782f0f0c26508c576da1e03f52 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Wed, 8 Sep 2021 09:43:12 +0200 Subject: [PATCH 1/2] Examples/PPPoS: Warn about not supporting in v5.0 --- examples/protocols/pppos_client/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/protocols/pppos_client/README.md b/examples/protocols/pppos_client/README.md index c00e8f626d..3837ed3ea5 100644 --- a/examples/protocols/pppos_client/README.md +++ b/examples/protocols/pppos_client/README.md @@ -2,6 +2,8 @@ (See the README.md file in the upper level 'examples' directory for more information about examples.) +**Note:** This example uses an internal implementation of the [modem component](components/modem) that will not be maintained in `v5.0` and this example will be migrated to [esp-modem component](https://components.espressif.com/component/espressif/esp_modem). + ## Overview A general PPP application consists of two parts: PPP server which is provided by cellular modem module and PPP client which is provided by ESP32 in this example. From 64419f7247f2ad89efc8bf5ca65dcb350c3dfe3a Mon Sep 17 00:00:00 2001 From: David Cermak Date: Wed, 8 Sep 2021 09:43:43 +0200 Subject: [PATCH 2/2] Examples/esp_modem: Fix broken links, add details on using the example --- .../cxx/experimental/esp_modem_cxx/README.md | 48 ++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/examples/cxx/experimental/esp_modem_cxx/README.md b/examples/cxx/experimental/esp_modem_cxx/README.md index 31e7a7f80a..4751cc12b3 100644 --- a/examples/cxx/experimental/esp_modem_cxx/README.md +++ b/examples/cxx/experimental/esp_modem_cxx/README.md @@ -13,6 +13,50 @@ It uses modem CMUX mode so that commands and network could be used at the same t ## About the esp_modem -Please check the component [README](managed_components/espressif__esp_modem/README.md) +The esp_modem component is deployed automatically when building this example. It will be located inside this example directory, in relative path `managed_components/espressif__esp_modem`. +You can find a brief introduction in the root directory of the component, in the main `README.md` for or a full html documentation in the relative path `docs/html/index.html`. -Or refer to the component's [documentation](managed_components/espressif__esp_modem/docs/html/index.html) +## How to use example + +### Hardware Required + +To run this example, you need an ESP32 dev board connected to a GSM/4G cellular module, which supports AT commands and PPP connectivity. +The example uses UART to communicate with the modem and it uses the below pin assignment: + +| ESP32 | Cellular Modem | +| ------ | -------------- | +| GPIO25 | RX | +| GPIO26 | TX | +| GND | GND | + +### Configure the project + +* Choose the modem module in `Choose supported modem device(DCE)` option. +* Set the access point name in `Set Access Point Name(APN)` option, which should depend on the operator of your SIM card. +* Enable `EXAMPLE_NEED_SIM_PIN`: To unlock the SIM card with a PIN code if needed + +## Example Output + +The example will unlock the SIM card (if enabled) and enter the CMUX mode. +Then it would initiate the connection to a public MQTT broker and at the same time reading some data using AT commands. + +``` +I (571) uart: queue free spaces: 30 +I (1731) cmux_example: Modem has correctly entered multiplexed command/data mode +I (2241) cmux_example: Operator name: "OperatorName" +I (7781) esp-netif_lwip-ppp: Connected +I (7781) esp-netif_lwip-ppp: Name Server1: xxx.xxx.xxx.xxx +I (7781) esp-netif_lwip-ppp: Name Server2: xxx.xxx.xxx.xxx +I (7781) cmux_example: Got IP address +I (7791) cmux_example: IP : xxx.xxx.xxx.xxx +I (7791) cmux_example: Netmask : xxx.xxx.xxx.xxx +I (7801) cmux_example: Gateway : xxx.xxx.xxx.xxx +I (7801) system_api: Base MAC address is not set +I (7811) system_api: read default base MAC address from EFUSE +I (9061) cmux_example: TOPIC: /topic/esp-modem +I (9061) cmux_example: DATA: Hello modem +I (9061) cmux_example: Data received +I (9211) cmux_example: Modem IMSI number: xxxxxxxxxxxxxxxx +I (21221) esp-netif_lwip-ppp: User interrupt +I (21221) esp_modem_netif: PPP state changed event 5 +```