Skip to main content
Visitor II
December 5, 2024
Question

HTTPS server over USB

  • December 5, 2024
  • 3 replies
  • 2296 views

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?

    This topic has been closed for replies.

    3 replies

    Graduate II
    December 5, 2024

    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

    Visitor II
    December 5, 2024

    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.

     

    Graduate II
    December 5, 2024

    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?

    Visitor II
    December 5, 2024

    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.

     

     

    Graduate II
    December 6, 2024

    >>The reason is because those are the project requirements.

    Ok, but what did the specifier assume was the advantage, and mechanics here? It's one thing to specify a car with a 5,000 mile range, and another to fit a large enough fuel tank for such imagined requirement. Probe as to where the requirement came from, and the type of device they've seen it used practically, and then look at the approach taken. For example was it something using embedded Linux, and have all the plumbing and web server already part of the implementation. What Class of USB Device did it present as?

    The PC side would still need drivers, they'd be a firewall or whatever, they'd just be a different set of complications and hurdles..

    You could be a USB-CDC and plumb that to an internal X-Modem implementation, and send/receive files in a terminal. You could be a faux Ethernet adapter, and plumb you Web Server implementation into that. Got to be a wealth of example for code to copy there to do HTTP / HTTPS, how practically that would get crammed into a U5 is anyones guess, but there's probably some light-weight server/crypto implementation.

    Could you present as a Wired/Wireless Modem, fake the AT Command set to establish a data, then PPP connection, plumb that connection into your Web Server instance.

    Any commercial USB Stack vendor offering the requested behaviour?

    Visitor II
    December 11, 2024

    I cannot argue against the requirements. My job is to do the best I can to make the project work.

    There is a USB CDC ECM project under the STMU575I-EV evaluation board.  I would like to try to port it to my board, which is a NUCLEO-U5A5JZ-Q evaluation board.  Is that possible, and if so, how do I do it? 

    I looked at the instructions in the STM32CubeMX user manual for changing the CPU on a project, but that doesn't seem to work.  My version of STM32CubeMX (6.13.0) does not seem to follow the same behavior as the one in the instructions, and I need to port to the entire dev board, not just the CPU.