Skip to content

ESP8266 as generic network interface over UART

Notifications You must be signed in to change notification settings

HelclM/Prusa-ESP-Nic-FW

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WiFi NIC

How to run this

This implements Wifi NIC on top of UART and ESP8266. The NIC can be used either on Linux using provided script or attached to another MCU and integrated with LwIP as network interface.

Build environment

Either build docker image as described by provided Dockerfile or proceed according to the ESP8266 RTOS SDK user manual

Build

This assumes SDK environemnt was sources and current directory is checked out root of the project.

Build the project and flash it to the board, then run monitor tool to view serial output:

idf.py all

Flash from printer

Create ESP directory in the root of the USB flash drive. Copy following files to it:

  • build/partition_table/partition-table.bin
  • build/bootloader/bootloader.bin
  • build/uart_wifi.bin

Insert it into printer and start ESP flash from the menu.

Flash using USB "programmer"

Reset ESP with IO0 down and issue the following command.

idf.py -p /dev/ttyXXX flash

Test on Linux

  • Make sure your Linux supports tap devices
  • Compile this
  • Flash the binary into ESP
  • Tune constants in tap/tap.py. Make sure that baud rate is the same in uart_nic.c and tap.py
  • Run tap/tap.py. Note: If it doesn't print TAP: ESP FW version: ... or TAP: Device info mac ..., there's a problem with the serial connection and you may need to reduce baud rate to i.e. 1000000 and reflash.
  • Check tap device was created
  • Run dhcp client on tap device, i.e. sudo dhclient tap0
  • Check this works as (terribly slow) network interface

About

ESP8266 as generic network interface over UART

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 81.9%
  • Python 14.1%
  • Dockerfile 2.2%
  • Other 1.8%