Archive for November, 2010

Ένα ταξίδι στη Γη…

November 27th, 2010 -- Posted in Uncategorized | No Comments »

OBD GPS Logger on bifferboard

November 11th, 2010 -- Posted in Uncategorized | No Comments »

This is a small Howto if you want to run obdgpslogger on bifferboard that is shipped with Openwrt
Biffer board

Compile kernel module for PPP and FTDI (RS232 -> USB)
Follow these instructions to get openwrt build 22979 from svn.

mkdir bifferos
cd bifferos/
svn co -r 22979 svn://svn.openwrt.org/openwrt/trunk
cd trunk/
patch -p0 < ../bb-r22979.patch make menuconfig

Now select PPP and FTDI to build as modules

Then hit:
make V=99
into trunk directory. This will make our kernel modules among other things

Now copy kmod-ppp_2.6.32.20-1_rdc.ipk and kmod-usb-serial-ftdi_2.6.32.20-1_rdc.ipk to bifferboard and run opkg --nodeps install

Now we have loaded our modules for ELM327 USB to ODBII interface and 3G modem, and have to compile obdgpslogger for bifferboard.
cross-compile obdgpslogger for openWRT:

Download latest version of obdgpslogger

Create a file that contains the following:
toolchain-rdc.cmake :
# this one is important
SET(CMAKE_SYSTEM_NAME Linux)
#this one not so much
SET(CMAKE_SYSTEM_VERSION 1)
# specify the cross compiler
SET(CMAKE_C_COMPILER /home/user/bifferos/trunk/staging_dir/toolchain-i386_gcc-4.1.2_uClibc-0.9.30.1/bin/i486-openwrt-linux-gcc)
SET(CMAKE_CXX_COMPILER /home/user/bifferos/trunk/staging_dir/toolchain-i386_gcc-4.1.2_uClibc-0.9.30.1/bin/i486-openwrt-linux-g++)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /home/user/bifferos/trunk/obd /home/user/bifferos/obd-inst)
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Then do:

cd obdgpslogger-0.15
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-rdc.cmake ..
make

You may need to run "ccmake .." to configure some things

If you need GPS support, you have to download and cross compile gpsd too, in order to get the libraries.

To cross compile gpsd for our platform you need to do a couple of things.
Edit configure file, and enable cross compilation flag,
export CC="/home/user/bifferos/trunk/staging_dir/toolchain-i386_gcc-4.1.2_uClibc-0.9.30.1/bin/i486-openwrt-linux-gcc"
export CXX="/home/user/bifferos/trunk/staging_dir/toolchain-i386_gcc-4.1.2_uClibc-0.9.30.1/bin/i486-openwrt-linux-g++"

and then configure and make.

Be aware that gpsd files have to be in $HOME/gpsd, since this is statically defined in obdgpslogger source.

Now you have an odbgpslogger binary that runs on bifferboard.
You might also find useful this guide also that shows how to make Huawei 3G modem work on bifferboard. However you don't have to compile kernel again, you just make the modules.