ESPUSB – An USB Software Stack For ESP8266

7327
1

ESP8266EX and even the new ESP32 SoC lack a USB hardware transceiver, so [CNLohr] decided to develop a USB software stack for ESP8266. After a quick search, I think it is the first try to do a USB software stack for esp8266. USB software stack is a firmware-only implementation of a USB. ESPUSB works in a similar way of V-USB for AVR MCUs.

This USB Stack uses D- on GPIO 4 and D+ on GPIO 5 and only operates with low-speed USB. To run ESPUSB on ESP8266 it will need about 317 byte of SRAM and 1422 byte from flash/IRAM.

USB Enumeration Using ESPUSB - Images courtesy of cnlohr
USB Enumeration Using ESPUSB – Images courtesy of cnlohr

[CNLohr] said that he could flash ESP8266 using the ESPUSB.

Flashing ESP8266 Using ESPUSB - Images courtesy of cnlohr
Flashing ESP8266 Using ESPUSB – Images courtesy of cnlohr

[CNLohr] described in a video the code of ESPUSB and how he developed it.

A forum for discussion for ESPUSB was created in ESP8266 website.
You can reach the source code of ESPUSB project on the GitHub repository.

Via: cnx-software

UPDATE(2/8/2016): [CNLohr] published a tweet, containing a photo of a PCB module for ESPUSB, it’s a small stick that can be plugged into USB directly. It uses ESP8285 SoC, same as ESP8266EX one but with built-in flash memory.

ESPUSBPCB

He also uploaded a video on Youtube showing the new PCB plugged into his laptop which is detected as HID mouse device using the ESPUSB USB software stack. He controls the mouse pointer over WiFi using an application from his phone.

 

 

One Response on “ESPUSB – An USB Software Stack For ESP8266

  1. I did the same thing 4 -5 years ago the same way under PIC processor, started from a mouse and use digital analyzer and Microsoft packet analyzer and wrote string bit 1,2,1,2 and loop through the bit flipper how they actually show in the X,Y possible is really fun. But i have to said you really impress me that you really go all the way decoding the whole thing in deeper manner than i do. But I do admit this method is really straightforward and more easy to understand than how they but the USB document are. plus not necessary to have big foot print of code on those functions that we don’t want. like we only want HID only and which the other emulation is not required.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.