Posts Tagged ‘linux’

USB experimentation board – part 2

Thursday, January 15th, 2009

I finaly figured out how to compile and run the library and gui program for the Velleman k8055 board on Ubuntu Linux.

First I downloaded this: libk8055.
But this library contains an error in the header file, it is missing a line, so edit the k8055h file and add the following line:
int ReadAllValues(long int *data1, long int * data2, long int * data3, long int * data4, long int * data5);

To compile and install the library type in the following commands in the command prompt:
make
sudo make install

Next: I downloaded the gui program: k8055gui.
This requires a couple of libraries to be installed on your system first:
sudo apt-get install libwxbase2.8-0 libwxbase2.8-dev libwxgtk2.8-0 libwxgtk2.8-dev libusb-dev

This program also contains an error, to fix this you need to edit the MyFrame.cpp file, and replace (a small remark, thanks to Vincent in the comments below: mind the double quotes!):
#include <k8055.h>

with
extern “C” {
#include <k8055.h>
}

To compile, type in the command window:
make

To start the gui program:
sudo ./k8055gui

I’ll try to find a way so you don’t need to be root to execute the gui program.

USB experimentation board – part 1

Monday, December 15th, 2008

VK8055I bought and assembled this Velleman K8055 kit (quite) a while ago. It’s an USB experiment board. Under windows it all works quite nicely; but under Linux I have been unable to compile the demo program.

The demo program consists of two parts: a library called libk8055 and the Linux clone of the Velleman demo interface.

Compiling the library was pretty straightforward, and the accompanying command line tool worked too.  Compiling the demo interface program did not work, at first because I was missing wxWidget libraries, secondly because there was a function not documented in the header file of the library, and thridly because the linker can’t find or read the library file.  I haven’t found a solution for that last problem just yet.  I tried adjusting the installation script to install the files in the default ubuntu locations, but this didn’t solve it.  I tried messing with compile options, I tried static linking, dynamic linking, a whole set of compile options, but it just wouldn’t link…

I’ll try again later, when I find the courage to dive deeper into the sources.  I’ll also try to get the bugfixes upstream once I finalise them.

Hacking La Fonera – part 1

Thursday, March 20th, 2008

FoneraI bought a small La Fonera router for €7,5 a couple of weeks ago, just for the fun of replacing the firmware and tinker with a personalised Linux kernel and filesystem. I also installed a brand new web interface on it.

In the attached file you can find the details on how I replaced the bootloaders configuration, the Linux kernel and the filesystem:
Hacking La Fonera (Open Office document, download Open Office here)

I’m still working on building an RS232 level converter module for the internal serial interface on the router, and I’m trying to figure out the iptables firewall configuration so I can do NAT translation of the LAN side when I set the router as a wireless client.

Just trying to get a feel for it, really. Afterwards I’m thinking of installing a build environment on my PC and I’ll try to build the OpenWRT kernel and filesystem myself. I’m not sure whether there is a cross-toolchain for this I can just download or whether I need to create one myself? Creating a cross-toolchain from scratch is a bit of a challenge, I’ve done it once before, but it does take a couple of days until you get all the versions right and get the thing to compile properly.