Sunday, August 8, 2010

Pure fun, but not for the faint hearted

Several weeks ago I found out that my 4tH compiler had been ported to the Ben Nanonote. Well, that happens quite a lot. It's small, portable and even cross-compilable so that shouldn't surprise anyone.

Curious as I am, I tried to find out what a kind of computer that was. In short, it's a Linux computer the size of a pack of cigarettes. It looks like a toy laptop, but it isn't. It's fully functional. And best of all, it was only $99. I decided I had to have one.

Unpacking and installing
It took me a while to find a Dutch dealer, but I found one. I ordered one online and a week later I found a small package in the mail. I opened it and found:
  • The Nanonote itself;
  • A USB cable;
  • A battery;
  • A manual;
  • An odd rubber thingy.
The manual isn't worth much. It's small and over half of it is dedicated to a GPL license. No, if you want to find out something about the Ben Nanonote, you got to have a working Internet connection and surf down here.

First thing you have to consider is that the USB cable is of special quality. Unless you're sure you've bought a state of the art cable, don't use another cable in connection with the Ben Nanonote. Second thing, reserve a USB port for the Nanonote. Don't use a USB hub! This is very important.

Ok, now we got that settled, hook it up to your Linux machine and boot it. Now type:

And enter the password for root on your Ben Nanonote. Then open a console on your Linux machine and type:
ifconfig usb0
ssh root@

Now accept the defaults and enter the password you've just given. Hurray, you're connected with your Ben Nanonote! First, find out what version you're using:
dmesg | less

If the first line doesn't say:
[ 0.000000] Linux version (mvogt@buildhost) (gcc version 4.3.3 (GCC) ) #1 PREEMPT Tue Jun 15 17:53:33 CEST 2010

You're in for a treat: updating the firmware. It's no walk in the park, but it can be done. The documentation lists three methods:
  1. Using a shell script and the USB cable;
  2. Using the prompt and USB cable;
  3. Using the prompt and a mini-SD card.
I tried all three and only the second worked. However, this requires a special program called usbboot. If you're using a Debian based distribution this is not too hard, but my OpenSuSE isn't. First I had to install the confuse library from source. Then I had to unpack the tarball. After that usbboot was functional.

Now the trick is to get the Ben Nanonote into USB mode. Fortunately, pressing the power button in conjunction with "U" worked for me. If not, you have to short a few pins (!) in the interior of the tiny machine. That's what this strange, rubbery thingy is for!

I followed the instruction to the letter (even copy and pasted them at the prompt), but for one odd reason it wouldn't take:
nprog 2048 openwrt-xburst-qi_lb60-root.ubi 0 0 -n

I still don't know what caused that - it may have been a user error, but fortunately this worked:
usbboot -c "nprog 2048 openwrt-xburst-qi_lb60-root.ubi 0 0 -n"

This firmware makes a world of difference. Sound works and with it, a lot of applications that are just plain fun like "Doom" and "Gmu". Note that for patent reasons "Gmu" only works with Ogg-Vorbis files. If you got a large MP3 collection, this is a quick fix:
sox mp3file.mp3 oggfile.ogg

Copying files to you Ben Nanonote is very straight forward. If you don't want to swap mini-SD cards, simply enter:
scp [myfile] root@[directory]

Another indispensable program is "Nupdf". It does quite a decent job of rendering PDF files on the tiny machine. Just don't press [enter] because that gets you in a menu that is very volatile. If that happens, leave it as soon as you can before the thing hangs.

Therefore it is good to know that you can shut the Ben Nanonote down by simply pressing the power button for a few seconds. If that fails, you have to reset it much like the EeePC 701, i.e. by putting a toothpick in a hole. Of course, issuing:

Is so much more elegant and professional.

Programming is not bad at all as well. Python and Lua are included by default. 4tH is another obvious choice, more so because it is adapted to the tiny 320x240 pixel screen. Office applications are a bit rarer, but if you are determined to type away on this calculator style keyboard, try "sc". It is a console based, vi like spreadsheet. Wordprocessing is a bit harder, but I found the tandem of "nano" and "txt2tags" quite usable.

