This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Java HID Demo not launching on Windows 8

Hi,

I'm using the Java HID Demo project as a base for a few projects with the msp430. My problem is that I encounter problems with the HidCommunicationManager DLL.

When excecuting the jar with the command line, "java -jar HidDemo.jar" , the window doesn't pop up, it only writes that it loads the library.

I changed the loading of the library in a press of a button, the window appears correctly but the library doesn't do anything.
 This happens on a few tablets I have, whether 32 or 64bits.

Any ideas ?

  • Hi,

    We are looking into the matter and trying to get your request to the right team.

    Thanks,

    David
  • Hello,

    Try removing the following line of code in the while loop found in function 'JNIEXPORT jint JNICALL Java_com_ti_msp430_usb_hiddemo_management_HidCommunicationManager_getNumberOfInterfaces().    This function can be found in the file 'com_ti_msp430_usb_hiddemo_management_HidCommunicationManager.c':

    if(!cur_dev || !cur_dev->vendor_id || !cur_dev->product_id)
                    continue;

     

    After removing the line of code re-run the java command.  Please let me know if that works for you.

    Regards,

    Arthi Bhat

     

  • I removed it, it doesn't seem to be the problem.

    When I launch the HidDemo jar, the output is "Loading 32 bit version HidCommuncationManage, Loaded JNI library". No window appears.

    I tried to load the library a little bit further in the execution of the program, the window shows but here is the output from the command line, after the normal debug info where it says it loads the library, it loops on this message (which is the "dumpHidDeviceInfo" function printfs) :

    path=\\?\hid#intcfd9&col01#3&18c083ff&0&0000#{4d1e55b2-f16f-11cf-88cb-0011110000
    30}
    vendor_id=0
    product_id=0
    serial_number=1.0
    release_number=0
    manufacturer_string=Microsoft
    product_string=GPIO Button Driver
    usage_page=1
    usage=6
    interface_number=-1
    END

    path=\\?\hid#intcfd9&col01#3&18c083ff&0&0000#{4d1e55b2-f16f-11cf-88cb-0011110000
    30}
    vendor_id=0
    product_id=0
    serial_number=1.0
    release_number=0
    manufacturer_string=Microsoft
    product_string=GPIO Button Driver
    usage_page=1
    usage=6
    interface_number=-1
    END

    The OS is a Windows 8.1 with Bing, 32bits.

    Processor : Intel Atom CPU Z3735F, 2gig of RAM, processor x64

  • Hello Romain,

    Well I was hoping removing that line of code would work for you.  I am not able to re-produce your issue at my end so I think you are going to have to debug where exactly the code is hanging.  You can put printf statements in all the functions in the file listed above.  The print statements can be something like - printf ("in function 1");  and then in function two, you can place another printf("in function 2") and keep going.  Then compile and re-run the program and see where the program hangs.  You might have to put printf statements into other files or go deeper into sub-functions based on the results you get.

    Regards

    Arthi Bhat

     

  • Hello Arthi Bath1,

    You don't have a windows 8.1 32bits ? Here, we have 3 laptops/tablet pc with it, it doesn't work on none of them.

    It's been months we are having this problem with the HidCommunicationManager DLL (there are a few posts about it on the forum).

    Can you send me your HidCommunicationManager DLL ?

    Thanks anyway

  • Hello Romain,

    Is this debug effort still ongoing? Were you able to put the printf's that Arthi was recommending??

    Thanks,

    David
  • Hello David,

    Well, I have deleted the following line of code "if(!cur_dev || !cur_dev->vendor_id || !cur_dev->product_id) continue;",
    recompiled it and it seems to work better...
  • Hi David,
    I have switched to windows 10 on a tablet and without the "if(!cur_dev || !cur_dev->vendor_id || !cur_dev->product_id) continue;",
    my problem is having two devices, it aims to the same physical device when connecting to them in a loop.
    Do you have an explanation why on windows 8/10, this line is causing trouble ?

    Thanks

**Attention** This is a public forum