• Since the ESP32-Pro includes the USB host mode, will Espruino detect it and allow it to be accessed natively? I would experiment and try it but it is a new unit and don't want to overwrite the firmware it is will not work. Thanks!!

  • After further research, I see that I need to copy the ESP32 board definition file to create an ESP32PRO.json file and add the USB specific info, pin assignments, etc. I also looked that the Olimex hardware info pages at https://github.com/OLIMEX/ESP32-PRO. The steps needed are a bit beyond my knowledge base. Will there be enough interest for someone to go through the build process?

  • sounds interesting, there is a command in Espruino, http://www.espruino.com/Reference#l_E_se­tUSBHID
    I'm pretty sure, this was never tested on ESP32.
    AFAIK, its supported for STM32 only, and there is no general interface for USB in jshardware.js
    Therefore it would need a change in Espruino core and Gordon should be involved.
    Usually, he has some nice ideas ;-)

  • @StuartRothrock
    cannot find any example nor component for USB HID on ESP32.
    Existing HID examples are for bluetooth only, and based on Neil Kolban
    Do you have anything else helpful for ESP32 ?

  • Thank you JumJum!
    I believe there aren't any examples because the USB Host mode only became available with the Pro version of the ESP32 hardware. The hardware link above would define the hardware pin assignments to the USB provided by a PIC32MX270F256DT. Olimex's blog mentions it briefly https://olimex.wordpress.com/2017/06/21/­esp32-pro-new-iot-board-with-4mb-externa­l-ram-4mb-external-flash-external-crypto­-engine-lipo-charger/.

    I currently use the E_setUSBHID and E_sendUSBHID with the USBKeyboard, USBMouse and USBTablet modules for the Pico and Wifi. The problem is that they are not available in a build that does not define USE_USB_HID which requires further hardware definition.

  • I think the likelihood of this ending up as part of Espruino is very low unless Olimex got involved in the software - it's not anything on the ESP32 itself, so any work done would be specific to Olimex's one board with the PIC microcontroller on it - and there's really no reason for me to spend time working on that for free.

    Of course it might be that Olimex has some nice API for turning the PIC into USB HID, in which case you could probably implement the relevant things you want in JavaScript pretty easily

  • understood... I'll see what Olimex says in a couple weeks after they return from their annual vacation that started today.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

ESP32-Pro is Equipped with a USB Keyboard/Mouse HID - Will it work?

Posted by Avatar for StuartRothrock @StuartRothrock