2009-03-22 11:54 PM
Multiple Virtual COM port STM32
2011-05-17 04:06 AM
Anybody know, it is possible or not?
How to create it from base sample ''STM32 Virtual COM''2011-05-17 04:06 AM
I think it´s possible, but you will have a lot of work to do.
I´m trying to do a similar thing with an audio device. Windows is already enumareting it correctly but the second interface isn´t working yet. Beside the descriptors, I´ve got to change the xxx_Get_Interface_Setting() function to get the second interface to enumerate. [ This message was edited by: brunoalltest on 18-03-2009 04:29 ]2011-05-17 04:06 AM
Can I see your sources? (descriptors section)
2011-05-17 04:06 AM
Thank you. I tryed it.
May be, ''device'' should have its own descriptors. This - ''Virtual_Com_Port_DeviceDescriptor'', and this - ''Virtual_Com_Port_ConfigDescriptor'' ? I find this:void USB_Init(void)
{
pInformation = &Device_Info;
pInformation->ControlState = 2;
pProperty = &Device_Property;
pUser_Standard_Requests = &User_Standard_Requests;
/* Initialize devices one by one */
pProperty->Init();
}
Look at comment. What do you think about it? May be, that my suggestion is true? There are some difficulties... What about endp0, that can be only single, and deny any sharing between devices.
2011-05-17 04:06 AM
My single device project is avaible on the topic
http://www.st.com/mcu/forums-cat-8010-23.html
My multiple device project isn´t working the way I want yet. I prefer not to to share until it´s working. About the configuration descriptors. For one audio device it was:2011-05-17 04:06 AM
USB Composite Devices have only one Device Descriptor and the application(and Class) is specified on Configuration Descriptor.
So the bDeviceClass, bDeviceSubClass and bDeviceProtocol of the Device Descriptor are all set to 0x00. The audio example I´ve working on came this way, but I´ve just looked the Serial Port Example descriptors(attached) and the bDeviceClass of the Device Descriptor is set to 0x02 (CDC). I don´t know if the CDC class need it to be defined on the Device Descriptor or it was decision of the ST Applicaton Team. You should check the usb.org documents or . I´ve remembered that my USB JTAG DEBUGGER(Olimex ARM-USB-TINY) is a composite device and has a Virtual Comport and decided to check its descriptors(attached) on and USBlyzer. It don´t use the CDC class anywhere. It uses two Vendor-Specifc interfaces(bDeviceClass=0xFF) on the Configuration Descriptor, which means writing your own drivers. So... I don´t think you will get multiple serial with bDeviceClass set 0x02 in the Device Descripotr as in the ST example (maybe I´m wrong). And if bDeviceClass=0x02 in the Device Descriptor is a must for CDC class, it probably won´t be possible to have multiple serial based on the CDC class. (maybe wrong too). But if I´m right and I think I am... it´s only possible to have multiple seriall using Vendor-Specific class on the interfaces and custom drivers on your Operating System. And that´s painful. ----------- About the pProperty->Init(), it´s just a indirect call to Speaker_init(). Regarding enumeration, there´s nothing to change there. [ This message was edited by: brunoalltest on 19-03-2009 04:31 ] [ This message was edited by: brunoalltest on 19-03-2009 04:35 ]2011-05-17 04:06 AM
Found something.
Check , option 4.2011-05-17 04:06 AM
Cognitive... Thanks!
I tryed to use bDeviceClass, bDeviceSubClass and bDeviceProtocol 0x00. OS detect my hardware as composite device, but catastrophic crash happend if use ''usbser.sys''. My config in attach. I read usb.org forum, but no information found about twice CDC (exactly Virtual COM). Somewhere I found information, that usbser.sys not support multiple CDC, and I think nothing.. because WDM and driver development is ''dark wood'' for me...2011-05-17 04:06 AM
See that about IAD, and how to add it I dont know.
Now I try to read and understand monster USB specification about this.