This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Composite USB VID Issue

Hi. I’m working on a project using the TM4C129XNCAD, IAR 7.20.2.7431 as the dev tool, and TI-RTOS2.00.02.36. We have implemented 4 virtual COM ports and they are working fine. Our customer has requested we use their licensed VID and PID numbers. I have made those changes and updated the driver, Windows recognizes the ports and everything looks fine. However, the serial devices no longer work. No other changes were made to the code other than the VID and PID.

Is there something in the library that prevents the ports from operating when used with a VID/PID other than the USB_VID_TI_1CBE and USB_PID_SERIAL licensed by TI? Thanks for any advice you might have.

  • Steve O said:
    Is there something in the library that prevents the ports from operating when used with a VID/PID other than the USB_VID_TI_1CBE and USB_PID_SERIAL licensed by TI? Thanks for any advice you might have.

    No. The VID and PID are expected to be changed by the vendor. If you're changing the VID & PIN, I'd first uninstall the previous windows driver (if you had it installed already). Then update the .inf driver description file (usb_dev_serial.inf) to let windows know what drivers it should use with that VID/PID.

    [VirComDevice.NT]
    
    %DESCRIPTION%=DriverInstall,USB\Vid_1CBE&Pid_0002
    
    
    [VirComDevice.NTamd64]
    
    %DESCRIPTION%=DriverInstall,USB\Vid_1CBE&Pid_0002
    

  • Sorry for the delay, I have been trying everything I can think of to address this issue. I have 4 virtual ports which all worked perfectly when used with the TI VID and PID numbers and driver. Simply changing the numbers to those licensed by our customer (and updating and installing the drivers successfully) results in the inability of the 4th device to write any data. The USBBufferWrite function only returns 1 even though I am writing multiple bytes, and no subsequent callbacks are issued. It seems that the host is not properly acknowledging the transmission. I tried it on multiple hosts but got the same result.

    This really should have been the simplest thing to implement. The lines below were changed in the driver to indicate the new PID and VID, and that was all that I changed:

    [VirComDevice.NT]
    %DESCRIPTION_0%=DriverInstall,USB\Vid_1560&Pid_0006&MI_00
    %DESCRIPTION_1%=DriverInstall,USB\Vid_1560&Pid_0006&MI_02
    %DESCRIPTION_2%=DriverInstall,USB\Vid_1560&Pid_0006&MI_04
    %DESCRIPTION_3%=DriverInstall,USB\Vid_1560&Pid_0006&MI_06

    [VirComDevice.NTamd64]
    %DESCRIPTION_0%=DriverInstall,USB\Vid_1560&Pid_0006&MI_00
    %DESCRIPTION_1%=DriverInstall,USB\Vid_1560&Pid_0006&MI_02
    %DESCRIPTION_2%=DriverInstall,USB\Vid_1560&Pid_0006&MI_04
    %DESCRIPTION_3%=DriverInstall,USB\Vid_1560&Pid_0006&MI_06

    I am at a loss at this point, if you have heard of any similar issues or solutions please let me know. Thanks!
  • I've made some progress: I had originally changed the PID/VID of the tUSBDCompositeDevice itself to those used by the vendor. This allowed the drivers to install but would act as described above. Changing that back to those used by TI allowed the COM ports to install and work with the updated VID/PID's. Changing just the VID and not the PID of the composite device prevented drivers from installing. So is it necessary to use the TI values for the USB Composite Device itself? Thanks!
  • Steve,

    What portion isn't working? Is it not enumerating the the Device Manager, or are you seeing some other problems with the operation?
  • The tUSBDCompositeDevice was set by default to:

    USB_VID_TI_1CBE,
    USB_PID_COMP_SERIAL,

    When I changed both of those values to the VID/PID used by the vendor (0x1560, 0x0006) and updated the drivers, they would install and enumerate properly but the last COM port was not able to write. Eventually I found that changing the composite device itself back to the defaults would allow the drivers to install and the ports to work with the COM ports set to the vendor values. So I thought there might be something in the driver that relied on the composite device using the USB_PID_COMP_SERIAL value. But when I changed the VID only for the composite device, the COM port drivers would fail to install at all (the composite device was recognized however). Windows just said "failed to find a driver" when directed to the .inf file.

    So to summarize: I have the virtual COM ports working with the vendor VID/PID values as long as I don't change the values for the composite device itself. Changing the values for the composite device results in either a failure to install the COM port drivers (when only the VID is changed), or in the case of changing both values, the failure of the last COM port to be able to write data. Confusing, I know, but thanks again for any assistance.

    Steve O
  • Sorry for the late reply Steve. I think I have enough info now. I'll try reproduce this and will get back to you.

  • Hi Steve,

    I was able to get 4 COM ports to enumerate with a custom VID/PID today; though I wasn't able to get all 4 of them to work properly just yet. I'm still looking into what I'm missing and will continue again tomorrow. My goal is to upload an example with the match .inf file.

    Thank you for your patience.

  • Hi Steve,

    I was able to reproduce your problem. I got it to work with a custom VID, but the PID had to be USB_PID_COMP_SERIAL.

    It turns out that the usblib in TivaWare does hardcode "USB_PID_COMP_SERIAL" in usblib/serial/usbdcomp.c

    The easiest solution is to stick with PID of 0x0007.

    Alternatively, though I haven't tried this, but you can change the hardcoded PID in usblib, but you need to rebuild it then. To add more fuel to the fire, in TI-RTOS 2.00.02.36 we accidently removed the IAR embedded workbench files from TivaWare.. (I've filed a bug to fix this: SDOCM00114952)

    Because we removed the IAR project files..., you can download a separate version of TivaWare from here and rebuild the IAR library in that product instance. After rebuilding it you can edit your TI-RTOS IAR project and point the compiler search path and the linker options to the new TivaWare product. I can guide you through this if you are having issues with this.

    Sorry for all the workarounds and delayed responses and I hope this will help you with the VID/PID issue.