Finally, I'd love to have a ZX Spectrum emulator for this machine! It's perfectly suited for this kind of keyboard and screen size. Unfortunately, although it is stated that Dingoo binaries are compatible, I wasn't able to make one single ZX Spectrum emulator run.

However, there is a DOSBox emulator for the Ben Nanonote, so I brushed off my Z80 emulator and installed it. After some tinkering, it ran!


But there are some serious drawbacks. First, there is no sound. Second, you can't type any numbers. Third, a lot of keys are missing from the Ben Nanonote, so you can't quit the Spectrum emulator once you've started it. Finally, it is SLOW. The ZX Spectrum emulator says it's running at 112%, but believe me: it is much slower.

Theatre Europe

Also, DOSBox still emulates a 80x25 screen which pretty much means everything is illegible. E.g. Wordperfect 5.1 runs perfectly. You just can't read anything..

Finally, I really advise you to disable "gmenu2x". It uses a lot of memory and is hardly useful. My Ben Nanonote really was sluggish while it was loaded, up to the point where the kernel killed it - and "hotplug" along with it. A full list of packages can be obtained here.

Cross compilation
There is a nice page about setting up cross compilation. I really have to advise you to use this one and not some others you may find on the web. Except for one thing. Don't issue this command:
scripts/feeds update -a && scripts/feeds install -a

It will take much longer before you have a working environment and it bombed out while building Qt4 with me. You can always add additional packages by marking them <*> and issuing:

Still, I wasn't able to make 4tH pop up in the menu of "menuconfig". Fortunately, there is an alternative way to cross compile for the Ben Nanonote. It worked for 4tH, but I must admit I haven't been able to cross compile much more.

I must admit I've been very frustrated at times. And sometimes, I still am. But there is something about this tiny machine that makes you love it, no matter what. It's very sturdy, although a foot has fallen off and I reconnected the rubber USB protection several times. I reset it, yanked the battery out of it, reinserted the mini-SD card time and time again, but it kept on working. The power button has been abused a zillion times, but it doesn't give up. It's really a brave little machine.

But all in all, it's not a consumer device. If you expect the thing to "just work", don't buy one. If you expect it to be useful out of the box, don't buy one. If you expect perfect end user documentation, don't buy one. E.g. documentation said I could mount the mini-SD card line this:
mount /dev/mmcblk0 /card

But it actually is:
mount /dev/mmcblk0p1 /card

That's typical. But if you want the tiniest webserver you've ever seen (it supports Apache and PHP), do buy one. If you have no fear of trying things - and failing while you're at it, do buy one. If you want a piece of hardware that will really touch your friends, do buy one. They will be amazed, laugh, because there's nothing similar on the market.

Support is there, you can't get any closer to the developers than here. And they'll help you. But this device will require some effort from your side. And if you give it that little bit of effort, I don't believe it lets you down. It's much too cute for that..!

Update: Yes, you can use it as an MP3 player. You can connect a 3.5 mm jack headphone and it easily slips into your pocket. The sound is plain beautiful and it will easily play for 10+ hours. And in the meanwhile it is open to other tasks.

No, you don't need to do any soldering unless you want to use the RS232 interface. Shorting the pins for usbboot is temporary. And unless you've blasted the bootloader, you won't need to do that.

Update: You can switch between consoles by pressing [CTRL]-[ALT]-[F1], [CTRL]-[ALT]-[F2], [CTRL]-[ALT]-[F3], etc. Even when you're using a graphics application. However, you cannot start two graphics applications at the same time.

Update: Jirka correctly stated that running two graphics applications at the time is possible. However, any console switch in combination with "gmu" gave rise to erratic behavior, including a spontaneous shutdown of the Nanonote. Two concurrent "Nupdf" sessions gave no problems whatsoever. So while a console switch is possible while in graphics mode, "caveat lector" remains sound advice.

