cancel
Showing results for 
Search instead for 
Did you mean: 

USB Host communication

bfeixas
Associate II
Posted on May 22, 2012 at 14:04

Hi, 

I've got a device with an STM32 micro in USB device mode with a program  of virtual com, that communicates fine with the PC and let me send and receive from the device commands by virtual COM.

Now I want to develop another device which has to communicate with the first device using the USB port (like if the new device was the PC). I'm using a connectivity line micro in these case in order to make it as a host, but I don't know where I could find an example of this type of communication between the devices.

Any one could give an idea for the most similar example for what I'm trying to do?
5 REPLIES 5
alok472
Associate II
Posted on May 23, 2012 at 05:34

Start with ST's example on USB Host lib on mass-storage & HID. See UM1021 and the firmware. you will need to make changes for CDC class.

btw, why is Vcom host needed ? what is the application ?

bfeixas
Associate II
Posted on May 23, 2012 at 14:37

Thanks for the answer, this will hepl me to start

About your doubts I see I haven't explained it right.

Our company designed an audio preamplifier (controlled by STM32F103 ARM) which has an USB input with 'virtual com' used to receive comands and ask states from PC. 

But now our customer asked us for a ''tester device'' which would do everything what the PC did but automatically (for production). So that we designed it with the connectivity line micro, as they are host USB in order to make the same that the PC do.

I'm looking to the information given and I supose I will find the way it works, thanks.

bfeixas
Associate II
Posted on May 28, 2012 at 18:55

After looking a lot about I've found this that had helped me: h

http://www.keil.com/forum/20569/

But it's not enough for me, I need to find some code example. I am just trying to comunicate to an USB CDC device with my USB host, could anyone show me the code example of this?

I just can find example code from Mass storage or HID, but I'm trying to do something easier of that, or I think so.

Thanks

xiaomei20071004
Associate
Posted on October 29, 2014 at 02:48

hello,I have met the same problem with you. Could you tell me how you solved the problem finally? I am really confused with this problem.

chen
Associate II
Posted on October 29, 2014 at 12:24

You asking on a thread that is 2 years old - very unlikely they will answer you!

You need a STM32 that supports the USB OTG libraries (Or the STM32Cube equivalent).

http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257882

Look at a USB Host CDC or VCP example.