[ESP32] Linux Host for IP-Camera, ESP32 hosted mode

ESPRESSIF|2021. 1. 4. 19:10

ESP32 is a MCU integrated Wifi solution that basically does not need any host CPU or MCU.

It is very good solution for low speed and small size data transmission, but how about large size data transmission with high perfomance CPU as the host based on  Linux ?

 

Here is Solution from Espressif. 

 

github.com/espressif/esp-hosted

 

ESP-Hosted is a project that support ESP32 slave mode. ESP32 is able to work with high perfomance CPU like Raspberry-Pi or even external ST MCU.

Major features.

1. WiFi can use SPI or SDIO : 802.11b/g/n, Station and Soft AP

2. BT is UART (This is very normal since other BT solution is using UART too.) : BLE, BT BR/EDR

3. Target platform : ESP32, ESP32-S2

4. Tested Host : Raspberry Pi (SDIO, SPI), STM32 (SPI)

Linux Host

ESP device Transport Interface WLAN support Virtual serial interface BT/BLE support
ESP32 SDIO Yes Yes Yes
ESP32 SPI Yes Yes Yes
ESP32 UART No No Yes
ESP32-S2 SDIO NA NA NA
ESP32-S2 SPI Yes Yes NA
ESP32-S2 UART No No NA

MCU Host

ESP device Transport Interface WLAN support Virtual serial interface BT/BLE support
ESP32 SDIO No No No
ESP32 SPI Yes Yes HCI interface can be implemented over virtual serial interface
ESP32 UART No No No
ESP32-S2 SDIO NA NA NA
ESP32-S2 SPI Yes Yes NA
ESP32-S2 UART No No NA

Throughput test

Over SDIO interface 

 

ESP32 Station mode  : HT20 is faster ? 🤔

Traffic

11n HT20 20Mhz

11n HT40 40Mhz

TCP Tx

30.6 Mbps

24.3 Mbps

TCP Rx

16.0 Mbps

18.8 Mbps

UDP Tx

41.0 Mbps

46.4 Mbps

UDP Rx

27.0 Mbps

26.1 Mbps

SoftAP mode

Traffic

11n HT20 20Mhz

11n 40Mhz

TCP Tx

22.9 Mbps

19.7 Mbps

TCP Rx

17.8 Mbps

16.6 Mbps

UDP Tx

39.5 Mbps

46.3 Mbps

UDP Rx

28.7 Mbps

26.8 Mbps

Hardware connection 

Raspberry-Pi pin  ESP Pin PinFunction
13 IO13 DAT3
15 IO14 CLK
16 IO15 CMD
18 IO2 DAT0
22 IO4 DAT1
31 EN ESP Reset
37 IO12 DAT2
39 GND GND

ESP32 still needs firmware

Pre-released firmware

 

esptool.py -p <serial_port> -b 960000 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x8000 partition-table_sdio_v0.3.bin 0x1000 bootloader_sdio_v0.3.bin 0x10000 esp_hosted_firmware_sdio_v0.3.bin

 

Build step

 

1. you need IDF4.0

2. Here is source code. : github.com/espressif/esp-hosted/tree/master/esp/esp_driver/network_adapter

 

3. idf.py menuconfig

   Select SDIO transport layer 

   Example Configuration -> Transport layer -> SDIO interface -> select

 

4. idf.py -p com11 build flash

 

Host needs Device driver

github.com/espressif/esp-hosted/tree/master/host/linux/host_control

github.com/espressif/esp-hosted/tree/master/host/linux/host_driver/esp32

 

espressif/esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE) - espressif/esp-hosted

github.com

 

태그 :

댓글()