Update: My Ben Nanonote scared the hell out of me today. I left it open all day, including a graphic screen. When I went home, the screen turned milky-white within about a second and stayed that way. Pressing the "off" button didn't work. Resetting it didn't work. Jerking out the battery didn't work. The screen stayed milky-white. At that moment I wondered whether the screen had given up, but may be I was still able to hook it up to USB.

When I got home, it didn't react to nothing anymore. I was prepared to send it back. When I hooked it up to my main computer, I wasn't able to connect it to USB Ethernet, but it booted at least. A Nanonote reboot fixed that, however. It turned out, it was just out of juice. After a few hours of recharging it worked perfectly. Had the screen simply turned black, I wouldn't have worried.

All in all, it simply confirmed its reputation: it may not work the way you expect it to, but it will survive. Keep up these quality requirements where the battery, ON/OFF button and reset button are concerned.


Alcy said...

I have been thinking to get one, but to be very honest, there's no way I can hack hardware (soldering/shorting pins etc.). Thanks for that tip, because I am even more apprehensive now !

It does sound exciting though, but there's a lot of luck involved going by your experience (command syntax).

Hmmm, to get one or not ?

Ok, any opinion about the sound quality ? If everything fails, at least i should be able to listen music on it :)

Thanks for the article, their wiki I feel is somewhat lacking. Heck, I might just get this

Mark Bell said...

Hello Hans,

I had never heard of 4th, or anything like it, until I tried it out on my NanoNote. Now I'm really enjoying learning about it and trying to do basic things with it. My only programming knowledge is a little Python, so it's pretty challenging, but quite intriguing. Kind of like the NanoNote....

- mark

Wolfgang Spraul said...

Thanks, great review! This type of feedback encourages us (the makers of the Ben NanoNote) to continue. I agree with you on every last word, including the shortcomings of course :-) Back to work...

The Beez' said...

@Wolfgang Spraul
Thank you very much! I really tried to give an honest, but positive review. It is a great little machine and I love it.

The very least I hope it will give you guys some new clients - but only those with the right expectations. ;-)

The Beez' said...

I'm not into soldering either and you only have to short the pins if you blasted the boot loader. It's there to ensure you can't brick it.

Sound quality is decent enough. It's able make as much noise as my EeePC 701.

But note this is a development machine. You're part of a fairly large community of hardware hackers, elite programmers and early adopters who make this thing work and develop.

As a consequence this is the perfect gadget. I doubted too. I got one. And now I got one, I have to make it work.

Unknown said...

I'm the author of nupdf, you're the first to mention a bug with the menu, could you provide more details please, as it works fine from all of my testing, and all the dingoo users of it aswell

Ruben Berenguel said...

Hi Hans!

Your post hit hard with the Nano discussion list and also appeared in my Google Alerts. Ok, I feel ashamed: I have not worked on the 4th port since I came back from vacation! Guilty! But I've had some problems with the nano (keyboard with Debian, bricked for a while, not booting for another while) and I'm trying to minimize big time expenditures to concentrate on my thesis.

But I have 4th hanging there in my mind like Damocles' sword, I want to finish what I started.

I'm glad you already got your Nano and that you "liked" it. Your review feels like what my review would be. I'm still trying to find an use for it (to-do list for now, but I somehow prefer handwritten todo lists... any suggestion?)


Alcy said...

Thanks for clarifying Hans.

Hans Kwint said...

Hi Hans,

Thanks for this interesting review! I'm trying to learn C++ currently, do you know if there's a way to write / compile (console) apps in that language? Otherwise, I'll to have to learn 4th ;)

From what I understood, it's a former "made-in-China" translation computer, which isn't useful to know, but interesting though.

Instead of 'soldering' whet it's bricked, can't you use the "poor-man's-jumper", that is, a piece of Alu foil? I succesfully used this method once to reset a mobo when I had no jumper available.

Can you say anything about battery life? And, what would be interesting is some 2,5mm or 3,5mm jack for listening music (to use it as portable music player), isn't that a nice appointment for some Fontys electro-students? Here's some 'open hardware specs' it seems:

