Skip to Content

本 (Ben) NanoNote Editing/Compiling/Flashing an Arduino sketch

user warning: Unknown column 'token' in 'field list' query: UPDATE dpr01_captcha_sessions SET token='d32fd1b3a6475cd10fb6fbe341d9275f' WHERE csid=1132462 in /home1/tuxbrain/public_html/sites/all/modules/captcha/captcha.module on line 216.


Following we detail the steps needed to edit, build, an upload an  Arduino directly on 本 (Ben) NanoNote

First is to have serial port accessible and be sure it works as explained in this post

Then we proceed to install Debian on Ben, basically following the  pyneo.org instructions but using other  uboot/kernel/rootfs, I recommend the reading of  this wiki page about Ben NanoNote flashing

wget http://downloads.qi-hardware.com/software/images/Ben_NanoNote_2GB_NAND/latest/openwrt-xburst-u-boot.bin
wget http://pyneo.org/downloads/nano/openwrt-xburst-qi_lb60-uImage.bin
wget http://mister-muffin.de/nanonote/debian-sid.ubi

Put NanoNote on  USBboot mode and like root on the host PC where you have NanoNote connected

usbboot -c "boot"
usbboot -c "nerase 0 4096 0 0"
usbboot -c "nprog 0 openwrt-xburst-qi_lb60-u-boot.bin 0 0 -n"
usbboot -c "nprog 1024 openwrt-xburst-qi_lb60-uImage.bin 0 0 -n"
usbboot -c "nprog 2048 debian-sid.ubi 0 0 -n"

When it finish, next boot will be done in a brand new Debian  :),

Let fill it with some packages,
Connect NanoNote to  internet though USB
The Debian image I have installed have some issues with the ssh keys but are easily solved reinstall ssh.
apt-get remove openssh-server
apt-get install openssh-server

This will install packages build tools and base libraries needed to compile in C like make, autotools, etc...
apt-get install build-essential

But to compile to Arduino (Atmel architecture) we need the following too
apt-get install gcc-avr avr-libc binutils-avr

and to upload the result binaries to the Arduino board.
apt-get install avrdude

To be able to use the libraries and hardware definitions from the Arduino software we need to copy them into NanoNote from an already installed Arduino IDE, for example in you host PC, in my Ubuntu machine is on  /usr/share/arduino

we create on the NanoNote the following directory
mkdir /usr/share/arduino
on PC
scp -r /usr/share/arduino root@192.168.254.101:/usr/share/arduino

use your own NanoNote IP address.

Only the Makefile left, the Makefile has to be in same folder where you have the sketch(.pde file), I have modified the original one from   http://johanneshoff.com/arduino-command-line.html to adapt it to Arduino Duemilanove, my library path, serial port device and some other chages to aling it with the 018 version, you can  download my modifie Makefile here
From here nothing you have not seen in the video, it's as easy as move to the folder where the .pde and Makefile are and
make
make upload

Hey wait! I forget one thing, due we are not using the USB connection but  0 & 1 serial pins this cannot make use of the autoreset feature, so we must press the Arduino reset button just before avrdude starts .

I have in the TODO list haw to deal with the dependencies with other libraries like (Ethernet, PID,...) when I find a few time I will go for it.
Happy Hacking :)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

unable de power on

Hello All,

Had the same problem.
First debian install worked, then I decide to flash it again to change Debian version, and never got to boot it again after a reboot.
If there is any change to replace motherboard or something, let me know.

Please let me know if you have any news.

Kind Regards,

Francois

this seems to be a case that

this seems to be a case that can be fixed with a reflash, follow this instructions

http://en.qi-hardware.com/wiki/Updating_Ben_with_usbboot

remember to use the rubber carbonized button included on your Ben Nanonote box to short the usb-boot pins below the battery

and reflash it with a "safest" distribution like OpenWrt or Jlime, once you are confident again with the reflashing method

try again with debian if you wish,
Regards

not turn

Hello friends.
I did the steps in the installation of debian.
but after rebooting it does not turn on.
someone had this problem too?

Thank you.

Valuable thoughts and

Valuable thoughts and advices. I read your topic with great interest.

Unable to power on

Sergio - I have the same problem. I'm trying to see if someone on the IRC channel has had a similar problem (and the solution.)

If I succeed in reviving the NanoNote I'll post the solution here. If you are successful, please do the same?

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.