[USB] Features request list
This issue aims to list all USB requests:
- [ ] RNDIS (#506): networking over USB
- [ ] Library (#559): Extend USB class support using Pluggable USB from Arduino and providind more classe support. Example in Mbed:

- [ ] USB Composite(#668): request to port it on this core. Not based on STM32 USB Device Library. Currently, target STM32F1 using Arduino_STM32
- [ ] UHS30: USB Host Library version 3.0 (#768)
- [ ] USB host support (#792, #817 )
- [ ] Debug (#803)
- [ ] basic Arduino library "MIDIUSB" (#1533) (require PluggableUSB)
- [ ] RawHID #2216
Like i've mentioned in #817 i'm looking foward for USB Host implementation, spesifically ACM VCP implementation. I basically need to create virtual serial port and talk to device through that.
Also, when the library is implemented I'll be happy to share my project as an example for the library maybe ? Thank you
Is there any progress on implementing PlugableUSB ? Is it even going to happen ?
Hi @oofus , Time is always the missing ingredients. So, currently, there is no progress on this. Any contribution are welcome 😉
Hi @fpistm Thanks for the answer, at least I know the current status now.
Using and implementing are two quite different things. Just being willing to "give it a go" shouldn't be the criteria by which you pass an interview. You don't want any of my code near the core libraries !!!
Cheers
Hi there. Would you tell us where we can find some examples of that USB Middleware library. Or write us one example code like read/write from a mass strong host device by using the MSC lib. even for STM32CubeIDE so we can start porting it for Arduino. Also is there any way that we use the Arm Mbed APIs with Arduino_Core_STM32 core? Here is USBMSD API and functions for the mbed.
Thank you for your work. Can you provide an example of keyboard that can be used in BIOS environment
Thank you for your work. Can you provide an example of keyboard that can be used in BIOS environment
Hi and welcome. There is already a HID Kbd example. Don't know if it can work in BIOS environment.
Hi, I tested the keyboard in BIOS environment. It works well, but I can't find an example of AbsoluteMouse. I'm trying to modify the Mouse library
Fine. For absolute mouse, I never tried. I guess you will have to modify the library.
In fact it seems it will requires more dev as currently the mouse only send the relative move. There is no get report. What is your goal? get the absolute position or send it ?
I want to make a remote mouse, sending absolute coordinate data is easier to control it than using relative coordinate data
In fact it seems it will requires more dev as currently the mouse only send the relative move. There is no get report. What is your goal? get the absolute position or send it ?
I generate the mouse position in the webpage, send it to ESP32 through the server and then send it to STM32, and then STM32 controls the mouse movement of another computer
I added moveTo(uint16_t x, uint16_t y, uint8_t wheel) and modified HID_MOUSE_ReportDesc HID_MOUSE_REPORT_DESC_SIZE and still cannot control the mouse
@fpistm , time flies. How about the function of USB Host now?
@MS1987
@fpistm , time flies. How about the function of USB Host now?
and it will continue. Time is always the missing ingredient.
Hi, @fpistm
I'm an active marlin contributor.
And I just got usb host with mass storage working on marlin, using your middleware + conf generated in cube mx for otg on gpio.
I would to like to know what is the api/interface that I should follow to send a PR to you. Or general guidelines for the integration of the usb host. Any info will help me to send a good PR for you. :-)
That’s great! I’ll be looking up to it @rhapsodyv
@rhapsodyv Here is the USB Middleware library and here is the USB API documents for ARM mbed OS which would be nice if we can port and use it inside Arduino core.
I just pushed a working version, #1196. Right now, it just expose the default USBH_MSC_ interface from STM32_USB_Host_Library.
There're some work to do, and it isn't a standard interface yet, but I think it's good for a first version. And it's working! I'm using it in Marlin.
I commented with a sample usage too.
still no examples for Joystick via USB HID Middleware, and MHeironymous's Joystick library relies on HID.h (arduino core) -> PluggableUSB.h (arduino core) -> USBAPI.h (arduino core)
Is USB MSC + CDC ready?? Any example available??
@Hyratel I don't know if its still relevant to you but i just "completed" a basic library to add the traditional HID/PluggableUSB support. It is in nowhere ready for merging in the core, but if MHeironymous's joystick emulation is all you need you can use it right now. ;)
If anyone else comes across this and is knowledgeable in usb feel free to contact me to make the library more compatible. :)
@Levi--G I'd definitely be interested in what you have thusfar and yes - MHJoy is about all I'm after for this. it's about the only thing blocking the 32F401 from being a viable competitor to the 32F103 or Pro Micro in the Simpit and Custom Joystick scene (MHJoy is kinda Hammery (very few iterative loops, everything is done in a very sequential way; it makes a good primer to HID descriptor construction) but also very understandable to an amateur like myself, it has a very clean structure)
@Hyratel Well i noticed a while ago that my library actually works "by accident" if you just use the HID class it will work, but while working on receiving code i noticed i would have to redo a lot of code already in the framework... So now im running into the issue my library would need to replace framework files to work, which would either be manually or via some scripting in platformio, not compatible with arduino ide. So atm im still figuring things out :/ if you use platformio and only are interested in basic HID with SEND only and no USBSerial you can use my lib here: https://registry.platformio.org/libraries/levi--g/USBLibrarySTM32 But a proper redo with receiving and proper endpoint handling will take some time sadly :(
@Levi--G I got it working on F401 with your LibHack, so it's rough-and-ready for that. I look forward to it being given bidirectional, but even this much is a watershed moment for the chip's usability
(this is long overdue, considering that the chip has been around for almost 10 years now)
I'm looking for a USB MIDI Device or Host example for the F103C6 or F103C8. Is there already one available?
I've currently this one working (USB MIDI Device): https://github.com/arpruss/USBComposite_stm32f1/blob/master/examples/midiout/midiout.ino
But it uses the Maple core and is incompatible with other libraries that are using the STM32Duino core.
Edit: Seems my question is related to https://github.com/stm32duino/Arduino_Core_STM32/issues/1533
Hi @SunboX,
unfortunately not. IIRW, On the forum some ones talk about this but I guess there is no progress.
@SunboX Well... i wrote a library to support all the original arduino usb libraries (i linked it a bit up) but i did not test MIDI yet, and installation is kindof hard atm since there is a bug in platformio, ill see if i can get it working yet and maybe you can test it then? It might work or not, but might be worth trying?
@SunboX Hi, sorry to ping you twice, but i just tested my library with the default arduino MIDIUSB and it works, I included a sample in the repository, it might not be ideal (especially with the extended installation procedure) but it might at least work with the new core :)
@SunboX Hi, sorry to ping you twice, but i just tested my library with the default arduino MIDIUSB and it works, I included a sample in the repository, it might not be ideal (especially with the extended installation procedure) but it might at least work with the new core :)
Nice @Levi--G Thanks for sharing.