Showing results for 
Search instead for 
Did you mean: 

HTTP over USB...?

Associate III

part of the project I am working on, I have been asked to add an external device to a vending machine. It is an age-recognition system that would interface with the main controller via USB. But apparently uses HTTP protocol over USB if I understand correctly...?

Attached is a (very short) PDF of the API and the product brochure. In the brochure there are 4 devices there but the one I've been asked to use is the one on page 4 and 5. It is like a USB pen drive that you can plug directly into a PC. At the back of it there is another USB port where you plug in the web cam. There are no other connectors. That is the whole system for age recognition. On page 5 it also says "no internet required"...


You just send a command to that USB tiny device and receive back an answer... either ACK or NACK depending on the age.

I am very familiar with C/C++ but never worked with networks. I barely know what HTTP is... 


So I am wondering (if you could look at the attached screenshot):
- is that HTTP over USB (if such thing exists)?
- what do I need to implement on the host micro software-wise to communicate with the external device...? maybe some "server" software? (again no idea how HTTP even works or what it needs). Or do I simply send a packet via USB with the text (perhaps) in the attached screenshot?

As always, any help and suggestions is much appreciated!


Thank you


Thank you

Pavel A.
Evangelist III

age-recognition system 

Really? How are you going to implement it?

@Pavel A.

I don't, I just use a ready made solution. I updated the original post with the product datasheet, API manual and additional comments in the post itself.

I hope that helps in case you are interested in using it. I just found out about it yesterday.

Andrew Neil
Evangelist III

@Ricko wrote:

I barely know what HTTP is... 

Start here:

Although it's customarily transported over TCP/IP,  it is actually all just plain text - so it's just a matter of sending,  receiving, and parsing plain text.




@Ricko wrote:

On page 5 it also says "no internet required"...

Looking at it, I think that just means that you don't actually need to be connected to the Internet - but the transport is still using TCP/IP

There's a support contact email address in the document - have you tried asking them?



IP-over-USB is a thing: 

also Ethernet-over-USB: 

Pavel A.
Evangelist III

Well if this thing has *that* IP-over-USB - then it can be indeed Segger's or similar implementation of embedded http server behind USB RNDIS or CDC-ECM device. From the host point of view, it is a standard LAN adapter, similar to USB to ethernet dongles.  The host must have matching host side USB driver, RNDIS or CDC-ECM.  and TCP/IP & http client software. Windows or Linux has all this, but if the host is a STM32 ...good luck.


Senior III

[Rewritten to remove my mistakes]


You can use an STM32 to implement an CDC-ECM *device*, but for an STM32 to be the host *talking* to such a device, I don't think there's anything ready-made for doing that.


Assuming the device implements CDC-ECM, to talk to it you would have to dive into the appropriate USB Class device spec and do some real work.


See STM32 USB Host Middleware and UM1720: STM32Cube USB Host Library User Manual for a starting point .(Spoiler: CDC-ACM (Virtual Com Port) is supported, CDC-ECM is not).


It would be much easier to use some kind of SBC instead, like a Raspberry-Pi running linux.

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.

@Pavel A. wrote:

Windows or Linux has all this, .

and, looking at the brochure posted by @Ricko, this thing is intended for use in PoS (Point-of-Sale) terminal applications - which are likely to be Windows or Linux based ...

Thank you all. 🙂

After speaking with them, it is designed to work with Windows and Linux but they can offer another system that provides a much simpler output interface.

Thank you all.🙂

After speaking with them, it is designed to work with Windows and Linux but they can offer another system that provides a much simpler output interface.