• AVR Freaks

Generic HID demo will not enumerate

Page: 12 > Showing page 1 of 2
Author
vpatron
Junior Member
  • Total Posts : 104
  • Reward points : 0
  • Joined: 2009/02/27 13:01:26
  • Location: 0
  • Status: offline
2009/04/08 16:50:02 (permalink)
0

Generic HID demo will not enumerate

Hi all,

I cannot get Jan Axelson's HID demo to work on the FS USB PIC18F4550 board (the one from http://www.lvr.com/hidpage.htm)

It sort of enumerates so I know it's mostly configured right. On initial plug in the PC says Found New Hardware "Generic HID", "Human Interface Device", but then a "problem occurred installing" message. In Control Panel/System Devices, it has the yellow "!" and Properties says "device cannot start".

What am i doing wrong?

I followed all her instructions in the readme.txt. It supposedly works with USB Framework 2.3, but I only have Framework 2.4. During compile, it had an error about #USB_NUM_STRING_DESCRIPTORS not defined so I put:

       #define USB_NUM_STRING_DESCRIPTORS    3

in usb_config.h and it compiles just fine and looks like the correct value from looking at the code.

I am stuck so any help would be greatly appreciated. Thanks!

-Vince Patron

#1

23 Replies Related Threads

    EEPS
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2009/04/07 09:52:33
    • Location: 0
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/11 15:23:03 (permalink)
    0
    Hi, I am having a similar issue with the HID boot loader from the 2.4 USB framework. I have a custom board with a 18F2550. I plug it in and it detects the device correctly, giving the correct device ID and manufacturer ID as well as Microchip Technology device string. However, it then says that there was a problem during the install and that the device might not function correctly. IN device manager it has a yellow exclamation mark and says that the device can not start. Does any one know what is going on?
    #2
    vpatron
    Junior Member
    • Total Posts : 104
    • Reward points : 0
    • Joined: 2009/02/27 13:01:26
    • Location: 0
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/13 08:21:39 (permalink)
    0
    Yeah, anyone know of a good tool to debug this?

    I just used PortMon to debug a CDC version of my program and it works great and very simple, and I figured out what I was doing wrong in my PIC prgram. But it only works for CDC serial and parallel ports.

    I just tried out USBSnoop but I can't understand its log file. Just the same, I will try it on the failing HID firmware and see if I can make any sense of what it is saying.

    -Vince

    #3
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/13 22:10:00 (permalink)
    0
    I think it can be some firmware bugs or marginal some hardware stability problem (Vusb capacitor, Vbus bulk capacitor, wrong clock configuration problem).

    A USB hardware analyzer may help to debug "code 10" problem or similar problems. I am not so sure if a software USB analyzer can help much for enumeration related problems.

      USB_Links and libusb
    #4
    vpatron
    Junior Member
    • Total Posts : 104
    • Reward points : 0
    • Joined: 2009/02/27 13:01:26
    • Location: 0
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/15 16:43:20 (permalink)
    0
    Thanks but I doubt it's hardware. I'm just using an unmodified FSUSB Demo board which works fine when I load other demo code on it. Also, it is communicating with the PC in that the PC is picking up the PID and VID and descriptor string just fine so I'm sure the crystal configuration is correct.

    Someone told me to try UVCView. I'll post if I'm successful with that. Thanks,

    -Vince

    #5
    vpatron
    Junior Member
    • Total Posts : 104
    • Reward points : 0
    • Joined: 2009/02/27 13:01:26
    • Location: 0
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/15 17:49:34 (permalink)
    0
    I'm making little bit of progress. UVCView picks it up and tells me some useful stuff. I give up for now and will use the Microchip HID demo as a baseline for now.

    -Vince

    From UVCView:

              ---===>Device Information<===---
    *!*ERROR:  no String Descriptor for index 2!

    ConnectionStatus:                 
    Current Config Value:              0x00  -> Device Bus Speed: Low
    Device Address:                    0x00
    Open Pipes:                           0
    *!*ERROR:  No open pipes!

              ===>Device Descriptor<===
    bLength:                           0x12
    bDescriptorType:                   0x01
    bcdUSB:                          0x0110
    bDeviceClass:                      0x00  -> This is an Interface Class Defined Device
    bDeviceSubClass:                   0x00
    bDeviceProtocol:                   0x00
    bMaxPacketSize0:                   0x08 = (8) Bytes
    idVendor:                        0x0925idProduct:                       0x7001
    bcdDevice:                       0x0001
    iManufacturer:                     0x01
    *!*ERROR:  no String Descriptor for index 1!
    iProduct:                          0x02
    *!*ERROR:  no String Descriptor for index 2!
    iSerialNumber:                     0x00
    bNumConfigurations:                0x01

    #6
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/15 19:31:48 (permalink)
    0
    It was not clear to me you are using the original FSUSB demo board. And since the Microchip HID example works, your hardware should be okay.

    I've only tried Jan's example with V2.3 stack. I will try the V2.4 stack with Jan's example over the weekend.

    By the way, you can install multiple stack versions to different locations.



      USB_Links and libusb
    #7
    vpatron
    Junior Member
    • Total Posts : 104
    • Reward points : 0
    • Joined: 2009/02/27 13:01:26
    • Location: 0
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/16 16:16:31 (permalink)
    0
    Hi xiaofan,

    Can you email me a copy of USB Framework 2.3? I still cannot get Jan's HID demo to work with Framework 2.4 even after making adjustments, path fixes, etc.

    I will PM you with my email address. Thanks for your help!

    -Vince Patron

    #8
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/16 16:41:37 (permalink)
    0
    I received your PM. But the stack is really too big to be emailed.

    You can go to support.microchip.com and raise a ticket to ask for stack V2.3. I believe they will provide you the link. It must be somewhere in the website but I could not find it either right now.

      USB_Links and libusb
    #9
    FunnyNYPD
    Super Member
    • Total Posts : 1553
    • Reward points : 0
    • Joined: 2007/09/28 20:06:59
    • Location: USA & Canada
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/16 18:22:19 (permalink)
    0
    There should be a historic link for those old stacks, just like many links to MPLAB and PICKit 2 application software.
    #10
    FunnyNYPD
    Super Member
    • Total Posts : 1553
    • Reward points : 0
    • Joined: 2007/09/28 20:06:59
    • Location: USA & Canada
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/16 18:22:56 (permalink)
    0
    From UVCView:

    I am curious what is it? A software tool?
    #11
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/16 19:15:30 (permalink)
    0
    Yes it is a nice tool from Microsoft, it is an WDK example. They used to provide a standalone download for UVCview. Now you have to download the big WDK to get it.
    http://www.microsoft.com/whdc/devtools/wdk/default.mspx
     
    If you do not want to use Microsoft Connect to get WDK, you can download the old version Windows Server 2003 DDK here.
    http://www.microsoft.com/whdc/devtools/ddk/default.mspx
     
    The previous version is called USBview which can be downloaded from FTDI site.
    http://www.ftdichip.com/Resources/Utilities.htm
     
    Under Linux, you can use "lsusb -vvv" (part of usbutils) or the GUI usbview.
    http://sourceforge.net/project/showfiles.php?group_id=3581&package_id=142529
    http://www.kroah.com/linux-usb/
     
     

      USB_Links and libusb
    #12
    vpatron
    Junior Member
    • Total Posts : 104
    • Reward points : 0
    • Joined: 2009/02/27 13:01:26
    • Location: 0
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/17 13:03:43 (permalink)
    0
    THanks guys. I found the Framework 2.3. I'll try out Jan's code using that later when I have time.

    Yeah, that UVCView is handy. At least I know what it's complaining about. It's getting the VID and PID but sending the descriptors wrong.

    -Vince

    #13
    EEPS
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2009/04/07 09:52:33
    • Location: 0
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/04/18 12:53:21 (permalink)
    0
    Ok, I got mine working with the boot loader. My problem was the config registers. I am using WinPIC to program my chip, and instead of setting the config words in the code, I was manually setting them in WinPIC and I guess I was setting some of the write protect ones wrong. I copied the config words from the 4550 version and changed them for my hardware in the main.c and everything is working now. Also, I had a .022uF capacitor instead of a .22uF! (oops).
    #14
    fajardiary
    Super Member
    • Total Posts : 245
    • Reward points : 0
    • Joined: 2009/02/19 03:51:17
    • Location: Indonesia
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/05/11 04:16:41 (permalink)
    0
    Hey guys, i am having the same problem...so to conclude...the solution is?
    #15
    fajardiary
    Super Member
    • Total Posts : 245
    • Reward points : 0
    • Joined: 2009/02/19 03:51:17
    • Location: Indonesia
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/05/11 04:18:22 (permalink)
    0
    define USB_NUM_STRING_DESCRIPTORS 3?or?? i am confused...I am using LPC PIC18F14K50...
    #16
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/05/11 06:38:43 (permalink)
    0
    The thread is about the generic HID demo from Jan Axelson. It is not using PIC18F14K50.

      USB_Links and libusb
    #17
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/05/11 07:23:33 (permalink)
    0
    ORIGINAL: vpatron
    I followed all her instructions in the readme.txt. It supposedly works with USB Framework 2.3, but I only have Framework 2.4. During compile, it had an error about #USB_NUM_STRING_DESCRIPTORS not defined so I put:

           #define USB_NUM_STRING_DESCRIPTORS    3

    in usb_config.h and it compiles just fine and looks like the correct value from looking at the code.


    I do not think the modification is so simple. I just looked at the Stack 2.3 and 2.4 and the difference is actually bigger than this. If you can, please detail your modifications.

      USB_Links and libusb
    #18
    vpatron
    Junior Member
    • Total Posts : 104
    • Reward points : 0
    • Joined: 2009/02/27 13:01:26
    • Location: 0
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/05/11 20:38:49 (permalink)
    0
    Hi xiaofan,

    I decided to use CDC serial for now and my code is working nicely. In the near future, I will upgrade to HID class but I need to work on other parts of my project first.

    When I go to HID class, I was going to use the Microchip HID demo because that works for me and I can understand the code... :)

    Thanks for the offer to help, though. It's much appreciated.

    -Vince

    #19
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Generic HID demo will not enumerate 2009/05/12 06:52:42 (permalink)
    0
    I think it is a good choice to start with a known-good example for the HID side if you want to go for that option again.

    I just tried out Jan Axelson's generic HID example with the V2.3 stack using PIC18F87J50 USB PIM and it works as expected. I do not have the PICDEM FS USB now and my simplified clone is having some problems so I did the simple porting to PIC18F87J50 USB PIM.

    I have not tried out V2.4 stack yet but I think the main program needs some work.

      USB_Links and libusb
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5