-
1Pre-Requisites (libusb)
libusb is a C library that provides generic access to USB devices. The hidapi library uses this to communicate with USB devices connected to the system.
Click here for libusb documentation
-
2Pre-Requisites (hidapi)
The user end program uses hidapi library for USB communications. Make sure that the same is installed.
Click here for library documentation.
-
3Download source code
The source code for the project is hosted on github here.
To download using git clone, enter the following in a terminal window.
git clone https://github.com/Scarecrow1006/usb2multi
Or fork the current repository.
You can also download .zip file for the project from the github link.
-
4Pre-Requisite (Keil)
Keil uVIsion 4 is used as a cross compiler for LPC2148.
Latest version can be downloaded from website.
-
5Programming the board
Navigate to .../usb2multi/firmware for the firmware project. Build using Keil and download using Flash magic or any similar software.
-
6Build the user end
Navigate to .../usb2multi/user_end
Open main.c and chech the line where hidapi.h is included
#include "/usr/local/include/hidapi/hidapi.h"
Change the path to the directory where hidapi is installed.
Compile using gcc
gcc -g main.c -o test -lhidapi-libusb sudo ./test
Admin privileges are required for USB communications.
A bash script named run is included for ease.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.