See my x86 solution for measuring temperature here!
I’m using USB Temper devices again, but this time they are a newer revision, so the previous app with the source code I modified doesn’t work anymore. I downloaded this source code from here (look at the comments) and modified that so I can define from which USB bus and dev I want the temperature readings from. I had to cross compile this for the router (TP-Link MR3220) running OpenWRT. You can download my modified pcsensor source from here.
First I needed the OpenWRT toolchain, which you can get by compiling the OpenWRT buildroot. Here’s a good tutorial how you can compile buildroot. There are also some notes in the OpenWRT wiki about cross compilation.
For the pcsensor app to work, I needed libusb 0.1. I downloaded the source code of v0.1.12, extracted it and created a script called doconfig in the libusb source code directory:
./configure --host mips-openwrt-linux --prefix=/home/nonoo/Work/openwrt/opt
After running it, I created a domake file also:
I ran domake; domake install and then I got the libusb libs under /home/nonoo/Work/openwrt/opt/lib. The STAGING_DIR variable you see above is needed for the toolchain compiler. I already added these cross compiling stuff to pcsensor’s Makefile. If you want to compile it on x86, just use my older Temper app’s Makefile.
libusb is needed on the router as well, so install it with opkg install -d pendrive libusb and run ldconfig.
I'm Nonoo. This is my blog about music, sounds, filmmaking, amateur radio, computers, programming, electronics and other things I'm obsessed with. ... »