Can we access the virtual COM port using COMx rather than \\.\wceusbsh001?

Hi @raja.tx,

Thanks for getting back to me and sorry for the delay in my response. When I use the new driver that you built I still see that the class is 2 and the subclass is 0xFF, could you double-check that file?

To test it, I followed the same process which I am already using for the modified RNDIS function driver which Toradex sent to me a couple of years ago. I renamed the new file to serialusbfn2.dll and I put it in the \FlashDisk\System folder.

Then I changed these registry keys:
HKLM\Drivers\USB\FunctionDrivers\USBSER_Class\Dll from “serialusbfn.dll” to “serialusbfn2.dll”
HKLM\Drivers\USB\FunctionDrivers\DefaultClientDrive to “USBSER_Class”
HKLM\Comm\USBFNSER\ImageName from “serialusbfn.dll” to “serialusbfn2.dll”

But the USB Subclass is still 0xFF.

I thought that maybe I was not correctly pointing WinCE to the new file, so I tried leaving the registry set to “serialusbfn2.dll” and I deleted the file \FlashDisk\System\serialusbfn2.dll. When I did that the PC reported that I had an “unkown USB device”. That makes me think that the Colibri module actually is using the new DLL that you sent to me when I put it in the \FlashDisk\System folder, but the new DLL still uses a Subclass of 0xFF.

Am I doing something wrong with the registry settings?

Mike

Dear @MikeS,

I am able to see the changes, please refer my attached USB descriptor details here : USB Descriptor, Could you run UVCView on your PC and catch the similar USB descriptor details and share with us?

Hi @raja.tx,

Those files which you sent are very useful. I see the same USB descriptors on my PC that are in the text file that you sent. I can see that you did change the subclass from 0xFF to 0x02 in the USB device descriptor, but the subclass is still 0xFF in the interface descriptor (See below). I’m not sure about the difference between the device and interface descriptor, but I think Windows may look at the interface descriptor first because this device shows as subclass 0xFF in the Windows Device Manager.

Could you look at the DLL source code and see if there a place to change the interface descriptor subclass as well as the device descriptor subclass? Then we can try it again on Windows 10.

          ===>Device Descriptor<===
bDeviceClass:                      0x02  -> This is a Communication Device
bDeviceSubClass:                   0x02

          ===>Interface Descriptor<===
bInterfaceClass:                   0x02  -> This is Communications (CDC Control) USB Device Interface Class
bInterfaceSubClass:                0xFF

Thanks for helping me with this, I feel that we are close to a solution!

Mike

Dear @MikeS,

I modified the driver as you requested, could you try this driver and let us know the feedback. Meanwhile, I will try to read this topic to understand better.
Thank you.

Hi @raja.tx,

That version works on both Windows 7 and Windows 10! On Windows 10 it works without me having to provide a .inf file, it’s truly plug-n-play. On Windows 7 I do still need to supply a .inf file to make it work, but that was expected.

I realized that with both the original version of the driver and the intermediate one you sent with with a device descriptor subclass of 2 actually can be made to work with Windows 10 by careful use of a .inf file. But Windows 10 is more fussy than Windows 7 about .inf files so the plug-n-play solution using subclass 2 in both the device and interface descriptors is very attractive.

I think that I have everything that I need now as I can deploy the modified driver that you sent me. You might want to consider including that driver in a future version of the WinCE image so that everyone else can benefit from it more easily. The change seems to have no impact on Windows 7, but it makes using it with Windows 10 much easier.

Thanks for all your help with this,
Mike

Dear @MikeS,

Thank you for your testing and letting us know the update.

It seems bInterfaceClass and bInterfaceSubClass is important for class specification but bDeviceClass and bDeviceSubClass is not really important. So I made undo the bDeviceClass and bDeviceSubClass changes and only bInterfaceSubClass is set 2 and the driver is built and uploaded

Could you test with this driver and let us know the feedback then we would like to integrate this chance to our standard release image.

Hi @raja.tx,

The latest file you sent also works on Windows 7 and Windows 10. It appears to be functionally identical to the previous file which you sent. It shows up as class 2 and subclass 2 in the device manager of both Windows 7 and Windows 10.

I see this in the USB device viewer that you sent to me:

          ===>Device Descriptor<===
