Author Topic: my device is not detecting  (Read 33198 times)

tammna

  • Member
  • ***
  • Posts: 12
my device is not detecting
« on: July 23, 2011, 03:05:57 am »
Sir ,


where on your site you have exactly specified the usb hardware schemtic ? because i have been using your vb code for interface but still pc don't detect my device. plesae have look on my firmware code and hardware chemtic , and tell me where i am wrong .i am highly frustrated  :'( .using the same vid & pid as per yours website .

i did read your usb 3.0 complete book's chapter 10 and chapter 13 for detecting device , and hid ...but i am still failed :(     
but my hardware shemtic is not attaching here , please you specify what hardware you have recommended for your vb code usb 2.0 using pic18f4550

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: my device is not detecting
« Reply #1 on: July 23, 2011, 09:29:13 am »
See the schematic in the user guide for Microchip's PICDEM USB board. Also see:

http://www.lvr.com/forum/index.php?topic=326.msg1085#msg1085

Jan
« Last Edit: July 23, 2011, 09:31:15 am by Jan Axelson »

tammna

  • Member
  • ***
  • Posts: 12
Re: my device is not detecting
« Reply #2 on: July 25, 2011, 12:32:20 am »


as per your saying


On the host side, viewing the setupapi log file will show if the OS detected the device.

http://msdn.microsoft.com/en-us/library/ff550882%28VS.85%29.aspx


i did read the article & i did see in system32 folder of my OS , but did not found any setupapi.log ,(to edit it )

device not detecting problem is sure of some error in .dll files , can't there be doubt on borad or in firmware ..may be the flaw (error ) persist in frimware or in hardware ..???just asking

tammna

  • Member
  • ***
  • Posts: 12
Re: my device is not detecting
« Reply #3 on: July 25, 2011, 12:33:23 am »
here is my firmware code attach

[attachment deleted by admin]

tammna

  • Member
  • ***
  • Posts: 12
Re: my device is not detecting
« Reply #4 on: July 25, 2011, 03:36:09 am »


while using vb interface for device detection i am getting error in "setupdiEnumDevice Interface

Result=No more Data is available , Device not Found "

i think its getting GUID and device information set correctly , & got stucked in device interface detail ......

i found the setupapi.log file in system 32 , but its giving some sure errors



"error #E122 Device install failed. Error 1168: Element not found."

and 2nd one is " #W157 Default installer failed. Error 0xe0000228: There are no compatible drivers for this device." its waring though !

& third one is "the file is unsigned "


i read the setupapi changing logging levels of device ....but serioulsy things are upto my mind ..it cleared to me but lil bit ...you just tell me  actually where the error lies ..is it in setupapi.dll ??? is it corrupt ??? i beg you its more than 3 weeks i am trying to detect the device   :'(



Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: my device is not detecting
« Reply #5 on: July 25, 2011, 09:22:25 am »


while using vb interface for device detection i am getting error in "setupdiEnumDevice Interface

Result=No more Data is available , Device not Found "


This means that the application didn't find the HID with the specified Vendor ID and Product ID.

i found the setupapi.log file in system 32 , but its giving some sure errors

"error #E122 Device install failed. Error 1168: Element not found."

and 2nd one is " #W157 Default installer failed. Error 0xe0000228: There are no compatible drivers for this device." its waring though !

& third one is "the file is unsigned "

Windows selects a driver by examining the class and subclass fields in the device and interface descriptors and/or the vendor and product IDs in the device descriptor. What are these values in your device's descriptors?

Jan


tammna

  • Member
  • ***
  • Posts: 12
Re: my device is not detecting
« Reply #6 on: July 25, 2011, 11:56:08 pm »
my vid & pid in vb are

Const MyVendorID = &H925
Const MyProductID = &O1

and at firmware end they are define in device descriptor as


// Device Descriptor
    USB_DEVICE_DESCRIPTOR_LEN, 0,           // bLength               - Length of Device descriptor (always 0x12)
    USB_DEVICE_DESCRIPTOR_TYPE, 0,          // bDescriptorType       - 1 = DEVICE descriptor
    0x00, 0,                                // bcdUSB                - USB revision 2.00 (low byte)
    0x02, 0,                                //                                           (high byte)
    0x00, 0,                                // bDeviceClass          - Zero means each interface operates independently (class code in the interface descriptor)
    0x00, 0,                                // bDeviceSubClass
    0x00, 0,                                // bDeviceProtocol
    EP0_PACKET_SIZE, 0,                     // bMaxPacketSize0       - maximum size of a data packet for a control transfer over EP0
    0x25, 0,                                // idVendor              - Vendor  ID (low byte)
    0x09, 0,                                //                                    (high byte)
    0x01, 0,                                // idProduct             - Product ID (low byte)
    0x00, 0,                                //                                    (high byte)
    0x01, 0,                                // bcdDevice             - ( low byte)
    0x00, 0,                                //                         (high byte)
    0x01, 0,                                // iManufacturer         - String1
    0x02, 0,                                // iProduct              - String2
    0x00, 0,                                // iSerialNumber         - ( None )
    0x01, 0,                                // bNumConfigurations    - 1

don't you think so , problem may be at some other thing ? well i don't know where the hack falw is , but i guess in hardware ... :-\

tammna

  • Member
  • ***
  • Posts: 12
Re: my device is not detecting
« Reply #7 on: July 26, 2011, 12:04:13 am »
you just please , do me one more favour ....either the falws lies at hradware end ...or in firmware , the descriptor file is not included actually ....( i doubt )

its syntax is # include "jan"    well its compiling well .... :-[

[attachment deleted by admin]

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: my device is not detecting
« Reply #8 on: July 26, 2011, 09:40:59 am »
What is the interface descriptor (may be more than one)?

Look in Windows Device Manager to see if the device is present.

A protocol analyzer will show what happens on device attachment. The setupapi log file can also be useful, so you might try again to find and view that.

Jan
« Last Edit: July 26, 2011, 09:55:30 am by Jan Axelson »

tammna

  • Member
  • ***
  • Posts: 12
Re: my device is not detecting
« Reply #9 on: July 27, 2011, 04:30:09 am »
hmmm i did not notice the inteface descriptor values ..let me check ...ok i will install usb analyzer software for viewing te attachment of it ...and device manger don't show any HID device attachment ....

i told you about setupapi lof file it gives three errors , as per recommened page , i did try to edit (regedit ) values in system but i guess i am failed in it, ok again try

but i have bit doubt at firmware end ...may be the firmware is not accepting the descriptor file genrated by mikroC compiler ...i don't know  i ahve doubt ..because i did try it on  many systems .....

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: my device is not detecting
« Reply #10 on: July 27, 2011, 10:16:33 am »
If Device Manager doesn't show a HID or any new device, the host isn't detecting the attached device.

See the schematic in the user guide for Microchip's PICDEM USB board. Also see:

http://www.lvr.com/forum/index.php?topic=326.msg1085#msg1085

Jan

tammna

  • Member
  • ***
  • Posts: 12
Re: my device is not detecting
« Reply #11 on: July 28, 2011, 04:26:10 am »


ok i did check the setupapi log files ...& changed the logging levels as per given in the link

http://support.microsoft.com/kb/906485

& could not  change it as per your last link http://msdn.microsoft.com/en-us/library/ff550808(v=VS.85).aspx because the following command can't be doe by me


"10 . Copy D:\Winnt\System32\config\software.sav to D:\Winnt\System32\config\software."

software file is a system file , its not opening

& i will do change my hardware exactly as per microchip schematic soon n then test  again


 last time you were asking about the interface descriptor here it is

// Interface Descriptor
    USB_INTERF_DESCRIPTOR_LEN, 0,           // bLength               - Length of Interface descriptor (always 0x09)
    USB_INTERFACE_DESCRIPTOR_TYPE, 0,       // bDescriptorType       - 4 = INTERFACE descriptor
    0x00, 0,                                // bInterfaceNumber      - Number of interface, 0 based array
    0x00, 0,                                // bAlternateSetting     - Alternate setting
    NUM_ENDPOINTS, 0,                       // bNumEndPoints         - Number of endpoints used in this interface
    0x03, 0,                                // bInterfaceClass       - assigned by the USB
    0x00, 0,                                // bInterfaceSubClass    - Not A boot device
    0x00, 0,                                // bInterfaceProtocol    - none
    0x00, 0,

does this makes any error in communication ???


Pat Crowe

  • Member
  • ***
  • Posts: 39
Re: my device is not detecting
« Reply #12 on: July 28, 2011, 08:49:38 am »
You know, without knowing anything about your software or compiler, I am wondering why each of the numbers in that descriptor is followed by a 0.

tammna

  • Member
  • ***
  • Posts: 12
Re: my device is not detecting
« Reply #13 on: July 29, 2011, 12:05:33 am »
what do you mean by without knowing  :o ,well i did read about all the descriptors genrated by my compiler mikroC while compiling the firmware code.i don't know why some of the parameters have zero values in interface descriptor .descriptor file is some thing that is genrated by HID treminal of mikroC compiler ( in my case ) by setting some of the values like vid,pid & i/p, o/p buffer size etc.

Pat Crowe

  • Member
  • ***
  • Posts: 39
Re: my device is not detecting
« Reply #14 on: July 29, 2011, 03:57:13 am »
I mean that I don't know anything about your code or your compiler, so there might be a good reason in your code for the zeros. But to me they look like the zeros that you have to put into string descriptors to convert them into unicode characters.

What I do know is that the actual interface descriptor transmitted should not have these zeros, so I suggest that you investigate this. Was that clearer?