HID library/module for ESP8266?
-
- Posts: 5
- Joined: Tue Aug 01, 2017 8:51 pm
HID library/module for ESP8266?
Hey, how hard would it be to port the PYB module for HID over to the ESP8266?
I'd really like to use Wemos D1 mini or NodeMCU via USB to send Keyboard and/or mouse inputs to Windows/MacOS/or Linux machines.
It looks like PYB has a profile that also keeps mass storage access alive while also sending HID commands over USB.
Is this possible on ESP8266?
Thanks!
Sent from my Moto G (4) using Tapatalk
I'd really like to use Wemos D1 mini or NodeMCU via USB to send Keyboard and/or mouse inputs to Windows/MacOS/or Linux machines.
It looks like PYB has a profile that also keeps mass storage access alive while also sending HID commands over USB.
Is this possible on ESP8266?
Thanks!
Sent from my Moto G (4) using Tapatalk
Re: HID library/module for ESP8266?
My understanding is that the ESP8266 doesn't have a USB port. It has a serial port and uses an external USB-to-serial adapter. So no, you can't easily make HID work.
Re: HID library/module for ESP8266?
Not having a USB port is not enough to stop this guy from implementing it in software:
https://github.com/cnlohr/espusb
http://hackaday.com/2016/09/03/software ... e-esp8266/
https://github.com/cnlohr/espusb
http://hackaday.com/2016/09/03/software ... e-esp8266/
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
-
- Posts: 5
- Joined: Tue Aug 01, 2017 8:51 pm
Re: HID library/module for ESP8266?
There are at least a few Dev boards that add a micro USB connector and chip to ease programming and powering the esp. Wemos D1 mini and Node MCU are two of those.
Sent from my Moto G (4) using Tapatalk
Sent from my Moto G (4) using Tapatalk
Re: HID library/module for ESP8266?
But those are client only. The FTDI or whatever clone just converts the USB PC-side to the serial communication for the ESP.There are at least a few Dev boards that add a micro USB connector and chip to ease programming and powering the esp. Wemos D1 mini and Node MCU are two of those.
Therefore, those devices are recognized USB-based COM-serial port. There is no way to switch turn this into a HID device or anything else.
-
- Posts: 5
- Joined: Tue Aug 01, 2017 8:51 pm
Re: RE: Re: HID library/module for ESP8266?
[quote="torwag"][quote]There are at least a few Dev boards that add a micro USB connector and chip to ease programming and powering the esp. Wemos D1 mini and Node MCU are two of those.[/quote]
But those are client only. The FTDI or whatever clone just converts the USB PC-side to the serial communication for the ESP.
Therefore, those devices are recognized USB-based COM-serial port. There is no way to switch turn this into a HID device or anything else.[/quote]Except using pins to make another USB interface?
Sent from my Moto G (4) using Tapatalk
But those are client only. The FTDI or whatever clone just converts the USB PC-side to the serial communication for the ESP.
Therefore, those devices are recognized USB-based COM-serial port. There is no way to switch turn this into a HID device or anything else.[/quote]Except using pins to make another USB interface?
Sent from my Moto G (4) using Tapatalk
Re: HID library/module for ESP8266?
USB is a pretty big beast. Usually, it requires dedicated hardware to operate smoothly. The ESP does not have this hardware. It is not trivial to implement it in software only, esp. if the device itself is already very limited. Therefore, I agree with pythoncoder that the mentioned bit-banging USB-project is an astonishing achievement. The question is how practical it really is, as how much can you do something else if the uC is already very busy keeping the USB-part running. I know that SoftUart on the ESP is already very tricky to operate. Thus, I assume that a Soft-USB is even more challenging.
AFAIK, there is no simple extra chip, which can add a hardware USB function to a board. The existing chips and modules always rely on a driver on the PC side and on a IC on the uC side. With this you receive and send the data from the PC via USB to the uC. However, on the PC side, the specific serial bus will be presented by the driver (E.g. a serial com port). On the uC side the chip will do the same for the uC. That the intermediate communication is via USB, is just something between the driver and the extra chip. The controller and the PC side software do not notice anything about it, it is a "N-over-X"-technology. In fact it could be something else down to pigeon carriers https://en.wikipedia.org/wiki/IP_over_Avian_Carriers. In contrast, HID however, is something USB specific it requires full awareness of the USB protocol on both ends.
AFAIK, there is no simple extra chip, which can add a hardware USB function to a board. The existing chips and modules always rely on a driver on the PC side and on a IC on the uC side. With this you receive and send the data from the PC via USB to the uC. However, on the PC side, the specific serial bus will be presented by the driver (E.g. a serial com port). On the uC side the chip will do the same for the uC. That the intermediate communication is via USB, is just something between the driver and the extra chip. The controller and the PC side software do not notice anything about it, it is a "N-over-X"-technology. In fact it could be something else down to pigeon carriers https://en.wikipedia.org/wiki/IP_over_Avian_Carriers. In contrast, HID however, is something USB specific it requires full awareness of the USB protocol on both ends.
-
- Posts: 5
- Joined: Tue Aug 01, 2017 8:51 pm
Re: RE: Re: HID library/module for ESP8266?
[quote="torwag"]USB is a pretty big beast. Usually, it requires dedicated hardware to operate smoothly. The ESP does not have this hardware. It is not trivial to implement it in software only, esp. if the device itself is already very limited. Therefore, I agree with pythoncoder that the mentioned bit-banging USB-project is an astonishing achievement. The question is how practical it really is, as how much can you do something else if the uC is already very busy keeping the USB-part running. I know that SoftUart on the ESP is already very tricky to operate. Thus, I assume that a Soft-USB is even more challenging.
AFAIK, there is no simple extra chip, which can add a hardware USB function to a board. The existing chips and modules always rely on a driver on the PC side and on a IC on the uC side. With this you receive and send the data from the PC via USB to the uC. However, on the PC side, the specific serial bus will be presented by the driver (E.g. a serial com port). On the uC side the chip will do the same for the uC. That the intermediate communication is via USB, is just something between the driver and the extra chip. The controller and the PC side software do not notice anything about it, it is a "N-over-X"-technology. In fact it could be something else down to pigeon carriers [url]https://en.wikipedia.org/wiki/IP_over_Avian_Carriers[/url]. In contrast, HID however, is something USB specific it requires full awareness of the USB protocol on both ends.[/quote]Thanks for clarifying. Looks like those pro micros I ordered will be the ticket then...
Sent from my Moto G (4) using Tapatalk
AFAIK, there is no simple extra chip, which can add a hardware USB function to a board. The existing chips and modules always rely on a driver on the PC side and on a IC on the uC side. With this you receive and send the data from the PC via USB to the uC. However, on the PC side, the specific serial bus will be presented by the driver (E.g. a serial com port). On the uC side the chip will do the same for the uC. That the intermediate communication is via USB, is just something between the driver and the extra chip. The controller and the PC side software do not notice anything about it, it is a "N-over-X"-technology. In fact it could be something else down to pigeon carriers [url]https://en.wikipedia.org/wiki/IP_over_Avian_Carriers[/url]. In contrast, HID however, is something USB specific it requires full awareness of the USB protocol on both ends.[/quote]Thanks for clarifying. Looks like those pro micros I ordered will be the ticket then...
Sent from my Moto G (4) using Tapatalk