bDeviceClass:                      0x20
bDeviceSubClass:                   0x00

          ===>Interface Descriptor<===
bInterfaceClass:                   0x02  -> This is Communications (CDC Control) USB Device Interface Class
bInterfaceSubClass:                0x02

Mike

Dear @MikeS,

Thank you for your feedback. We are not planning to integrate with our standard release image as it is not a more generic fix for other use cases.

Wish you good luck for your further development works!

Dear @Matte
It’s expected to work.
Please take a few minutes to test it, and everybody in the community would appreciate if you share your result here.
Thank you and best regards
Andy

Dear guys,
could you tell me if this procedure works with PXA or there are any other changes to do.
Thank you

Dear @andy.tx ,
I did the following steps:

  • copy the SerialUSBFn.dll in \FlashDisk\System\SerialUSBFn.dll

  • change the Serial_Class registers:

    • Dll : \FlashDisk\System\SerialUSBFn.dll
    • idProduct 0x79
    • DeviceArrayIndex 0x01

Using this configuration it’s not working.
Could you tell me if I miss anythings?
I attached the registerPXA.reg

Thank you

registerPXA.reg

In my application I use the following code:

HANDLE hPort;
hPort = CreateFile(TEXT("\\$device\\com0"), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL );

using PXA and VF61 the result is hPort = INVALID_HANDLE_VALUE;
using T20 is hPort is VALID_HANDLE_VALUE;

Best regards
Matteo

Dear guys,

I tried the previous changes on:

  • T20 WinCe7 and it’s working.
  • VF61 on WinCE6 and it’s not working.
  • PXA on WinCe5 and it’s not working.

I don’t understand if I’m wrong anythings.
Could you help me?

Dear @Matte,

Did you connect VF61 and PXA to the Windows 10 PC and wrote the serial port application to use that?

May I know your Windows 10 update version?

This special bInterfaceSubClass to 0x2 not required for Windows 10, 2019 march update onwards. Could you test update your Windows 10 till 2019, March and do the test again.

Still, if you need this fix, May I know which is your target platform, Is it VF61, WinCE6 or PXA, WinCE5. We may need to build SerialUSBFn.dll with the bInterfaceSubClass change.

Dear @raja.tx ,

I’m sorry of late answer, but the last two weeks I was outside, and I didn’t try your suggestions before to today.
I had update Window to 1903, and I tried with WinCe6 VF61,
but the connection is not worked.

Best regards
Matteo

Dear @Matte,

I am looking into Windows 10 update and without special driver to fix the issue.
Meanwhile, I built special serialusbfn.dll with bInterfaceSubClass is 0x2 fix that I would like to share with you for testing : serialusbfn_ce6. Could you test this driver with Vybrid, CE6 and let us know the result.

You need to follow below steps

  • copy the SerialUSBFn.dll in \FlashDisk\System\SerialUSBFn.dll
  • change the Serial_Class registers:
    - Dll : \FlashDisk\System\SerialUSBFn.dll

Dear @Matte,

Quickly I tested with last serialusbfn_ce6 driver, it is working for me with Windows 10. I used termterm Windows 10 application and terminal CE WinCE application.

I used this inf file on Windows 7 to set the driver.

Please let me know similar setup is working for you?

Dear @raja.tx ,
I tried the solution on the Colibri eval board and it works, but with that same VF61 on our hardware, it does not.

I attach the electrical diagram of our custom board along with a copy of the registry extracted from the VF61 we tested.

Perhaps there are some pins that need to be set and that we did not?
By the way, we set pin 137 to output 1.

Kind Regards

Dea @raja.tx,

I don’t understand if the problem is my hardware or/and my application.

Can I use a demo program on the evaluation board in order to test this problem?

Best regards
Matteo

Dear @Matte,

Thank you for your reply.

I would like to request you below test and let us know the feedback.

  1. Try this USBFn only and verify the serial driver is working?

  2. Set CableDetectPin to other than 137 e.g.135, manually give high or low voltage to the pin to verify the Client driver is loading or not. If you set 137 then CableDetectPol always 1, should not set to 0.

  3. SODIMM 137 signal is 3.3v tolerant, please refer below picture Is that D1(137) connected to SD card(CN7) in your schematic?
    1878-selection-008.png