Giter Site home page Giter Site logo

gavinb-esp / raw-esp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from goodwin-europe/raw-esp

0.0 1.0 0.0 585 KB

Raw IP/Ethernet-forwarding firmware for ESP8266 WiFi module

Home Page: https://gitlab.com/goodwin-europe/raw-esp

Makefile 1.08% C 98.35% C++ 0.57%

raw-esp's Introduction

Main repo located at https://gitlab.com/goodwin-europe/raw-esp

Raw IP / Ethernet packet firmware for ESP8266 WiFi module

It's sometimes desirable to bypass ESP's TCP/IP stack and use network stack of a host microcontroller instead.

This firmware presents ESP8266 to the host as IP- or Ethernet-layer link with additional functions to configure WiFi, logging, etc. All communication with ESP8266 is done via binary message-based protocol over RS232.

In IP-forwarding mode ESP8266 firmware internally runs ARP and, optionally, DHCP. Non-DHCP UDP packets and TCP packets are forwarded to the host. Packets received from host are injected into ESP's network stack. ICMP packets aren't currently forwarded (because I haven't bothered, that's easy to fix). Both AP/STA modes are supported. Network may be configured with DHCP or statically. This mode works with ESP SDK <1.1.1. On version >=1.1.1 it tends to hang after the first injected packed, though I haven't tested with versions >=1.4.

In Ethernet-forwarding mode ESP's LwIP stack is completely detached. Its timers are operational and it attemps to send something from time to time, but those packets are dropped. All packets coming from WiFi interface are redirected to the host, and packets coming from host are passed directly to ESP's WiFi interface.

Compilation & flashing

  1. Install toolchain
  2. Clone this repo: git clone --recurse-submodules https://gitlab.com/goodwin-europe/raw-esp
  3. Run make: make. Firmware will be placed in firmware/.
  4. Flash your esp8266 with esptool. Following command is suitable for versions with 4MB flash. For other sizes see answer at stackoverflow esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 0x00000.bin 0x10000 0x10000.bin 0x3fc000 esp_sdk/bin/esp_init_data_default_v08.bin

Host interface

Host interface is documented in user_main/message.h.

raw-esp's People

Contributors

alexandermorozov avatar sas-goodwin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.