Posted: August 18th, 2010 | Author: john | Filed under: Handhelds, packedobjects | No Comments »
Recently I have been working on Packedobjects which included redesigning the API and replacing a lot of C code in Scheme. I will try and formalize the whole encoding process which I have called Integer Encoding Rules. I also began work on a manual which includes some examples. My aim is to support the tool on OpenWrt which also involves maintaining the GNU Guile build.
I built and tested the software on my Ben Nanonote. The ipk is available: http://zedstar.org/ipk/packedobjects_0.4_xburst.ipk
After improving the documentation I intend to use the tool in a networking course at work. I think it is important for students to gain some experience of designing and structuring binary network protocols. We will be getting a bunch of Nanonotes to compliment the Openmoko Freerunners we have. This will provide some nice hands on experience packing some data and communicating it across different kinds of hardware.
Long term, I am interested in designing some funky SlowFi protocols on copyleft hardware.
Posted: May 2nd, 2010 | Author: john | Filed under: Handhelds | Tags: guile, nanonote, openwrt | No Comments »
I have been hacking at the OpenWrt Makefile and now have command line history working within the REPL.
opkg install http://zedstar.org/guile/libgmp_4.3.1-2_xburst.ipk
opkg install http://zedstar.org/guile/libltdl_1.5.26-1_xburst.ipk
opkg install http://zedstar.org/guile/guile_1.8.7_xburst.ipk
Once installed setup a .guile file:
root@BenNanoNote:~# cat /root/.guile
(use-modules (ice-9 readline))
(activate-readline)
When you run guile now you should be able to use the up and down cursor keys to go through your command history etc.
Posted: May 2nd, 2010 | Author: john | Filed under: Handhelds | Tags: freerunner, guile, openwrt | No Comments »
To experiment some more with OpenWrt I dusted out a Freerunner and built a minimal image containing GNU Guile. The image is built with glibc and an IP 192.168.254.101 to match my Nanonote settings.
** UPDATE: GNU Guile now has readline support and root image now contains GLib **
Flash the following:
http://zedstar.org/freerunner/openwrt-s3c24xx-2.6-uImage
http://zedstar.org/freerunner/openwrt-s3c24xx-root.jffs2-128k
Boot the device then:
john@thinkpad:~$ telnet 192.168.254.101
Trying 192.168.254.101…
Connected to 192.168.254.101.
Escape character is ‘^]’.
=== IMPORTANT ============================
Use ‘passwd’ to set your login password
this will disable telnet and enable SSH
——————————————
BusyBox v1.16.1 (2010-05-02 14:45:14 BST) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.
_______ ________ __
| |.—–.—–.—–.| | | |.—-.| |_
| – || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
KAMIKAZE (bleeding edge, r21293) ——————
* 10 oz Vodka Shake well with ice and strain
* 10 oz Triple sec mixture into 10 shot glasses.
* 10 oz lime juice Salute!
—————————————————
root@OpenWrt:/# uname -a
Linux OpenWrt 2.6.30.10 #1 PREEMPT Sun May 2 14:59:31 BST 2010 armv4tl GNU/Linux
root@OpenWrt:/# guile
guile> (string-tokenize “hello world”)
(“hello” “world”)
guile>
Posted: February 25th, 2010 | Author: john | Filed under: Handhelds | Tags: guile, nanonote | 2 Comments »
Received a Ben NanoNote today. It is a really natty little device with a lot of potential.
My standard test on how hackable a device is involves getting Guile running. Anyway, it was pretty easy to accomplish this despite not using openWrt before.
root@BenNanoNote:~#
root@BenNanoNote:~# guile
guile> (map (lambda (x) (+ x 1)) '(1 2 3 4 5))
(2 3 4 5 6)
guile>
To install get the 3 xburst packages from here.
Happy Scheming!
Posted: December 5th, 2009 | Author: john | Filed under: Handhelds | Tags: guile, openmoko, scheme | No Comments »
Having Guile running on an embedded device is very powerful. You can add scripting capabilities to a C program and avoid some of the cross compilation -> deploy cycles by simply editing the script to change some functionality. As an example I have taken the code from the excellent introductory article Scripting with Guile. I packaged the code so that if you install the tarball or the ipk it will install both the binary and script to a suitable place.
Tarball: http://zedstar.org/tarballs/square-0.1.tar.gz
ipk: http://zedstar.org/ipk/square_0.1-r0_armv4t.ipk
After installing Guile do:
root@om-gta02 ~/ipks $ opkg install square_0.1-r0_armv4t.ipk
Installing square (0.1-r0) to root...
Configuring square
root@om-gta02 ~/ipks $ square
result of square is 49
result of square2 is 81
Posted: December 4th, 2009 | Author: john | Filed under: Handhelds | Tags: guile, openmoko, scheme | No Comments »
I recently got hold of a bunch of Openmoko Freerunners. I needed a distribution which installs to Flash (NAND) so I chose SHR.
I am very impressed how things have progressed especially in terms of being a phone!
Anyway, this gave me a chance to try out some Guile packages I built. If you have a recent version of SHR unstable the following should work:
http://zedstar.org/guile/
Happy Scheming!
Posted: November 24th, 2009 | Author: john | Filed under: Handhelds | Tags: c, glib, gps | No Comments »
Code:
http://zedstar.org/tarballs/gpstest-0.1.tar.gz
From the README:
A simple GLib based program which periodically reads coordinates from gpsd.
The logs directory contains a sample gps log which can be fed to gpsfake:
gpsfake 1334-N-20071129-GTA01-A3.log
Make sure gpsd is not running before attempting to run gpsfake.
The data was taken from a Neo 1973 in central London. It will take a moment
to start showing coordinates.
** edit ** This example needs updating to work on newer GPSD versions
Posted: June 25th, 2008 | Author: john | Filed under: Handhelds | Tags: iPhone, remora | No Comments »
I made a video of searching my iPhone loaded with over 2000 PDFs from MIT’s OpenCourseWare. The search engine, Hyper Estraier, is the same one used on gnu.org but running locally on the iPhone together with a local lighttpd web server. It performs very well and provides a nice way of accessing or iPhone when on your daily commute!
http://www.youtube.com/watch?v=MKKlkcZ6vYo
Posted: June 6th, 2008 | Author: john | Filed under: Handhelds | Tags: iPhone | 4 Comments »
I have not had time to look at packaging this but here is a tarball of the build which you can untar in the root directory. It will place everything in /opt/iphone
http://zedstar.org/tarballs/hyperestraier+xpdf.tgz
Posted: May 15th, 2008 | Author: john | Filed under: Handhelds | Tags: iPhone | No Comments »
I managed to get Hyper Estraier running with lighttpd on my iPhone. This provides a nice way to load the device with documents and have a simple search interface for accessing them. It is part of a larger project I am working on. I will try and package it soon or simply release a tarball of the build.