-->
Page 1 of 3

Bit bang USB?

PostPosted: Thu Feb 19, 2015 7:54 am
by Rogan Dawes
Hi folks,

I was just wondering if anyone had tried bit banging USB with the ESP8266? i.e. making a "programmable USB device" that has a wifi backend.

This would be intended as a derivative/extension of the USB Rubber Ducky concept: http://hakshop.myshopify.com/products/u ... =353378649

My idea is to use the wifi to allow customisation of the keystrokes/mouse movements sent, as well as to report when the device is plugged in.

It could also be used more innocuously as a wireless remote for things like media centers, hidden servers, etc, with a suitable frontend application, if the first use offends anyone :lol:

Rogan

Re: Bit bang USB?

PostPosted: Thu Feb 19, 2015 12:04 pm
by raz123
IIRC, from the GPIO testing thread, it was concluded that the max speed the ESP could read/toggle GPIO at is ~1 MHz (when the ESP is running at 80 MHz).

This limit might make it very hard to act as a USB 1.1 device.

EDIT: False info above! ESP can toggle GPIO at 6 Mhz. CPU clock (80/160) has no effect on it.

Re: Bit bang USB?

PostPosted: Thu Feb 19, 2015 12:42 pm
by Fr4gg0r
Well we have 160MHz. :p
USB would be very cool, indeed.

I am wondering why the GPIO access speed is so slow, maybe there are unnecessary wait states? :x

Re: Bit bang USB?

PostPosted: Thu Feb 19, 2015 9:02 pm
by ficeto
well.. I have been able to get faster GPIO switch times (~25ns) but bitbanging USB requires very fast interrupt with the highest available priority preferably, which in coexistence with the WiFi functionality might be impossible. Still could not hurt to try.