2024-12-05 09:58 AM
I need to set up an HTTPS server over USB using the STM32U5A5 microcontroller. I do not see an example of this configuration. There are examples of HTTP servers for other microcontrollers using USB, but not HTTPS and not for the U5A5. Is it possible to make an HTTPS server over USB? How do I start? Is there example code for the U5A5 Nucleo development board?
2024-12-05 10:46 AM
Like an USB RNDIS ?
Why?
Probably more practial to use a small linux implementation/board, where you can run a server, and all the crypto
2024-12-05 12:32 PM
Why? Because the project requirements say that it shall have a HTTPS server on a Nucleo STM32A5U5 board using Threadx, USBx and NETXDUO.
So I am looking for an answer about how to do this, and possibly an example program that demonstrates it.
2024-12-05 02:20 PM
But you ask if this is possible and how, as if the person generating the project requirements just threw in some buzzword salad.
For the thing you're plugging this into, you'd presumably need to present as a Virtual Network Adapter. And you'd access via an IP address in your browser.
People normally present files via MSC or MTP USB Devices, some reason you need to invent something more convoluted?
2024-12-05 02:57 PM
The project requires that the STM32u5a5 board presents an HTTPS web server via USB to a PC host. Not a mass storage device. The browser will be running on a PC. The U5A5 board will be serving up web pages. The reason is because those are the project requirements.
2024-12-05 03:52 PM
>you'd presumably need to present as a Virtual Network Adapter. And you'd access via an IP address in your browser.
Not necessary, since advent of WebUSB. With WebUSB you can bootstrap from some html file that runs scripts and renders the view. The USB device can talk any supported protocol (for example CDC ACM or HID)
2024-12-05 04:11 PM
If there is a way to make this work with CDC ACM I'd be interested in that. Maybe a virtual com port and PPP?
2024-12-05 04:25 PM
Yes it support CDC ACM (virtual com port). From there you could roll your own PPP - but why? WebUSB script already runs in a browser, it can get data from the device and render it right there in the browser window. Ah, because there's a requirement, I see.
2024-12-05 04:34 PM
Will WebUSB support HTTPS? Not sure how it works. I'll need to read about that.
2024-12-06 08:32 AM
WebUSB does not directly support HTTPS. It just works with native USB devices. The web page that runs it (and its internals such as web sockets etc) may use https as it wants to.