Is there a hack/workaround to communicate from Firefox to a USB device without the Gamepad API?

409 Views Asked by At

I am developing the hard- & software for a keyboard, and I'd like to make a web-based configurator (something like the (chrome-only) Wootility for the Wooting keyboards). Support for Chromium browsers is really easy with WebUSB/HID/Serial etc., but Firefox makes it significantly harder. It should be user-friendly, but I'd gladly use messy JS code hacks. I am thinking about using the Gamepad API, but I'd like to avoid that if possible. Are there any APIs/hacks/workarounds I can use to transmit data to my USB device besides the Gamepad API?

I guess the Filesystem API would be a way, but with how restricted that is on Firefox it's not nice to use (which is my end goal, I hate having to download drivers for every goddamn device, a nice-to-use web configurator would be perfect). Implementing the Gamepad is a bit more complicated due to a few factors, but there has to be another hack that I'm not thinking of. Input to the website is pretty easy (it is a keyboard after all) but output seems pretty hard. Indicator LEDs also probably won't work via JS.

For reference, I am using an Arduino Uno (with a custom USB-capable bootloader) for prototyping, and will probably stick to an ATMEGA chip, but that won't be the issue - if I need to change my chip for that, I'd do it. If all other methods are worse/impossible I'd use the Gamepad API, but I'd like to avoid that if possible.

0

There are 0 best solutions below