cancel
Showing results for 
Search instead for 
Did you mean: 

HTTPS server over USB

babaluis-2
Associate II

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?

11 REPLIES 11

Like an USB RNDIS ?

https://community.st.com/t5/stm32-mcus-boards-and-hardware/rndis-over-usb-implementation-on-stm32l0/td-p/595630

Why?

Probably more practial to use a small linux implementation/board, where you can run a server, and all the crypto

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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.

 

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?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
babaluis-2
Associate II

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.

 

 

>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)

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?

 

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.

 

Will WebUSB support HTTPS?  Not sure how it works.  I'll need to read about that.

 

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.