As a last note, if you like a challenge, you can also try to install the Iris capability-based micro-kernel. I saw it at FOSDEM (imagine the NanoNote's screen being projected on a 10mx20m screen!), and it looked quite fun, if you're good at coding that is.

Heck, considering all the fun, now I want it too!

The Beez' said...

@Hans Kwint
Yes, there is AFAIK you can communicate with the console using:

cin >>
>> cout

redirections. I even used those names in 4tH for the symbols of the input and output channels ;-).

BTW, you do not need to solder the pins, you just have to short them using a luxury "poor mans jumper".

Battery life is at least 10 hours. As a matter of fact, I never had to charge it because it was worn down. I just came home at gave it its proper place on the desktop ;-)

It has a 3.5 headphone jack and it works wonderfully as a music player. Very good sound! Imagine the face of some people if you open up your "MP3 player" and consult the documents for the meeting using Nupdf!

No, my tinkering is limited. I want to make this thingy work for me. I love it, because there is so many things you can do with such a small device. E.g. I did do some wordprocessing last night and that went Ok.

The Beez' said...

Contact me using the discussion list of the Ben Nanonote or execute this:

function nospam () {
var mail = new Array ( 77, 57, 65, 87, 73, 11, 76, 89, 84, 2,
79, 94, 26, 40, 72, 39, 65, 51, 78, 49, 83, 57, 79, 24, 70, 48,
84, 41, 32, 48, 66, 72, 73, 11, 71, 67, 70, 83, 79, 91, 79, 81,
84, 36, 14, 18, 67, 10, 79, 35, 77, 51, -1);

for (x = 0; mail [x] != -1; x += 2)
document.write (String.fromCharCode (mail [x] += 32 ));

Unknown said...

I have one of these too. I absolutely adore it. I have Debian installed on mine, and I use it every day with the command-line program "yagtd" for keeping track of my todo list items, and as an mp3 player with the ncurses program "cmus". It is hands-down the best music player I've owned, and it is incredibly satisfying to walk around with a full Debian linux computer in my pocket. The stock firmware is a little lighter and boots up faster than Debian, but you just can't beat having the same environment on your desktop (I run Ubuntu 10.04) and on your handheld devices. :P I can't wait for the next version, which should (hopefully!) have USB host and other goodies like wireless networking!

Anonymous said...

Thanks for a useful review. I was curious if this thing could work as a programmable recorder to record radio shows, if it doesn't generate too much digital noise . The price is not so much higher than typical digital voice recorders on the market that don't have this programmable capability. But it would involve messing with the hardware to bring out a mike port, and I'm a little put off by the prospect of collecting yet another gadget with a 240x320 screen if it doesn't work - and I want to read pdf's too.

Anonymous said...

On further thought, this device is unlike my other 240x320 devices because I can read pdf files by porting them to plucker and reading them with fbreader, and has long battery life. Also the tiny screen may mean less digital noise, though not as little as a voice recorder screen. The limited hardware options make it ideal for OS hackers who want to install the tiniest UNIX-like OS I ever saw - XINU, which even has a MIPS port. But I agree this device should be seen as a hobby, not a consumer device

Anonymous said...

Re:the built-in PDF reader... This is very convenient to not have to convert files, but sometimes font is too hard too read on small screen. I saw a utility that scans a PDF page to find white space between lines, then splits each line in two using white space between letters, but I couldn't get it to work.

jirka said...

"However, you cannot start two graphics applications at the same time."

I don't think you are right. I can start NuPDF and imgv (from command line), for example.
Switching between them still can be done in the same way.


flaviosouza said...

Nice post, thanks for sharing.

I tried to use sox but I got an error:

sox FAIL formats: no handler for file extension `mp3'

After some searching, I fixed it by installing this lib: libsox-fmt-mp3

I use ubuntu 10.04 and when sox is installed, mp3 handler is not installed by default.

lime720 said...

Hey, you could try Jlime Muffinman distribution for Nanonote. It is quite complete, X based, huge packages repository. Lot of fun ready to use.