# UART ETH 4G Module Example This example demonstrates how to use [iot_uart_eth](https://components.espressif.com/components/lijunru-hub/iot_uart_eth) to connect to 4G module with UART protocol. ## Example Output ``` I (376) main_task: Calling app_main() I (377) uart_4g: IOT UART ETH Version: 0.1.0 I (377) iot_eth: IoT ETH Version: 0.1.0 I (380) uart: queue free spaces: 10 I (384) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (393) gpio: GPIO[1]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (402) uart_4g: UART ETH network interface init success I (408) iot_eth.netif_glue: dc:54:75:c7:e6:02 I (413) iot_eth.netif_glue: ethernet attached to netif I (419) uart_4g: UART ETH start I (423) UART_4G_MODULE: IOT_ETH_EVENT_START I (428) iot_eth.netif_glue: eth_action_handle: 0x3fcaefa4, 0x3c096f24, 0, 0x3fcb12d8, 0x3fcadd9c E (443) uart_4g: wait for the slave to handle the frame timeout I (457) pp: pp rom version: e7ae62f I (457) net80211: net80211 rom version: e7ae62f I (458) wifi:wifi driver task: 3fcb44d4, prio:23, stack:6656, core=0 I (471) wifi:wifi firmware version: a862fd7 I (471) wifi:wifi certification version: v7.0 I (471) wifi:config NVS flash: enabled I (473) wifi:config nano formatting: disabled I (477) wifi:Init data frame dynamic rx buffer num: 64 I (482) wifi:Init static rx mgmt buffer num: 5 I (486) wifi:Init management short buffer num: 32 I (490) wifi:Init dynamic tx buffer num: 64 I (494) wifi:Init static tx FG buffer num: 2 I (498) wifi:Init static rx buffer size: 1600 I (502) wifi:Init static rx buffer num: 16 I (506) wifi:Init dynamic rx buffer num: 64 I (510) wifi_init: rx ba win: 32 I (514) wifi_init: accept mbox: 6 I (518) wifi_init: tcpip mbox: 64 I (522) wifi_init: udp mbox: 64 I (526) wifi_init: tcp mbox: 64 I (529) wifi_init: tcp tx win: 65535 I (534) wifi_init: tcp rx win: 65535 I (538) wifi_init: tcp mss: 1440 I (542) wifi_init: WiFi IRAM OP enabled I (546) wifi_init: WiFi RX IRAM OP enabled I (554) app wifi: wifi_init_softap finished.SSID:ESP-RNDIS-4G password: I (559) phy_init: phy_version 701,f4f1da3a,Mar 3 2025,15:50:10 I (614) phy_init: Saving new calibration data due to checksum failure or outdated calibration data, mode(0) I (668) wifi:mode : softAP (dc:54:75:c7:e6:01) I (669) wifi:Total power save buffer number: 32 I (669) wifi:Init max length of beacon: 752/752 I (670) wifi:Init max length of beacon: 752/752 I (675) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1 W (2684) UART_4G_MODULE: From 8.8.8.8 icmp_seq=1 timeout I (5540) uart_4g: AT Bink Success I (5565) iot_eth: uart_eth: MAC address: DC:54:75:C7:E6:02 I (5565) uart_4g: Modem ACK check success I (5566) uart_4g: UART ETH connected I (5569) UART_4G_MODULE: IOT_ETH_EVENT_CONNECTED I (5574) iot_eth.netif_glue: eth_action_handle: 0x3fcaefa4, 0x3c096f24, 2, 0x3fcbf5f0, 0x3fcadd9c I (6592) iot_eth.netif_glue: Ethernet Got IP Address I (6592) iot_eth.netif_glue: ~~~~~~~~~~~ I (6592) iot_eth.netif_glue: ETHIP:192.168.10.2 I (6596) iot_eth.netif_glue: ETHMASK:255.255.255.0 I (6602) iot_eth.netif_glue: ETHGW:192.168.10.1 I (6607) iot_eth.netif_glue: ~~~~~~~~~~~ W (7684) UART_4G_MODULE: From 8.8.8.8 icmp_seq=1 timeout I (10791) UART_4G_MODULE: 64 bytes from 8.8.8.8 icmp_seq=1 ttl=109 time=105 ms I (15811) UART_4G_MODULE: 64 bytes from 8.8.8.8 icmp_seq=1 ttl=109 time=125 ms ```
To create a project from this example, run:
idf.py create-project-from-example "lijunru-hub/iot_uart_eth=0.1.0:iot_uart_4g_module"