espressif/iot_bridge

uploaded 1 month ago
A smart bridge to make both ESP and the other MCU or smart device can access the Internet

readme

ESP-IoT-Bridge Component

Component Registry

ESP-IoT-Bridge solution is mainly aimed at bridging between various network interfaces in IoT application scenarios, such as SPI, SDIO, USB, Wi-Fi, Ethernet and other network interfaces. ESP-IoT-Bridge is a smart bridge solution offered by Espressif.

Feature

  • Provide Wi-Fi router function that can provide accessing the Internet for other devices
  • Provide Wi-Fi network card function for other devices to access the Internet
  • Provide wired ethernet network card function for other devices to access the Internet
  • Provide 4G network card function for other devices to access the Internet
  • Provide 4G Hotspot function that can provide accessing the Internet for other devices

API

  • The application layer only needs to call this API at the code level, and select the corresponding external netif and dataforwarding netif under menuconfig(Bridge Configuration).

    esp_bridge_create_all_netif()
    

    Note: By default, you only need to call this API, or you can manually call the corresponding netif api, such as esp_bridge_create_xxx_netif.

  • Registered users check network segment conflict interface.

    esp_bridge_network_segment_check_register
    
  • Check whether other data forwarding netif IP network segments conflict with incoming netif network segments.

    esp_bridge_netif_network_segment_conflict_update
    

    Note: Generally, it is called in the event callback when external netif (Station, Ethernet, 4G) obtains IP.

Add component to your project

Please use the component manager command add-dependency to add the iot_bridge to your project's dependency, during the CMake step the component will be downloaded automatically.

idf.py add-dependency "espressif/iot_bridge=*"

Examples

Please use the component manager command create-project-from-example to create the project from example template.

idf.py create-project-from-example "espressif/iot_bridge=*:wifi_router"

Then the example will be downloaded in current folder, you can check into it for build and flash.

Or you can download examples from esp-iot-bridge repository: wifi_router

Q&A

Q1. I encountered the following problems when using the package manager

Executing action: create-project-from-example
CMakeLists.txt not found in project directory /home/username

A1. This is because an older version packege manager was used, please run pip install -U idf-component-manager in ESP-IDF environment to update.

changelog

ChangeLog

v0.5.0 - 2023.4.3

Supported Socs

  • ESP32-C2

v0.4.0 - 2023.3.16

Supported ESP-IDF Version

  • Add v4.3

v0.3.0 - 2023.3.9

Enhancements

  • Add multiple bridging interfaces(Ethernet, USB, SPI, SDIO)

v0.2.0 - 2023.2.24

Enhancements

  • Provide 4G network card function for other devices to access the internet
  • Provide 4G Hotspot function that can provide accessing the internet for other devices

v0.1.0 - 2022.12.26

This is the first released version for iot-bridge component, more detailed descriptions about the project, please refer to User_Guide.

Enhancements

  • Provide Wi-Fi router function that can provide accessing the internet for other devices
  • Provide Wi-Fi network card function for other devices to access the internet
  • Provide wired ethernet network card function for other devices to access the internet

Supported Socs

  • ESP32
  • ESP32-C3
  • ESP32-S2
  • ESP32-S3

Supported ESP-IDF Version

  • v4.4
  • v5.0

readme of 4g_hotspot example

Supported Targets ESP32 ESP32-C2 ESP32-C3 ESP32-S2 ESP32-S3

4G to Hotspot example

Overview

This example focuses on the networking part, enables forwarding packets between network interfaces. It creates a WiFi soft AP, which uses NAT to forward packets to and from the PPP network interface.

Supports all targets

License: Apache-2.0

To add this component to your project, run:

idf.py add-dependency "espressif/iot_bridge^0.5.0"

or download archive

Dependencies

  • espressif/cmake_utilities 0.*
  • ESP-IDF >=4.3
  • Examples:

    4g_hotspot

    more details

    wifi_router

    Stats

    • Downloaded in total
      Downloaded in total 2.7k times
    • Downloaded this version
      This version: 649 times

    Badge

    espressif/iot_bridge version: 0.5.0 |