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.

MSP430 HID USB Application HidDemo.jar

Other Parts Discussed in Thread: MSP430F5529

hallo,
I am using the HidDemo.jar to see what I am sending from the msp430f5529 via the HID.
How can I include the received data in my Windows application, or is there an example code that I can copy in a Virtual Studio 2013 project?

thank you
best regards

  • or something for Python? I just need the read command.

  • On http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430_USB_Developers_Package/latest/index_FDS.html

    there are MSP430_USB_Firmware_Upgrade_Example-1.3.1.1-Setup.exe and Python_Firmware_Upgrader-4_10_02.zip

    Both are based on HID class (TI USB boot loader uses HID for communication with host) and can be modified easily to create custom HID Windows application to talk to MSP430 USB device via HID. The first one is for MS Visulal Studio 2008 though. It consists of low-level DLL BSL430.dll (plain C) implementing Windows USB API calls and GUI front end (C++ .NET).

    You can use TI's BSL430.dll with some modification (remove all boot loader related code from it) and create your own front end.

  • I wanted to use the TargetGUI.py, but if I open it the message "USB VID:PID 2047:0200 not found (maybe device not in BSL mode?) Please set device in BSL mode and select File->Rescan HID Bus..." appears.

    I checked the HidDemo.jar again and it says my PID is 0301. Could that be the problem? On msp430 is the simple write HID example running. Do I have to use another code?

  • Hi Tiemo,

    OK. Let's make it even simpler.

    1. As I understand, you've got H0_SimpleSend example from MSP430 USB Developers Package running on your MSP430 device. This example sends packet of data every second via HID class;

    2. You only need to read and display this packet on your Windows host;

    3. Go to https://github.com/signal11/hidapi/downloads

    4. Download hidapi-0.7.0.zip file and unzip it;

    5. Connect your MSP430 board to the PC, make sure it gets enumerated (use USBDeview or USB Device Viewer or similar tool);

    6. Go to \testgui\ subdirectory at the location of file unzipped at step 4;

    7. Run testgui.exe file from there;

    8. On the top window you'll see your board VID/PID; Press 'Connect' button next to it;

    9. Now you'll see data coming from your board in the bottom window every second. These data are in hex form, but the source code is available in the hidapi-0.7.0.zip, so you can change it to the representation form  you need.

    NOTE: HIDAPI is a multi-platform library which allows an application to interface
    with USB and Bluetooth HID-Class devices on Windows, Linux, and Mac OS X.
    On Windows, a DLL is built. On other platforms (and optionally on Windows),
    the single source file can simply be dropped into a target application.

    There is some documentation available in the zip file as well.

    HIDAPI is just one of a dozen of open-source USB HID libraries available, you can also check C# USB HID Driver Library (www.florian-leitner.de), LibUsbDotNet (www.libusbdotnet.sourceforge.net), Hid Library (www.github.com/mikeobrien/HidLibrary) and plenty of others.

    The C++.NET example from TI that I mentioned before may be a little bit too complex to change for beginners as its primary aim is to invoke BSL and do firmware upgrade. That's why its default VID/PID are set to TI's USB BSL (0x2047/0x200). But a layer below a surface it still uses HID to transfer data between MSP430 device and host.

**Attention** This is a public forum