Hello,
I'm using a MAX3420E in order to comm a PCB with Atmel microcontroller, with a PC using USB. In windows vista, the PC recognizes a Serial (Virtual) Port and works right, but when I try it in Windows XP, it seems that PC doesn't recognizes the device.
It appears in the device manager as "unknown device" with VID_0000&PID_0000...
I've been searching for a similar post, and found one that had the same problem VID_0000, but the last message does't give any solution...
Any clue? Thank you very much in advance.
The descriptors I use are list below:
// DESCRIPTORS const unsigned char DD[]= // DEVICE Descriptor {0x12, // bLength = 18d 0x01, // bDescriptorType = Device (1) 0x10,0x01, // bcdUSB(L/H) USB spec rev (BCD) 0x02,0x00,0x00, // bDeviceClass, bDeviceSubClass, bDeviceProtocol (descrito en Interface Descriptor) 0x40, // bMaxPacketSize0 EP0 is 64 bytes 0x6A,0x0B, // idVendor(L/H)--Maxim is 0B6A (2922 en decimal) 0x46,0x53, // idProduct(L/H)--5346 (21318 en decimal) 0x00,0x01, // bcdDevice--1234 1,2,3, // iManufacturer, iProduct, iSerialNumber 1}; // bNumConfigurations
const unsigned char CD[]= // CONFIGURATION Descriptor {0x09, // bLength 0x02, // bDescriptorType = Config 67,0x00, // wTotalLength(L/H) = Nº Bytes (67[0x43}) (Sin cabeceras 48[0x30]) 0x4300 0x02, // bNumInterfaces = 2 0x01, // bConfigValue 0x00, // iConfiguration 0xA0, // bmAttributes. b7=1 b6=NO self-powered b5=RWU supported (1 1 1 0 0 0 0 0) 0xFA, // MaxPower is 200 ma
// INTERFACE Descriptor 0x09, // length = 9 0x04, // type = IF 0x00, // InterFace Number = 0 0x00, // bAlternate Setting 0x01, // bNum Endpoints = 1 IN 0x02, // bInterfaceClass = 2 Communication 0x02, // bInterfaceSubClass = 2 0x01, // bInterfaceProtocol =1 (SubClass ACM=Abstract Control Mode, InterfaceProtocol=V.25ter, common AT commands) 0x00, // iInterface
// Header Functional Descriptor (marks beginning of the concatenated set of Functional Descriptors) 0x05, // bFunctionLength, Descriptor size in bytes --[18] --[48] 0x24, // bDescriptorType, CS_INTERFACE 0x00, // bDescriptorSubtype, Header Functional Descriptor 0x10,0x01, // bcdCDC, CDC specification release number in BCD format ([0x10, 0x01])
// Call Management Functional Descriptor 0x05, // bFunctionLength, Descriptor size in bytes 0x24, // bDescriptorType, CS_INTERFACE 0x01, // bDescriptorSubtype, Call Management Functional Descriptor 0x03, // bmCapabilities, Device doesn't call management itself (0->3) 0x01, // bDataInterface, Interface used for call management
// Abstract Control Management Functional Descriptor 0x04, // bDescriptorLength, Descriptor size in bytes 0x24, // bDescriptorType, CS_INTERFACE 0x02, // bDescriptorSubtype, Abstract Control Management Functional Descriptor 0x06, // bmCapabilities, Support for the GET/SET_LINE_CODING, BREAK & SET_CONTROL_LINE_STATE
// Union Functional Descriptor 0x05, // bFunctionLength, Descriptor size in bytes 0x24, // bDescriptorType, CS_INTERFACE 0x06, // bDescriptorSubtype, Union Functional Descriptor 0x00, // bMasterInterface, The controlling interface for the union (bInterfaceNumber of a Communication or Data Class interface in this configuration) 0x01, // bSlaveInterface0, The controlled interace in the union (bInterfaceNumber of an interface in this configuration)
Functional Descriptor***************** // Endpoint Descriptor EP3-IN 0x07, // bLength 0x05, // bDescriptorType (Endpoint) 0x83, // bEndpointAddress (EP3 IN) 0x03, // bmAttributes (interrupt = 3) 0x40,0x00, // wMaxPacketSize (64[0x0040]) 0x02, // bInterval, Maximum latency (0x02)
// INTERFACE Descriptor 0x09, // length = 9 --[44] 0x04, // type = IF 0x01, // InterFace Number = 1 0x00, // bAlternate Setting 0x02, // bNum Endpoints = 2 (IN&OUT) 0x0A, // bInterfaceClass = A (Data) 0x00,0x00, // bInterfaceSubClass, bInterfaceProtocol (SubClass ACM=Abstract Control Mode, InterfaceProtocol=V.25ter, common AT commands) 0x00, // iInterface
// Endpoint Descriptor EP1-OUT 0x07, // bLength 0x05, // bDescriptorType (Endpoint) 0x01, // bEndpointAddress (EP1-OUT) 0x02, // bmAttributes (bulk = 2) 0x40,0x00, // wMaxPacketSize (64[0x40]) 0x00, // bInterval (0x00)
// Endpoint Descriptor EP2-IN 0x07, // bLength 0x05, // bDescriptorType (Endpoint) 0x82, // bEndpointAddress (EP2-IN) 0x02, // bmAttributes (bulk = 2) 0x40,0x00, // wMaxPacketSize (64[0x40]) 0x00, // bInterval (0x00) };
// STRING descriptors. An array of string arrays
const unsigned char strDesc[][64]= { // STRING descriptor 0--Language string { 0x04, // bLength 0x03, // bDescriptorType = string 0x09,0x04 // wLANGID(L/H) = English-United Sates }, // STRING descriptor 1--Manufacturer ID { 34, // bLength (0x2C para 23 (incluyendo tamaño y tipo??) 0x03, // bDescriptorType = string 'x',0, 'x',0, 'x',0, 'x',0, ' ',0, 'x',0, 'x',0, 'x',0, 'x',0, 'x',0, 'x',0, 'x',0, 'x',0, 'x',0, 'x',0, 'x',0,// text in Unicode }, // STRING descriptor 2 - Product ID { 8, // bLength 0x03, // bDescriptorType = string 'X',0, 'X',0, 'X',0, },
// STRING descriptor 3 - Serial Number ID { 8, // bLength 0x03, // bDescriptorType = string 'X',0, 'X',0, 'X',0, }};
const unsigned char SerialConf[]= { 0x00,0xE8,0x03,0x00, // dwDTFRate. Baudrate (9600hex->38400 baud) 0, // bCharFormat. 1 Stop bit 0, // bParityType: none 8, // Number of data bits: 8 };
Yes, in HCList tells me that there are UHCI and EHCI...
You don't need to change the PC host controller. Modify the firmware of your device, to satisfy the timing.
For more confirmation, Does the Vista box, the working one, equip UHCI host controller? What does HCList tell about this PC?
Tsuneo
Hello Tsuneo,
I tried the power-up timing test, but nothing...I think it's related with OHCI, all the USB uses OHCI host controller, and there appear EHCI host controller too, but it's inaccessible physically...I don't know what can I do, to solve timming problems, or how to change the controller...
Piru
"when I debug the enumeration process, ask three times for the initial frames:"
OK,OK A new fact appears :-) Then, the INF has surely above problem, but it doesn't the direct cause of the trouble of your XP box.
I can't understand the table of figures you shown above. "0 5 12 0 0 0 0 0" seems to mean the setup packet of Set_Address, but what for other figures? But, maybe, it doesn't matter.
What occurs here is, that the device fails to return ACK to Set_Address request, and the host repeats the request three times, before giving up the request. As your device works on a Vista box, it is a timing problem.
There are two cases of timing problems, a) Power-up timing of bus-powered device b) Accelerated Control transfer on OHCI or over hub
a) Power-up timing Is your device a bus-powered one - supplied power just from USB VBUS? Then, try this test.
Power-up timing test 1) Plug in a hub to the XP box. 2) Open Device Manager on the XP, find the hub under the USB controller tree. 3) Right-click on the hub, select "Disable" once. 4) Plug in the device to the hub. 5) After a couple of seconds, in Device Manager, right-click on the hub again and "Enable" it.
Just after enabling the hub, enumeration starts. This time, is the device enumerated successfully? If so, the device suffers Power-up timing trouble.
Please confirm that the VBUS power is supplied to the device throughout in this sequence. If not, you may need to connect a power supply to the hub.
b) Accelerated Control transfer - Did you use a hub between the device and the XP box, when the device fails? Or, laptop may have an internal hub in a docking station. Check the connection tree on USBView
MS USBView on FTDI site www.ftdichip.com/.../usbview.zip
- Does the XP USB port equips OHCI host controller? HCList tells which host controller is.
HCList from Jan Axelson's USB Central www.lvr.com/.../HCList.zip
If you use a hub, or if the XP USB port is OHCI, the control transfer timing is accelerated. It may cause the timing error. Apply these tests, and find which case is applied to your trouble. When another new fact comes up with these tests, we move to solution of the trouble.
Thank you for your reply. Yes...isn't the correct forum to ask about, but I see some questions related with USB answered, and I try to get some information... Sorry for the inconveniences.
I write messages in other forums and don't get a solution, and it's impossible to registry in the USB forum from (http://www.usb.org)! I attempted some months ago and now, but nothing...
Anyway, I try to change the .inf file many times, and nothing, including your suggestions. Yes the file usbser.sys exists in the directory...when I debug the enumeration process, ask three times for the initial frames: 128 6 0 1 0 0 64 0 0 5 12 0 0 0 0 0 ->Set address 128 6 0 1 0 0 18 0 128 6 0 1 0 0 9 0 128 6 0 1 0 0 64 0 ->Again first... ... repeat 2 more times...
It's possible that Vista recognizes the USB descriptors, and XP don't do ??
In Windows Vista, the initial frames are: 128 6 0 1 0 0 64 0 (Set address) 128 6 0 1 0 0 18 0 128 6 0 2 0 0 255 0 ->Length is different! 128 6 3 3 9 4 255 0 ->From here continue with all other descriptor frames...
Sound like the problem of INF file
Since Win2k, usbser.sys doesn't exist in the driver folder as the default Windows installation. It is copied from the installation archive, like C:\I386, when the INF file requests.
Is there usbser.sys in this folder of your XP box? C:\Windows\System32\drivers
Revise the AXXv100.NT section of INF as follows. Then, usbser.sys is copied from the installation archive to the driver folder.
[AXXv100.NT] include=mdmcpq.inf CopyFiles=FakeModemCopyFileSection AddReg= AXXv100.NT.AddReg
And delete entire AXXv100.NT.Copy section
[AXXv100.NT.Copy] usbser.sys
This MS KB tells this solution. "How to use or to reference the Usbser.sys driver from universal serial bus (USB) modem .inf files" support.microsoft.com/.../en-us "I'm using a MAX3420E in order to comm a PCB with Atmel microcontroller"
Anyway, what is related to this Keil forum? :-)
The '.inf' file I use is:
[Version] Signature="$Windows NT$" Class=Ports ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%XXXX% LayoutFile=layout.inf DriverVer=08/04/2004,5.1.2699.2180
[Manufacturer] %XXXX%=XXXX
[XXXX] %AXXv100%= AXXv100,USB\VID_0B6A&PID_5346
;[AXXv100_Install.NTx86] ;Copy from Windows system ;include=mdmcpq.inf ;CopyFiles=DriverCopyFiles ;CopyFiles=FakeModemCopyFileSection
[DestinationDirs] DefaultDestDir=12 AXXv100.NT.Copy=12, System32\Drivers
[AXXv100.NT] include=mdmcpq.inf AddReg=LowerFilterAddReg CopyFiles=AXXv100.NT.Copy AddReg= AXXv100.NT.AddReg
[AXXv100.NT.AddReg] HKR,,DevLoader,,*ntkern HKR,,NTMPDriver,,usbser.sys HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[AXXv100.NT.Services] include=mdmcpq.inf AddService=usbser, 0x00000002, Service_Inst
[Service_Inst] DisplayName = %Serial.SvcDesc% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\usbser.sys
[Strings] XXXX = "xxxx xxxxxxxxxxx" ; Your company name AXXv100 = "XXX XXXXX" ; Device description Serial.SvcDesc = "AXX - Virtual Serial Comm Port" ; Device driver description
View all questions in Keil forum