Hi,
I want to use the MQX USB driver configured as a CDC device. I am using the "virtual_com" example app that comes with MQX 3.6. I'm running on a M52223EVB.
I am running virtual_com successfully on the M52223EVB and I am communicating with a Windows/XP PC using Tera Term. I am not able to get a connection on a Windows 7 PC. The goal for this product's USB interface is for the host app to be a single common Java program which runs on the different PCs listed below, opens and tests the different serial interfaces to find the product and start communicating with it.
The product that this is being designed for will interface to:
- Windows PCs (various flavours XP, Vista 32 & 64 bit and Windows 7 32 & 64 bit)
- Macs
- Linux machines
My understanding is that a device that is set up as with the CDC interface provides this capability - but in the "virtual_com" folder, there is the "inf" folder which contains "fsl_ucwxp.inf" which must be installed on a Windows/XP machine for this to work - when I try it on a Windows 7 PC, I get "Unknown Device" in device manager and Windows 7 will not allow loading "fsl_ucwxp.inf".
I have reviewed the USB.org "Universal Serial Bus Class Definitions for Communications Devices", Revision 1.2 which covers the CDC as well as the USB 2.0 specification and the class definition in virtual_com.c seems to be correct. I have also searched the FLS forums and tried the trick suggested by BugMan to set the CIC_PROTOCOL_CODE value to AT_250_PROTOCOL as well as trying to associate "usbser.sys" to the "Unknown (USB) Device" in my Windows 7 machine as suggested in the uTasker documentation.
Is there a way to set up a CDC driver that will appear as a serial port in whatever type of PC (defined above) without the need for special host .inf or .sys files?
Thanx,
myke
Solved! Go to Solution.
This might be helpful for everyone having this kind of problems: installing the CDC (aka virtual COM) drivers under Windows 7 and 64bit.
First: I'm using the USB Stack with PHDC Support from www.freescale.com/usb. Installed it on my Windows 7 machine (32bit). I managed to have it compiling and downloading both for my MCF51JM128 and MCF52259 boards, and both on my Win7 32bit and my other Win7 64bit machine a driver installation was showing up under Windows.
Under Win7 32bit I pointed to the fsl_ucwxp.inf as delivered in the USB stack, and everything worked fine. But not on Win7 64bit.
Here the .inf file from
https://community.freescale.com/thread/53330
made the trick:
- store it as .inf on your Win7 64bit machine
- go to the device manager and find the unknown device (JM CDC DEMO) and in the driver details, update the drives
- IMPORTANT: Select 'Browse my computer for driver software'
- IMPORTANT: select 'let me pick from a list of device drivers on my computer'
- use 'show all devices' and use 'have disk' to browse to the .inf file mentioned above
- this will show up as 'Frescale CDC device' :smileyhappy:
now the rest is easy.
HEUREKA :smileyhappy:
BK
Hi,
don't forget that CDC class is not "virtual COM" class, so it comprises much wider scale of devices. Even you can create your own subclass within CDC class. Perhaps that's why you need separate inf / sys files for each subclass or device. So the answer is, that you need .inf files and probably there will not be a .sys driver in Windows covering all the possibilities- so you wouldnt be able to cover many devices with a simple .inf file.
(inf file just tells Windows which driver to use with which device)
Hi Juro,
Thanx for the reply.
I've been doing quite a bit of reading today and I think I understand the need for the .inf files in Windows files (although they don't seem necessary fro Mac and Linux machines).
Unfortuntately, that doesn't help me with my primary problem and that is I can't get a Win7 PC to recognize the MCF52223 virtual_com USB CDC app (as I said, a WinXP recognizes it without any issues).
When I plug the evb's USB port into my Win7 machine, I get a "beep" along with the message that the "USB Device Not Recognized" and under "Universal Serial Bus controllers" in "Device Manager", an "Unknown Device" comes up.
When doing this on a WinXP machine, I point to the "fsl_ucwxp.inf" file in "Freescale MQX 3.6\usb\device\examples\cdc\virtual_com\inf" and it installs without any issues and I can run the virtual_com app without any issues.
When I point explicitly to "fsl_ucwxp.inf" on a Win7 (32 bit) machine during "Update Driver", I get the message: "The folder you specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for 32-bit systems."
I have tried:
1. Changing "DIC_PROTOCOL_CODE" to "AT_250_PROTOCOL" on the suggestion that the default "NO_CLASS_SPECIFIC_PROTOCOL" would prevent the application from working on a Linux Machine.
2. Moving "usbser.sys" from its archive folder into "C:\Windows\System32" as recommended on different forums.
3. Deleting "layout.inf" from the "fsl_ucwxp.inf" becuase I could not find it on my system's hardfile.
Note: I am running with "Elevate" applications to Administrator without prompting.
Has anybody got fls_ucwxp.inf (or another similar function .inf) to work with virtual_com in a Windows 7 PC? If they have, what was done to get it to work?
Thanx,
myke
I found this today when I was looking for a Win 7 64 driver for the virtual nic demo.
If I understand it right, it should work with the CDC virtual com demo (not what I need, but what YOU need!)
https://community.freescale.com/thread/53330
Hope it helps
Hi Tonka,
Thanx for the link - unfortunately, I still get the same error indicating that the file isn't designed to work for Windows for 32-bit systems.
I really appreciate the pointer.
myke
Hi Folks,
I think I've moved things a bit further, but I'm still stuck.
I reviewed suggestion from Tonka and tried both this .inf file (with the as it was in the file and with the VID/PID changed to VID2504&PIC0300 as in the original fsl_ucwxp.inf) file with no luck. When I was doing this, I continually got the message "The folder you specified doesn't..." as was discussed before.
In trying to understand what was happening, I discovered that all active .inf files are in C:\Windows\inf so I moved these files into this folder and when I tried loading them for the "Unknown Device", I was able to move beyond this error and when I tried "Next" to install the file I get a Code 43 ("Windows found driver software for your device but encountered an error while attempting to install it.").
I tried it on another Windows 7 PC but the m52223evb + the virtual_com application was not recognized.
When I look at the "Properties"->"Details"->"Hardware Ids" for the "Unknown" device, it returns "USB\UNKNOWN". I would expect these values to be read into the PC and available in properties for checking against what's in the inf to validate it.
Unfortunately, I can't test this hypothesis as I don't have any USBdevice which are meant to run as CDC or some other function.
Based on the HW & App not being recognized by one PC and the VID/PID not being passed to the PC I'm wondering if the USB device descriptor table is not being initialized properly (or at least not properly for Windows 7) and Windows is not recognizing the device as being valid and cannot match an inf file to it.
Does anybody have any ideas? Has anybody tried "virtual_com" out on a Windows 7 PC (as I noted earlier, it does work on a WinXP machine)?
Thanx,
myke
Another data point for others having this problem:
Configuration:
Windows 7 64 bit
Codewarrior 10.1
DemoJM board
MCF51JM128
USB Stack with PHDC v3.0
Project compiles, loads, and runs as described in MEDUSBUG.pdf.
When the USB cable is plugged into a USB port in the back of the computer, I get the "Unknown Device" notice.
When I look at the "Properties"->"Details"->"Device Instance Path" for the "Unknown" device it is USB\VID_0000&PID_0000\5&23B074A8&0&2, so it does not appear to be properly enumerating.
Under "Properties"->"General" is says Location: Port_#0002.Hub_#0006
When the USB cable is plugged into a USB port in the front of the computer, it then enumerates properly and following the instructions in this thread, the driver loads and a COM port appears in the device manager.
So there seems to be some issue enumerating when transitioning across a hub. I'm no USB expert, so that is all I know.
Did you ever find any resolution to this issue? I am in need of a similar solution.
Same issue here, works fine with Windows XP, can't get Windows 7 (32 bit) to recognize the USB virtual com device. Hoping someone has a solution.
This might be helpful for everyone having this kind of problems: installing the CDC (aka virtual COM) drivers under Windows 7 and 64bit.
First: I'm using the USB Stack with PHDC Support from www.freescale.com/usb. Installed it on my Windows 7 machine (32bit). I managed to have it compiling and downloading both for my MCF51JM128 and MCF52259 boards, and both on my Win7 32bit and my other Win7 64bit machine a driver installation was showing up under Windows.
Under Win7 32bit I pointed to the fsl_ucwxp.inf as delivered in the USB stack, and everything worked fine. But not on Win7 64bit.
Here the .inf file from
https://community.freescale.com/thread/53330
made the trick:
- store it as .inf on your Win7 64bit machine
- go to the device manager and find the unknown device (JM CDC DEMO) and in the driver details, update the drives
- IMPORTANT: Select 'Browse my computer for driver software'
- IMPORTANT: select 'let me pick from a list of device drivers on my computer'
- use 'show all devices' and use 'have disk' to browse to the .inf file mentioned above
- this will show up as 'Frescale CDC device' :smileyhappy:
now the rest is easy.
HEUREKA :smileyhappy:
BK
I currently have a .inf file that works for both 32/64 bit XP and 32/64 bit Windows 7. It took a while to find all the correct information, but hopefully this post will help someone. I use Wix to build the installer and install the actual device driver which I now have working on all flavors of windows boxes. Hope this helps someone.
Here is what I have in the fsl_ucwxp.inf file. Note GUID has been x'd out, but you can make your own using http://www.guidgenerator.com/ :
[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
Provider=%PRVDR%
LayoutFile=layout.inf
DriverVer=03/09/2009,1.0
[Manufacturer]
%MFGNAME%=VirComDevice,NT,NTamd64
[DestinationDirs]
DefaultDestDir = 12
[VirComDevice.NT]
%DESCRIPTION%=DriverInstall,USB\VID_2504&PID_0300
[VirComDevice.NTamd64]
%DESCRIPTION%=DriverInstall,USB\VID_2504&PID_0300
[DriverInstall.NT]
Include=mdmcpq.inf
CopyFiles=FakeModemCopyFileSection
AddReg=DriverInstall.NT.AddReg
[DriverInstall.NT.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbser.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[DriverInstall.NT.Services]
AddService=usbser, 0x00000002, DriverServiceInst
[DriverServiceInst]
DisplayName=%SERVICE%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary= %12%\usbser.sys
LoadOrderGroup = Base
[Strings]
PRVDR = "Freescale Semiconductors"
MFGNAME = "Your Company"
DESCRIPTION = "Virtual Com Port"
SERVICE = "Virtual Com Port Driver"
REferring to the guid being xxx'd out in the inf file above
AFAIK, the inf file contains a class installer GUID, not a device interface GUID
The correct GUID for any USB com port is defined in devguid.h from the windoze ddk.
ClassGUID={4D36E978-E325-11CE-BFC1-08002BE10318}
I have found this remains consistent in inf files from a variety of manufacturers.
Excellent! That saves me a lot of troubleshooting time.
Great, that worked perfectly for win7 32 and 64 connecting the K60 as a virtual com port over USB.