Setting up the beaglebone with node-usb

1. Install Libusb-dev:

Run the following on the command line:

opkg update
opkg install libusb-1.0-dev

2. Install NPM

Run the following on the command line:

curl http://npmjs.org/install.sh | sh

3. Install the node-usb package

At the time of this writing, I’m having some problems with the latest version of node-usb. The latest version uses some library’s (libuv) not installed with the current version of node js on the beaglebone: v0.4.12. The forked version listed below compiles correctly on the beaglebone, it’s a good place to start:

My forked version of node-usb is below:

https://github.com/jbrache/node-usb

Run the following on the command line:

cd /var/lib/cloud9/node_modules
git clone git@github.com:jbrache/node-usb.git
cd node-usb

Run ‘make’ in the node-usb directory.

make

Copy the usb_bindings.node file in the build directory to the node-usb directory:

cp -i /var/lib/cloud9/node_modules/node-usb/build/default/usb_bindings.node /var/lib/cloud9/node_modules/node-usb/usb_bindings.node

This entry was posted in beaglebone. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *