Tag Archives: ben

Virtual Appliance with Debian Squeeze and OpenWRT-XBurst Development Tools for Qi Hardware’s Ben Nanonote

This post is about a Virtual Appliance with Debian Squeeze and OpenWRT-XBurst Development Tools installed, which would allow immediately compiling OpenWRT packages for the Nanonote without going through the painful process of setting up the development environment yourself.

As a non-developer, I found a working development environment to be the single most confusing part of porting to the Nanonote, even more confusing than OpenWRT’s Makefiles. Granted, this could be my personal lack of talent or skill, but it left me thinking removing this “steppingstone” for some of the less experienced users might open more doors, faster, for beginning Nanonote enthusiasts. The instructions at http://en.qi-hardware.com/wiki/Building_OpenWRT_on_Debian_6 are great, but might slightly intimidate less experienced Linux users. They are also slightly daunting to follow if the need arises frequently (if reinstalling OS, royally screwed something up, or other scenarios I’m sure you ran into).

The easiest way to get around this I could come up with was creating a Virtual Appliance which contains the basics for compiling for the Nanonote, using the wiki instructions for Debian Squeeze. Such an appliance can be run in VirtualBox (free and open source) or VMWare Player (free as in beer), even on Windows hosts. The result is a single 2.4 GB file with a ready toolchain which is ready to “accept” package Makefiles and compile them. Debian was installed, the toolchain was compiled, the locales and paths were set. I gave it a quick test compiling Pem (and a load of Perl dependencies) and it seemed to work.

The Virtual Appliance is currently unimaginatively called “Debian Squeeze with OpenWRT-XBurst Development Tools 2011-08-27” and comes as a single .OVA file. See details below:

Instructions
1. Install VirtualBox.
2. Download Virtual Appliance .OVA file (links below)
3. In VirtualBox click on “Machine” > “Import” and select the .OVA file.

I’ve added a brief section under the Building on … Debian Squeeze wiki page.

Hope someone finds this helpful.

2011-08-27 Release:

Virtual Appliance Download Page on 1fichier.com:  http://4pp1qh.1fichier.com/en/
.OVA file MD5 sum:  3ad6e2aa9379336c10746a3062538d32
user:  build
password:  gongshow
root password:  gongshow
QR Image:

2011-02-23 Release:

Virtual Appliance Download Page on 1fichier.com:  http://0tqstz.1fichier.com/en/
.OVA file MD5 sum:  f9ebe1b0cfe63ae1aa584ddff7b222ed
user:  build
password:  gongshow
root password:  gongshow
QR Image:

https://i0.wp.com/www.1fichier.com/qr/0/0tqstz.png

— Ernest Kugel

1 Comment

Filed under Ben Nanonote

Make your PC link the Ben to the Internet, Automagically!

A familiar pain for Ben Nanonote users is connecting the Ben online every-time they plug it in. udev can remove this pain with a simple rule to run all the commands on the host the Ben is connected to when its connected. To get this done, you will need 2 pieces: a udev rule, and a script.

Your udev rule can be a file under  /etc/udev/rules.d/ . I called mine “72-BenNanoNnote-net.rules”

It’s content should look like this:

SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0525", ATTR{idProduct}=="a4a1", RUN+="/usr/local/bin/ben-net.sh"
# where RUN+= points to your script

The script should look like this, and can feel comfortable under /usr/local/bin :

#!/bin/bash
GATEWAY_IF=ppp0
if (/usr/bin/lsusb -t -d "0525:a4a1"); then
        echo .
        echo "Ben NanoNote found, setting up USB network ... "
        if !( /sbin/lsmod | grep 'ip_tables' ) && ( /sbin/modprobe -l ip_tables ); then
                /sbin/modprobe ip_tables
                echo "ip_tables is now loaded"
        else
                echo "ip_tables already loaded"
        fi
        if ( grep '0' /proc/sys/net/ipv4/ip_forward ); then
                echo "1" > /proc/sys/net/ipv4/ip_forward
                echo "IP forwarding is now enabled"
        else
                echo "IP forwarding already enabled"
        fi
        if !( /usr/sbin/iptables -L | grep $GATEWAY_IF ); then
                /usr/sbin/iptables -t nat -A POSTROUTING -o $GATEWAY_IF -j MASQUERADE
                echo "Routing is now enabled"
        else
                echo "Routing already setup on "$GATEWAY_IF
        fi
        /sbin/ifconfig usb0 192.168.254.100 netmask 255.255.255.0
fi
# where GATEWAY_IF is the interface that is connected to your LAN or the Internet.

Leave a comment

Filed under Ben Nanonote

GNU Pem on the Ben NanoNote

image

image

image

Pem, the personal expenses manager, was ported to the NanoNote and feels at home!

Leave a comment

Filed under Ben Nanonote

MediaTomb on the Ben Nanonote

What can I say, the title speaks for itself. As no big surprise, the most versatile piece of UPnP streaming media servers out there, MediaTomb, is humming along with no problems on Qi Hardware’s Ben Nanonote. Real world usage scenarios could include using the Ben as a little DJ in parties by streaming to VLC or other UPnP supporting players, or other wild fantasies Ben owners might have. The best news here is that there is absolutely no brain work involved. I simply had to fire up the network connection on the Ben, grab the right hard linked binary, untar it and run. All of this can be done directly from the Nanonote (once it’s online):

# wget http://downloads.sourceforge.net/mediatomb/mediatomb-static-0.11.0-r2-linux-uclibc-mips32el.tar.gz
# tar vxzf mediatomb-static-0.11.0-r2-linux-uclibc-mips32el.tar.gz
# cd ./mediatomb
# ./mediatomb.sh

To automate, add this to /etc/rc.local and make it executable, but remember MediaTomb must be started from the mediatomb folder.

Once started, media tomb can be accessed on port 49152 with your browser. For me, this translates to http://192.168.3.2:49152 and looks like this:

MediaTomb on Nanonote

MediaTomb on Nanonote

So far, it’s an awesome remote file browser, and as soon as I can get VLC to compile on my Slackware, it’s party time!

Leave a comment

Filed under Ben Nanonote

Qi’s XBurst Tools from source

This post will provide a quick how to on setting up Qi’s XBurst Tools from source, needed to flash their Nanonote. The kind folks from Qi got the source from Ingenic, and with it the lovely toolkit used for USB booting the Nanonote, which in turn allows to flash it.

Now, it’s worth mentioning this is not normally needed, because Qi provide binaries and Debian packages.

If you do wish to go from source, here’s what you’ll need: Linux with a build environment, libusb-dev and libconfuse-dev

My distro (Slackware13  64) had the first 2 in place. I only had to get libconfuse and build it from source. It worked as advertised.

Then, I got the source from the Qi repository. It too worked as advertised. (read: downloaded, compiled and installed).

However, despite having successfully built USBBOOT I could not actually boot the Nanonote, because my AMD64 targeted Slackware’s GCC had not MIPS support. So while it could compile the toolkit, it could not, by definition, compile the target boot image for the XBurst. The only way currently to circumvent this is to get the files from another machine (the boot images contain 2 stages, which you may just download here: xburst_stage1.bin and xburst_stage2.bin), or from the Debian package, as the submitted Debian bug suggests . They should be placed in /usr/local/share/xburst-tools . Currently, those are the only 2 pieces that can’t be built from source on your average Linux desktop, but as you’ve just seen, the best solution is quick and dirty.

1 Comment

Filed under Ben Nanonote

The Ben NanoNote from Qi Hardware – Getting the Concept, Getting Online, Getting Updated, Getting Software

Qi Hardware are a relatively new company that’s trying to do what was attempted before: marry open source software and hardware. So what makes the NanoNote different? Well, it’s not as ugly as what you might have seen so far from the OpenMoko guys, and very affordable @ 99$. Also, the ambition is lower: no WiFi, no phone, no networking (other than through USB port), no USB Root HUB. The goal of the guys at Qi is to keep the software open and unlock all the possibilities the current hardware has before adding bits that would require propriety blobs. This could work as soon as enough software is ready. Nevertheless, being online is hard to beat.

…So I got mine in the mail a few days after ordering. Here’s what it looks like:

Ben NanoNote - ping google.ca

Ben NanoNote - ping google.ca

Despite all the claims of “no wifi support” and “so much more to do before networking” the Ben gets really fun as soon as it goes online, for a few simple reasons:

– There are network tools like nslookup, SSH, FTP, FethMail and friends.

– lynx can get you simple googling

– you can install packages from OpenWrt, which provide some neat options: text-to-speech (flite), music player deamon (mpd), MSN client (tmsnc) … and … drumroll … PYTHON!

Getting your BEN talking to the OpenWrt repositories is a piece of cake. The instructions for just getting the Ben online are in the user manual and on Qi’s Wiki, but I can’t find the link so here they are again:

On a Linux machine connected to the Ben:

# modprobe ip_tables
# echo "1" > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# ifconfig usb0 192.168.254.100

On the Ben (note the Ben does this automatically with the default image, so this should not be necessary):

# ifconfig usb0 192.168.254.101
# echo "nameserver 8.8.8.8" > /etc/resolv.conf
# route add default gateway 192.168.254.100

And test…

Ben NanoNote - Googling

Ben NanoNote - Googling

Once you’re online, you can update your NanoNote to the latest packages from OpenWrt. This is not as streight forward as one might expect, so here’s the deal:

You need to refresh the package list:

# opkg update

You may then see the pending upgrades:

# opkg list-upgradable

If you wish to go ahead and upgrade the packages, you have to specify to not perform the upgrade with usage of a temporary squash files system. This is a must becuase it will do so by deafult to save space in case of very limited embedded envourments. This will prevent major updates from coming in if they are too big. The NanoNote has 2GB of NAND, so it is not *limited* in that sense. To override this behaviour, which I had to do to get the kernel upgraded, echo “option force_space” into opkg.conf:

# echo "option force_space" >> /etc/opkg.conf

You are now ready to upgrade. Note that …

# opkg upgrade

… does not work without package names, so you can feed it its own output (pretty silly but hey…):

# opkg upgrade `opkg list-upgradable`

Once that’s done, which might take a little while, you can reboot, and once you’ve gotten yourself back online, you can start exploring other goodies this lovely distro has to offer:

# opkg update
# opkg install python

Did I mention Python???

Ben NanoNote - Vs. Notebook

Ben NanoNote - Highly pocketable Linux

10 Comments

Filed under Ben Nanonote