The Year was 2008 and ...

Data collection on the Web made amazingly easy.
Collecting even simple responses on your Web site still requires some programming skills, like
  • An HTML form needs to be generated [HTML and CSS]
  • user input has to be validated, best on client and server side [JavaScript and JSP or PHP]
  • and eventually the collected data needs to be aggregated, sliced and diced. [SQL]

I recently discovered formassembly, a service offered by Veer West LLC, based in Indiana, which claims to help with all the required tasks. Let's walk through them ...

Form Design

Form Builder

To test the Web application, Tom and I created a simple feedback form for his PodCast: The Tech Weekly PodCast

An easy to use but still powerful all web based form builder makes form generation easy and fun. First, one has to write the text that makes up a question and subsequently select an answer-type, like text, options, radio-buttons, checkboxes, even file upload is among the choices. Secondly, one can setup triggers, conditional questions, calculations, and advanced presentation styles.
At any time, a preview of the form can be displayed, which makes the design and setup process less of a guessing game.

Publishing

Formassembly offers several different ways to put the form on the Web:
  • Formassembly hosts the form on their server.
    Our test form for instance is available on their servers here: http://app.formassembly.com/forms/view/5850
  • The HTML for the form can be downloaded and integrated into a web page.
    This link for instance can be used to download the HTML code that makes up the form: http://app.formassembly.com/forms/export/html/5850
  • Server-side script can be used to retrieve the form via a REST URI.
    This link can be used to retrieve the form markup via an REST call: http://app.formassembly.com/rest/forms/view/5850
  • Server-side script can be used to retrieve the form via an XML URI.
    This link can be used to retrieve the form markup via an XML API call: http://app.formassembly.com/xml/forms/view/5850

Getting to the form markup via REST allows merging the form's HTML code into a regular web page on the hosting server, which is significantly different and better than letting the consuming browser perform the merge, which happens for instance with Google and Amazon ads.
In case the form needs some modification later, Formassembly amazingly offers simple but effective revision management.

Revision Management

Notifications

Formassembly offers several different ways to confirm the form submission to a user, who filled out the form:
  • A static response text, e.g. a thank you note can be defined.
  • A URL to a page can be defined that Formassembly will be redirecting to after form submission.
  • In case the form also collected an email address, a response can be sent to that address right away.

Connectors

With a payed subscription, (see details below) comes another cool feature, which allows to integrate a forms with 3rd-party applications like PayPal or Salesforce.

Data Collection

Aggregated data in chartsThe collection of the submitted form data, again - I guess you get the idea - can happen in several different ways:
  • Submitted data can be either received by email or via RSS feed.
  • Moreover, the submitted data is automatically aggregated and displayed in charts.
  • A payed subscription, (see details below) allows on demand export to Excel, Access, and XML.
I have just touched on some of the features and a more complete list is available here: http://beta.formassembly.com/feature-list.php

Pricing

The basic service, which covers all the features I have described above, is free.
A Pay-As-You-Go plan is available for 5 cents per form submission comes with the following additional features:
  • On demand export into Excel, Access, and XML.
  • captcha
  • SSL
  • Auto Responders
The same is also available with a $9 monthly subscription.
The most expensive plan costs $34 per months and includes the aforementioned integration with 3rd-party applications like PayPal or Salesforce.

Over all, this looks like a very useful service and the feature set seems well rounded and thought through. Again, here is link to our very simple test form: http://app.formassembly.com/forms/view/5850 - but don't stop there, go and try it yourself.

External Harddrives File Transfer Speeds Compared: USB 2 vs. Firewire 400
After reviewing the Acomdata Samba USB Enclosure, which houses a Seagate SATA 3.5" 7200 RPM drive with 8MByte buffer, and also the LaCie 160 GB Portable Firewire-400 2.5" 5400 RPM drive a couple weeks ago, I finally took the time to run some simple file transfer speed tests on both drives.

External Harddrives : File Copy Speeds Compared
USB 2: SATA 3.5" 7200 RPM vs. FireWire-400: 2.5" 5400 RPM

Single file [200 MB]

Source \ Target Internal Drive External USB Drive External FW400 Drive
Internal Drive - 11.104s 7.167s
External USB Drive 5.533s - -
External FW400 Drive 5.187s - -

3750 files [combined 22.2 MB]

Source \ Target Internal Drive External USB Drive External FW400 Drive
Internal Drive - 1.951s 0.895s
External USB Drive 1.077s - -
External FW400 Drive 0.968s - -
  • Internal Drive: Hitachi Travelstar HTS541612J9SA00
  • External USB: Acomdata Samba USB Enclosure / Seagate ST3250823AS SATA
  • External Firewire 400: LaCie 160 GB USB 2.0 /Firewire400 Portable Hard Drive

Results

Setting the observed time to copy files to and from the USB drive to 100%, means that reading from the Firewire drive is about 6% faster for a single larger file and 10% faster for a couple thousand smaller files.
The results for writing files show a more significant difference. Writing to the Firewire drive is 35% faster for a larger file and about 54% faster for a couple thousand small files.

Btw, the abovementioned reviews on the drives can be found here:
Carlsbad, California is getting an Apple Store

If Job postings on Apple's Job site as well as on Craigslist can be trusted as an indicator then The Forum in Carlsbad California is the location of a soon to be opened new Apple retail store.

  • Apple Retail - Mac Genius - Forum at Carlsbad (Carlsbad, CA)
  • Apple Retail - Creative - Forum at Carlsbad (Carlsbad, CA)
  • Apple Retail Sales - Forum at Carlsbad (Carlsbad, CA)
  • Apple Retail - Inventory Control Specialist - Forum at Carlsbad (Carlsbad, CA)
  • Apple Retail - Store Management - Forum at Carlsbad (Carlsbad, CA)
Turning the Web on its head - let's have the server call the client
Code Camp is not just for geeks, hackers, and code monkeys; and while you may find some of them at Cal State Fullerton on January 26 and 27, Code Camp is first and foremost a place for software developers to come together, share ideas and experiences, and learn from their peers.
This will be the 3rd time for me, driving up to Cal State Fullerton, and for the 3rd time, I have been given the early morning spot for my talk. Now, like probably most participants, I would not consider myself a morning person - still, I'm confident that this topic will fill a room: Turning the Web on its head - let's have the server call the client.

We will take the accepted view that a Web-Client calls (via HTTP GET or POST) a server and turn it on its head. Let's have the server call the client. It is really not that far fetched, to imaging a scenario where the server, when it has determined that something exciting just happened (e.g., the Dow Jones Industrial Avg. Index jumped 100 points) calls the Web Client, instead of clients constantly polling the server (even when the DOW barely moves).

Sounds interesting and a couple of implementation ideas may come to mind. After looking briefly into some xml and binary web service protocols, we will take a closer look at the notification mechanism, provided by Java's management extensions and eventually take a really close look at a full featured implementation of the above mentioned problem.
Interestingly, even when looking at both, the client and the server part of this solution, there isn't really all that much code to write, which means that even in the little time we have, all the concept and patterns used, can be looked at and discussed. Honestly, all the code, (client and server) that makes this 'Stock Quote Client' an event-consumer, instead of a stupid poller, will be shown.
  • CodeCamp - Fullerton 2008
  • Wolf Paulus: Turning the Web on its head - let's have the server call the client
  • Saturday, January 2008
  • Cal State Fullerton, Room UH335, 8:45 AM
  • Conference Presentation Slides: [PDF Slides, 1.7MB]
The Power of Inspiration - Yes, We Can.


We are committed to open source, no really, we are.
A couple days back, I had the chance to talk to the senior director of software development of one of the fastest growing private companies in the US. Offering Software as a Service, the company uses lots of libraries but mainly MySQL and Java on the back-end and Apache and PHP to generate the presentation, nothing really surprising or out of the ordinary, I guess. The conversation was kind of boring until the senior director suddenly mentioned, "You know, we are heavily invested into open source" and one of his software development manager concurred, "We are really committed to open source, no really, we are."

Hmm, heavily invested and really committed to open source, right! Guess what this fast growing company had contributed, how many lines of code and how many person-hours of engineering time it had donated? Yes, you guessed correctly: nothing, zero lines, and not a single hour.
No monetary donation to any open source project was ever made, no single bug report to an open source project was ever submitted, not even a single feature request was ever sent.

"Heavily invested and really committed to open source " just sounds so much better than "being a freeloader that grows his business like crazy thanks to those code-monkeys that make all this cool and virtually bug-free software available under the BSD or Apache license ".

By no means am I against open-soure. In fact, I am the founder and principal developer of the Swixml XUL Engine, an open-source, Apache-licened library, available here swixml.org and here java.net. (Graphical User Interfaces are described in XML documents that are parsed and rendered into javax.swing objects at runtime.)
Neither do I think that everyone benefitting from an open-source project needs to give back to the community, (it certainly would be nice though). However, the meaning of "heavily invested and really committed to open source" should really mean some deeper involvement.
Wouldn't it be cool if senior directors and software development managers would proudly state to be really committed to open source and also put some money and resources to where their mouth is?
Big blow for Java Desktop Group
Chet Haase, the Java Standard Edition (Java SE) client architect in the Java Desktop Group has recently left Sun and joined Adobe Systems to work on the Flex SDK. His new Flex, Flash, AIR, and ActionScript related technologies can be found here: http://graphics-geek.blogspot.com/.

If you want to hear Chet talk about Java's Update check out this video and slides: Chet Haase at QCon San Francisco 2007, talking about Java FX, Update N and JDK 7
Will.i.am from the blackeyedpeas has put out a new music video, supporting Barack Obama. Besides Will, featured are: Jessica Alba, George Lopez, Macy Gray, Zoe Kravtiz, Ryan Phillippe, Kerry Washington, Eric Mabius, George Lopez, John Leguizamo, Regina King, Tyrese Gibson, Tichina Arnold, and Adrienne Palicki.


NewsFire RSS Reader becomes Freeware
The arguably most beautiful RSS Reader application for Mac OS X just became freeware. David Watanabe blogs that after much internal debate, he has made the decision that as of today, NewsFire is totally free. No feature restrictions, no ads, no cut-down 'lite' version... this is the real deal.

With the open-source Vienna project, Newsgator's NetNewsWire, and NewsFire, there are now three outstanding and free RSS reader applications available for OS X.
Tech Weekly Podcast, Episode #10
Bob and I were part of the panel at this week's Tech Weekly Podcast, a techology podcast with Grant Kirkpatrick and Tom Paulus.
While this was only the 10th episode of this fast paced podcast, it's certainly gaining some traction, if download and bandwidth statistics can be trusted.
Running MySQL 5.1 on Mac OS X 10.5.2 [Client]
Mac OS X 10.5 Server comes with the MySQL pre-installed. However, the database server doesn't ship with the client version of OS X 10.5 Leopard, which most of us Mac users run. Here are the notes I took, putting MySQL 5.1 on a 2 GHz Intel Core Duo based iMac (none 64 bit) running OS X 10.5.2 (Client)

Installing MySQL 5.1 on OS X 10.5 (Leopard) Client

Download the pre-compiled module package in form of a diskimage (dmg), available at http://dev.mysql.com/downloads/mysql/ For the 2 GHz Intel Core Duo based iMac, I downloaded the 32-bit version mysql-5.1.23-rc-osx10.5-x86.dmg. Newer Macs, featuring a Core-2-Duo processor should work best with the 64-bit version.
Open (double-click) the dmg file, followed by running (double-click) the mysql-5.1.23-rc-osx10.5-x86.pkg package installer.

The package installer will install the mysql into /usr/local/mysql-5.1.23-rc-osx10.5-x86 and also create this shortcut /usr/local/mysql/

Installing the Preferences Pane won't do us any good, it does not work anymore with OS X 10.5. Instead, the launchd mysql.plist file needs to be created and stored in /Library/LaunchDaemons/ and also given ownership to root:

sudo chown root:wheel /Library/LaunchDaemons/mysql.plist

mysql.plist



This command line can now be used to start MySQL:

sudo launchctl load /Library/LaunchDaemons/mysql.plist

and to stop it:

sudo launchctl stop mysql
sudo launchctl unload /Library/LaunchDaemons/mysql.plist

From now on, the MySQL Server will be started at boot time and (re-)starting should not be necessary anymore. Here, a check was done with the ActivityMonior, showing MySQL running:

Entering this command line after starting the server, /usr/local/mysql/bin/mysql should produce an output something like this:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.23-rc MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

.profile

Adding /usr/local/mysql/bin to the ~/.profile provides easier access to all of MySQL's tools.
E.g. use pico ~/.profile to insert this line into your shell profile:
PATH=${PATH}:/usr/local/mysql/bin

Setting root user's password and creating more users

Since the MySQL's root password is not set by default, this is one of the 1st things that need to be done like so:
mysqladmin -u root password myPassWord
Instead of using the command line, more users can now be added using a GUI tool like DbVisualizer


Using MySQL with PHP

PHP on OS X 10.5 is looking for mysql.sock at /var/mysq/mysql.sock. However, the mysql installer puts it at /tmp/mysql.sock. Creating the directory and a symlink, seem to be the best way to work around:

sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock



TiffanyScreens 2.6.3, faster and more secure.
TiffanyScreens, your favorite Presentation Sharing tool for Peer Groups has been updated. TiffanyScreens is a the multi platform application that seamlessly captures your computer's screen-content and sends it to multiple other computers at the same time. TiffanyScreens is great for sharing PowerPoint or KeyNote presentations. It is a truly cross-platform tool to share presentations (or any screen content) with your peer group, without requiring a projector.
The TiffanyScreens 2.6.3 update removes multiple security vulnerabilities that were caused by 3rd party libraries provides by Sun Microsystems, Inc. This latest update also include performance improvements that are especially noticeable on the Windows platform.
If it's shady or underground, it's thebroken
Kevin Rose finally gave in to request from fans of the show: "ok, one more episode of thebroken, I'll talk to dan :)"
From the site: thebroken is an underground technology show with a hacker mentality that caters to the elite (or wannabe 1337) computer user using a mixture of seriousness and irreverent comedy.
thebroken was an innovative and unique show at its time. Unfortunately, only 4 episodes were ever produced, the 1st one dates back to July 2003 and the last was released in September 2006. I'm sure Kevin and Dan can pull it off one more time ...
Protect your online privacy when on the road by using your Home Router as a Secure Socket Proxy
If you use your Laptop computer at the local coffee shop, in a hotel while traveling, or at any location where you expect your online privacy at risk, you may want to consider some extra steps to protect your electronic mail and Web browsing behavior from those nosy prying eyes.

Using your computer in the above-mentioned places allows at least everyone with administrator-access to the local router to see what sites you visited. In case you aren't reading your email through an SSL connection, it's also not too hard to capture what you read and write; and no, it doesn't matter if you use are using a Web browser or an email client application to access you email account.

However, if you have a hackable router at home and it is also accessible through a publicly routable IP address, you are in luck and with only a little time and effort, you can use your home-router as a secure proxy when you are on the road. The idea is to have your Laptop connect securely to your router at home; meaning, whenever your Laptop needs to request information from a resource on the Internet (DNS-Domain Name Service, HTTP-Websites, IMAP/POP3 Email, etc.) it encrypts the request and sends it to your router at home. The router decrypts the request, sends it on to the intended destination, and awaits the response. Eventually, the router will return the response to your Laptop, it is again encrypted, this time by the home-router, and decrypted on arrival at your Laptop. For those nosy prying eyes, all this will look like a long https connection, with undecipherable content. Sounds good? OK then let's make it happen.
SSH-Proxy Tunnel

Let's get started

As a 1st step, confirm that you have a hackable router. Make sure you it's a Linksys WRT54G/GL/GS, Buffalo WHR-G54S/WHR-HP-G54, or other Broadcom-based routers. A details list of supported devices can be found here: http://wiki.openwrt.org/TableOfHardware?action=show&redirect=toh
There are several active and competing projects, all with the same goal, building a better, more powerful, and feature-rich firmware for your home router, I currently prefer the Tomato-Firmware, which is available for free at polarcloud.com. Following the detailed instructions provided with the Firmware distribution will replace the router's original firmware with the Tomato firmware.

Dynamic DNS

In case you are not the proud owner of a static IP address, you need to use a dynamic DNS (DDNS) service to create a hostname that points at all times to your dynamic IP. dyndns.com (https://www.dyndns.com/services/dns/dyndns/) allows you for free to do this and also provide an update mechanism, making the hostname work with a dynamic IP address. Dyndns will monitor your IP every 60s or every 4 hours, it's your choice. The Tomato Firmware can also be setup to inform DynDNS whenever it detects an IP change. After doing this, your home router can always be reached by the name you picked, e.g. myrouter.homedns.org

OpenDNS

OpenDNS IP Not really necessary, but since it is a somewhat related topic, why not override the DNS entries your Internet service provider wants you to use and use opendns.org instead. Using OpenDNS, not only makes you independent from your providers DNS, it also has some cool features like Phishing Protection. Using OpenDNS is as easy as entering these two DNS addresses: 208.67.220.220 and 208.67.222.222, under Basic/Network in the LAN Static DNS fields.
To make the new DNS settings immediately effective, you may have to reboot the computers attached to the router and also clear their browser caches and DNS caches. I.e., to clear the DNS cache in Leopard, open the terminal application and type the following command: dscacheutil -flushcache

Enabling the SSH Daemon

SSH Router Configuration As the final configuration step, the SSH daemon needs to be configured, which is done in the Administration/Admin Access area. Enable the daemon to start at startup and also enable remote access. The remote port is your choice; I have picked 443, to make access appear to be a regular, none suspicious https connection (see above). Further down on the configuration page a password needs to be set and confirmed. This password is later needed, when we want to establish a connection, when in the coffee shop or elsewhere.

Client Side / Mac OS X

Setting up the router was the hard part. From here on out it's smooth sailing. On a Mac, there is nothing that needs to be installed. All we need to do is start an SSH Tunnel to the router and configure localhost as a socket proxy:

Starting the SSH Tunnel

Open a terminal and enter

ssh -ND 8080 -c blowfish -p 443 root@myrouter.homedns.org

where myrouter.homedns.org is the name that you had registered with DynDNS and 8080 is the local endpoint into the tunnel. Instead of 3des, we use the faster blowfish encription protocol.

Making localhost a Socket Proxy

Clientside Socket Proxy Configuration
Open System Preferences / Network / Advanced and open the Proxies tab. Select SOCKS Proxy and enter localhost:8080 into the SOCKS Proxy Server field.
Firefox Socket Proxy Configuration

Alternatively, if you don't want all traffic go through the tunnel but only traffic generated by Firefox, you don't have to setup the general socket proxy but configure only Firefox instead. Open Firefox Preferences / Advanced / Network Settings and select Manual proxy configuration, enter localhost:8080 into the SOCKS Host field and select SOCKS v5.

Client Side / Windows

SSH Tunnel for Windows Since Windows does not come with SSH pre-installed. You would need to install an SSH client like PUTTY. For our purpose, rs4u's SSH Tunnel seems to be the best client, which is available for free here: http://www.rs4u.com/SSHTunnel/
Again, after configuring and starting the tunnel, open Firefox Preferences / Advanced / Network Settings and select Manual proxy configuration, enter localhost:8080 into the SOCKS Host field and select SOCKS v5.

Done

That is it. All traffic to publicly routable addresses will now be encrypted and redirected through the tunnel, emerging unchanged on the other end, your home router. I know you have nothing to hide; but doesn't it feel good to have a little more privacy? Anyway, get real. There is no privacy on the net! The traffic between your home router and your browsing destination is still unprotected and your ISP and everyone between him the destination still know exactly what you are up to.
Enabling PHP 5.2.5 on Mac OS X 10.5.2 [Client]
Getting the pre-complied PHP Apache Module from Marc Liyanage's site was always the preferred way to get a fresh PHP distribution on your Mac. However, creating 4-way binaries (32- and 64-bit versions for G4/G5 and Intel CoreDuo / Core-2-Duo processors) seems to be broken and if Apache is running in the more efficient 64-bit mode, installing the PHP module not only doesn't work, it will also break Apache. However, there is an easier way to get PHP working with your Apache Server on the Mac.

Apache 2.2.8

Starting Apache is as easy as opening System Preferences - Sharing and checking the box next to Web Sharing. After that's done, open your Web browser and browser to http://127.0.0.1 (or http://localhost, or http://computername.local) to see the global Apache start page or go to http://127.0.0.1/~username (or http://localhost/~username, or http://computername.local/~username) to browse the content of your own site folder (/Users/username/Sites).

PHP 5.2.5

To enable PHP you need to edit Apache's protected configuration file, which can be done using the terminal or an editor application like the free TextWrangler.
  • Using the Terminal, you want to backup the file before editing:
    sudo cp /etc/apache2/httpd.conf /etc/apache2/httpd.conf.bup
  • Let's verify that the PHP extension mappings are available:
    sudo cat /etc/apache2/other/php5.conf
  • Finallly, lets edit the httpd.conf file:
    sudo pico /etc/apache2/httpd.conf
    Scroll down to this line:
    #LoadModule php5_module libexec/apache2/libphp5.so
    and remove to '#' character before saving and exiting the editor with ctrl-O following by ctrl-x
  • To read the configuration again, Apache needs the be restarted. Go back into the System Preferences - Sharing and un-check and then re-check Web Sharing checkbox.

Apache with PHP

To see it all working, create a new text file in your site folder (/Users/username/Sites) and name it phpinfo.php




.. and browse to http://127.0.0.1/~username/phpinfo.php

Enable PHP code in HTML

Enabling PHP code interpretation/pre-processing in HTML files, has a minor performance impact on your server, but allows you to write PHP code inside of regular HTML pages (htm or html extension).
To enable this, we simply have to add this line to the PHP extension mappings, whose availability we had checked earlier.

Back in terminal enter:
sudo pico /etc/apache2/other/php5.conf
Before saving with Ctrl-O, the configuration file should look something like this:




Installing WebSphere Community Edition on Mac OS X revisited
Almost two years back, Olexiy Prokhorenko blogged in his SILENT WORDS blog about how to put WAS CE on Mac OS X (PowerPC). Not all that much has changed since then. However, after downloading the WebSphere Application Server Community Edition 2.0, here are the updated steps I took, to get it installed on Mac OS X 10.5.2:

In the terminal:
cd ~/Downloads
chmod 777 ./wasce_setup-2.0.0.2-unix.bin
./wasce_setup-2.0.0.2-unix.bin -is:extract -is:log wasce_extract.log

This creates 8 files in a temporary sub folder like this: ~/Downloads/istemp846105124847. However, the name of your temporary folder may be very different.

TMPINST=~/Downloads/istemp846105124847
export TMPINST
java -cp .:$TMPINST/setup.jar: -Dtemp.dir="tmp" -Dis.jvm.home="/Library/Java/Home" -Dis.jvm.temp="0" -Dis.media.home="$TMPINST/setup.jar" -Dis.launcher.file="wasce_setup-2.0.0.2-unix.bin" -Dis.external.home="." run 1>>wasce_install.log 2>>wasce_errs.log

This will launch the WebSphere Application Server install appliaction and look something like this:


Now, cd into the install folder and set the correct permissions. Again, you may have put the application into a differnt folder.

cd /Applications/Developer/WebSphere
chmod a+x _uninst/ bin/ graphics/ lib/ repository/ schema/ var/
chmod a+x _uninst/*.sh
chmod a+x bin/*.sh

.. and launch the the WebSphere Application.

./bin/startup.sh

which will result in an output something like this:

Using GERONIMO_BASE: /Applications/Developer/WebSphere
Using GERONIMO_HOME: /Applications/Developer/WebSphere
Using GERONIMO_TMPDIR: var/temp
Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
Using GERONIMO_OUT: /Applications/Developer/WebSphere/var/log/geronimo.out

Geronimo started in background. PID: 479



Finally, navigate your browser to the console, here http://localhost:8080/console or here https://localhost:8443/console. Initially the user name is system and the password is manager.



Here for instance, I am using the console via https to stop the default TomcatWebConnector on port 8080 and replace it with the Tomcat NIO HTTP Connector, allowing comet-style client server interaction (long-lived HTTP connections).
Java 6 on the Mac
It had to happen eventually, Apple finally released Java SE 6 for the Mac - well not for all of Macs, only for Macs running Mac OS X 10.5 [Leopard] - and not for all those Macs either, only for Macs with Intel processors - and not for all those Macs either, only for Macs with a 64-bit Intel processor.

To summarize, you need a (2 years old or) newer Intel-based Mac with one or more Core-2-Duo processors and have OSX 10.5 [Leopard] installed.
What's even worse is that even if you have such a newer Mac with Leopard installed and after running software update and installing Java 6, it's not going to become the default version of Java on your system.
Again, if you are lucky and own a Mac that qualifies for Java 6 and you happen to run software-update and download and install it; do yourself a favor and open Java Preferences, which can be found in the Utilities folder.

Make Java SE 6 your default version and also drag Java SE 6 (64-bit) to the top of the list in the Java Application Runtime Settings.

Before


After


TiffanyScreens 3.0, a major leap forward
TiffanyScreens is a presentation tool that continuously captures the content of the presenter's screen and sends it to multiple other computers at the same time. Best of all, any computer can seamlessly become the presenting computer, no matter if connected wirelessly or through an Ethernet cable.
Obviously, TiffanyScreens works best when all clients reside on the same local network, but like we know just too well, not all team members we wish to include in a screen sharing session can always be in the same room, on the same local network, or use a VPN-client. For all those teams and peer groups, there is good news: TiffanyScreens 3.0 is a major leap forward, making a subset of TiffanyScreens' functionality available over the Internet.

A subset of TiffanyScreens' functionality becomes available over the Internet

To share screen content over the internet, the broadcasting user simply enables "Web-Sharing" by clicking the WebFolder icon. A message dialog pops up, confirming that Web-Sharing is now enabled and also displaying the Event-ID that is needed to access the screen-content via a Web Browser.

Group members that are not on the local network can now access the presentation over the internet, by pointing their Web Browsers to this address: http://my.tiffanyscreens.com
Here, the aforementioned mentioned Event-ID needs to be entered and after clicking the Connect button, the presenter's screen content will appear in the browser.


Many different factors, like connection speed and screen resolution influence the quality of the presentation. Peers using TiffanyScreens on the local area network get the best possible experience, screen content is only scaled on the receiving end and updated about once per second or faster. Peers accessing the presentation with a Web Browser still get a decent user experience, but by no means will it be be as good and smooth as peers on the local network experience it.

Access authorization still hasn't been implemented for users using the a Web Browser to access a presentation, which means that password protected content is currently not made available over the internet.

All TiffanyScreens 1.x and 2.x licenses will continue to work with the TiffanyScreens 3.0.
However, Web-Sharing will only be available to licensed users
.

Keep in mind that this is still an early beta release and your feedback is really appreciated.


Just trying to keep larger numbers in perspective
Sometimes it's hard to keep perspective and since the Democrats seem to be asking for another Economic Stimulus Package, I was wondering how much the 1st one was. I thought, I'd compare it to the cost of the Iraq War - not the whole thing, just to the new, additional spending request, and just for this year.

The President just made a $178 billion war spending request, $135 billion is dedicated to the Iraq War, with $84 billion allocated for the remainder of Fiscal Year 2008 and $52 billion allocated for the first three months of Fiscal Year 2009.

Rebates and Economic Stimulus for the American People Act of 2008:
The bill totals $146 billion, but the business tax incentives, which encourage investment in FY08, would bring the total cost down to $117 billion over ten years.

Photo Exhibition
Snowy Egret a small white heron

Snowy Egret a small white heron

If you have checked my flickr site more recently, you may already know that the Laguna Mountains as well as the Upper San Diego River area are amongst my favorite hiking areas in the San Diego County.
The mentioned areas are connected by the Cuyamaca Rancho State Park, and are the home of the native Kumeyaay communities. The seasonal waters of the San Diego River supported the Kumeyaay communities and newly arriving people who population the area; local rivers supplied all of their water until the early 1940s. Today, San Diego imports 80 to 90% of the needed water from the Colorado River and northern California.
Anyway, some of my photos have been selected to be on view in the Water: A California Story exhibition at the San Diego Natural History Museum.
The Museum has designed and developed this exhibition, which uses natural history specimens, live animals, photos, and interactive exhibits explore the water issues facing southern California and Baja California.

What's really in those containers full of boxes?
Since the iPhone 3G launch is now confirmed for July 11, is it really iPhones, what is those 188 mysterious ocean containers? The following observations could also point to new a 16:9 17.3" MacBook Pro.

16:9 LCD Panels

LCD panel makers, including AU Optronics and LG Display, are developing 17.3" notebook panels with a 16:9 aspect ratio. Vendors, such as Acer, Lenovo, Toshiba, and Asustek Computer, are all expected to roll out 17.3" notebooks. So far only Samsung Electronics does not seem to have plans to develop 17.3" panels. (more details)

Intel Montevina Chipset delay

Like tgDaily did report end of May, Intel's Montevina notebook platform, referred to as Centrino 2, will see a substantial delay and is now scheduled for a July 14 launch with some chipsets. However, like Eric Savitz writes on the Barrons Blog, it is merely a certification issue with the FCC that's responsible for the delay: "...the company had a mis-step in the completion of FCC certification for the next-generation Centrino processor with support for the 802.11n Wi-Fi standard. Without the certification, the CPUs can only be sold outside the U.S.". Also, issues that have cropped up with the integrated graphics in the Montevina platform would not have any effect on Mac Book Pros, which are designed with discrete graphics cards.

16:9 Laptop Bag

Thirdly, there is this years WWDC giveaway, a laptop bag perfectly suited for a 17.3" 16:9 style laptop ...

WWDC 2008 - Final Thoughts
I was in NYC, seeing the long lines going around the block the 5th Ave. Apple store, when the iPhone was launched in June 2007. People couldn't wait, getting their hands on the beautiful mobile phone, the one with the best user interface, and the only one with a useable Web browser. This year I was in San Fran. at Apple's worldwide developers conference, WWDC 2008, when the iPhone 3G was announced.
In 2007 Apple launched a new product-line. In 2008, a new platform was born, already used by several hundreds of companies, with the help of several thousands of software developers, all creating custom applications running on that new platform.
The first computer I ever came in contact with was a Commodore PET. Later on, I still had to deal with terminals, hosts, and even punchcards, but since my 1st experience was on a PET, I never really appreciated the paradigm shift that had happened back then. I can only imaging that the guys that were programming those huge mainframes must have felt like the .net and Java EJB guys feel today, rejecting the new mobile platform as a toy, or a small niche market at best - they will probably never know what hit them.
Everyone at this year's WWDC felt it: a new age has begun - this will be the moment we will be looking back to, the moment the new platform was born, once again changing the information technology landscape forever.
Admittedly, attempts were made before. There was the Palm OS, Pocket PC, then came Qualcomm's Brew, and also Sun's Java MIDlets looked promising for a little while. All this has totally been overshadowed by the iPhone SDK and its capabilities, allowing developers to write iPhone native applications and putting them over the air on the device. The iPhone's hardware capabilities combined with the software SDK and the App-Store is putting the iPhone-platform years ahead of anything we have seen so far, including Google's Android initiative.

Steve Jobs at the WWDC 2008 Unfortunately, there were also those rumors again, concerning Steve Jobs' heath, driving the AAPL stock significantly down. He did look thinner, more skinny, compared to the last couple of appearances and I have to admit that when seeing him on stage during Monday's keynote speech, I was concerned about his well being as well. On the other hand, even if he had to resign the CEO position tomorrow, the mobile revolution led by the iPhone seems very much unstoppable now. Over the last couple of years, all the pieces have carefully been put into play, and with Jonathan Ive, Phil Schiller, Apple's vice president of marketing, Bertrand Serlet, Apple's senior vice president of Software Engineering, and of course Scott Forstall, formally the vice president of platform experience, who was very recently promoted to Senior Vice President of iPhone Software, very capable people have been established to built-on and continue the legacy.
I have once experienced this myself, working for a company whose CEO I highly regarded and who was killed in a tragic airplane accident. His legacy and values however lived on even stronger in the people he had influenced and put into the right positions and who were leading the company for several years to come. For as long as those guys who have worked with Jobs for the last couple of years stay at Apple, I wouldn't worry - only after that core team vanishes, will the company lose its focus, importance, and value. Go AAPL
Turning the Web on its head - let's have the server call the client
Code Camp is not just for geeks, hackers, and code monkeys; and while you may find some of them at UC San Diego on June 28 and 29, Code Camp is first and foremost a place for software developers to come together, share ideas and experiences, and learn from their peers.
This will be my 2nd San Diego Code Camp, which compared to the Code Camp up North at Cal State Fullerton, is much more focused on Microsoft and .net related technologies. However, I'm still hopeful that this topic will fill a room: Turning the Web on its head - let's have the server call the client.

We will take the accepted view that a Web-Client calls (via HTTP GET or POST) a server and turn it on its head. Let's have the server call the client. It is really not that far fetched, to imaging a scenario where the server, when it has determined that something exciting just happened (e.g., the Dow Jones Industrial Avg. Index jumped 100 points) calls the Web Client, instead of clients constantly polling the server (even when the DOW barely moves).

Sounds interesting and a couple of implementation ideas may come to mind. After looking briefly into some xml and binary web service protocols, we will take a closer look at the notification mechanism, provided by Java's management extensions and eventually take a really close look at a full featured implementation of the above mentioned problem.
Interestingly, even when looking at both, the client and the server part of this solution, there isn't really all that much code to write, which means that even in the little time we have, all the concept and patterns used, can be looked at and discussed. Honestly, all the code, (client and server) that makes this 'Stock Quote Client' an event-consumer, instead of a stupid poller, will be shown.
Desert Thistle
Desert Thistle Amazing what kind of blossoms you can still find in the Mount Laguna area in July, above 5000 FT Elevation, at about 100F.
This was shot just south of the Cuyapaipe Reservation, which was established on February 10, 1891, following the executive order of January 12, 1891. The Cuyapaipe Reservation is located 10 miles north of Interstate 8, and 68 miles east of San Diego in Pine Valley and the Laguna Mountains in the southeastern part of San Diego county.

The Ewiiaapaayp Band's resources are limited to water. The largest obstacles to economic development at the Cuyapaipe Indian Reservation are the geographic remoteness of the reservation, the lack of adequate access roads with a single access road that is unpaved, narrow, and steeply graded, and the complete lack of utilities (no electricity, gas, telephone, or waste water systems).
iPhone 2.0 (5A347)
While the iPhone OS version 2.0.1 is rumored already, I installed the latest build of the 2.0 version this morning. Like AppleInsider has reported in some detail, the build number of the OS that is originally deployed on the device suggests that it is two builds behind of what is available using the restore process through iTunes.

After clicking the restore button on the iPhone / Summary Tab in iTunes, the 225 MB file is downloaded, followed by displaying of this dialog:

This is then followed by several progress indicators for
  • Preparing iPhone software for restore...
  • Restoring iPhone software...
  • Verifying iPhone software...
Eventually the iPhone software has be deployed but at this point all personal data as well as all recently installed application are still missing. Like the dialog states, the iPhone has been restored to "factory settings" but a newer version of those.

However, a quick (or if you already had lots of stuff stored on your iPhone - a not so quick) re-sync will put everything back in place.

On the iPhone, the settings application will show the OS's build number under General and About.

Roadtrip 2008
Twittere During last year's trip to the East Coast, visiting NYC, Philadelphia, and DC, we were at Apple's flagship store in New York City, on June 29, 2007, the day Apple launched the iPhone.
This years trip will be different, we will stay mostly inside California, getting acquainted with the Sierra's eastern slope, driving Highway 395, a onetime American Indian trading route that travels for hundreds of miles near the California-Nevada border.

If you like, follow me via twitter feed: http://twitter.com/wolfpaulus or on flickr.
Apple Store, Carlsbad - Grand Opening
Apple Store Carlsbad Like I had predicted back in January, Apple is coming to Carlsbad, to one of the most prestigious retail locations in the City, The Forum at Carlsbad.

The 1st Apple retail store in San Diego's North County opens tomorrow, Saturday, August 16 at 10:00 a.m. Be one of the first 1000 visitors and you'll get a free Apple T-shirt.

As with every Apple store opening, the apple user/fan community will meet in front of the store, before it opens. So we'll see on Saturday morning, bright and early.

Update

Photos taken during the Grand Opening of Apple's newest retail store in Carlsbad, CA can be found here.
Installing Tomcat 6.0.18 on OS X
  1. Make Java 1.5 (or later) the default JRE
  2. Get the core distribution from http://tomcat.apache.org/ At the time of this writing that would be: apache-tomcat-6.0.18.tar.gz
  3. Unpacking will create a apache-tomcat-6.0.18 folder, probably on your desktop. Move this folder into /usr/local, like this:

    sudo mv ~/Desktop/apache-tomcat-6.0.18 /usr/local/
  4. To make it easy to replace this release with future releases, we are going to create a symbolic link that we are going to use when referring to Tomcat:

    sudo ln -s /usr/local/apache-tomcat-6.0.18 /Library/Tomcat
  5. Next step is making Tomcat's launch and stop scripts executable:
    chmod ug+x /Library/Tomcat/bin/*.sh
Tomcat
  1. Create startup and shutdown scripts:
    Startup:
    Open TextEdit and create a startTomcat.command file in your home folder ...



    Shutdown:
    Open TextEdit and create a stopTomcat.command file in your home folder ...



  2. Open a Terminal and make both scripts executable:
    • chmod ug+x ~/startTomcat.command
    • chmod ug+x ~/stopTomcat.command
  3. Change ownership of the /Libaray/Tomcat folder hierarchy:

    sudo chown -R your_username /Library/Tomcat
  4. Start Tomcat by simply clicking the startTomcat.command icon in your home folder.
    Test with http://localhost:8080

Instead of using the start and stop scripts, you may also want to check out activata's Tomcat Controller a tiny freeware app, providing a UI to quickly start/stop Tomcat.

iPod Touch 2nd Generation 1st Impression

Unboxing

The iPod touch comes in the now typical iPod packaging (transparent plastic case). Unboxing photos are available on Tom's flickr page.

Appearance

Compared to iPhone 3G, the iPod touch is as wide, almost as high, but only about half as thick. The screens appear to have exactly the same width and hight. Interestingly, the iPod touch's home-button is about 2 mm shorter in diameter. The back of the iPod touch is stainless steel and reminds of the back of the 1st gen. iPod nano.


How to share applications with close friends

I don't want to encourage illegal file sharing, but let's say you have an application, no longer available in the app store (PhoneSaber comes to mind), and wanted to give it to a friend. Here is how this could be accomplished:

The 1st step is to locate the application file in this folder:

Home Folder/Music/iTunes/Mobile Applications/

All mobile applications have the ipa extension. If you see multiple versions that just means that you have updated the application once or more times - you want to pick the newest.

The 2nd step is to simply transfer the file over to your friends computer, e.g. sending it via email. Double-clicking the file at the receiver's end, will automatically import the file into the local iTunes repository but syncing will not yet work for this application.

3rd step: Instead you, the owner of the application, will have to authorize the computer (iTunes menu: Store/Autorize Computer...) then let your friend perform the sync. At the end, you don't want to forget to Deautorize your friend's computer again (iTunes menu: Store/Deautorize Computer...)

Farewell PC, you have been virtualized
This weekend an era came to an end, at least in my house. The last PC, dedicated to run a Microsoft OS got dismantled and put to rest for good.

The year was 1982 or 1983, when I brought my first computer home, a Triumph-Adler Intel 8085A based Alphatronic with two disk-drives and 48KB RAM. The Alphatronic was not CP/M compatible but used the MOS operating system instead and came with BASIC, Fortran and Pascal compilers. Just like the original IBM PC, I replaced it with about 2 years later, the computer was rented from a local computer store. Still in high-school, I was contracted to write a laboratory billing system for a clinical laboratory and could not afford to buy the machines. It must have been 1984 or 1985 when I finally had the money to buy my first computer, a PC-Clone from Zenith Data Systems, with no harddrive but a 8MHz fast NEC V20 processor. Ever since that time, I had at least one PC in my home that was dedicated to run a Microsoft operating system. There was the 80386 based Gateway PC, several more beige boxes followed, and the last one of its kind was a small tower style PC with an ATX motherboard and a 2GHz Pentium-4 processor, with most components purchased from the local PC-Club store, which also closed its doors just a few months back. Since 2002 I have gradually replaced PCs with Macs and at home the computer landscape now only features Mac minis, Macbooks, and an Apple TV.
The occasional need to run a Windows application can easily be satisfied by quickly warming-up a VM in VM-Ware Fusion, which I have conveniently stored on an external harddrive, and can therefore be used on any Mac.

A sad farewell? Not really!
Turning the Web on its head - let's have the server call the client
Code Camp is not just for geeks, hackers, and code monkeys; and while you may find some of them at the University of Southern California on October 25 and 26, Code Camp is first and foremost a place for software developers to come together, share ideas and experiences, and learn from their peers.
This will be my 1st LA Code Camp, which compared to the Code Camp up North at Cal State Fullerton, is much more focused on Microsoft and .net related technologies. However, I'm still hopeful that this topic will fill a room: Turning the Web on its head - let's have the server call the client.

We will take the accepted view that a Web-Client calls (via HTTP GET or POST) a server and turn it on its head. Let's have the server call the client. It is really not that far fetched, to imaging a scenario where the server, when it has determined that something exciting just happened (e.g., the Dow Jones Industrial Avg. Index jumped 100 points) calls the Web Client, instead of clients constantly polling the server (even when the DOW barely moves).

Sounds interesting and a couple of implementation ideas may come to mind. After looking briefly into some xml and binary web service protocols, we will take a closer look at the notification mechanism, provided by Java's management extensions and eventually take a really close look at a full featured implementation of the above mentioned problem.
Interestingly, even when looking at both, the client and the server part of this solution, there isn't really all that much code to write, which means that even in the little time we have, all the concept and patterns used, can be looked at and discussed. Honestly, all the code, (client and server) that makes this 'Stock Quote Client' an event-consumer, instead of a stupid poller, will be shown.
VOTE for HOPE

A New Direction
While I started my professional career in the medical devices industry, writing software for Siemens' CEREC system, it is only a few years back that I started looking into embedded devices again. Out of an intense enthusiasm to run Java code on embedded devices, I started playing with systems based on Dallas Semiconductor's TINI platform and also took several related classes at UCSD, where Ken Arnold was teaching at the time.

I received a Certificate in Embedded Computer Software from UCSD and besides working with the TINI, started experimenting with even more basic devices, like the 8031-SDK. Ever since the open-source concept found it's way into the hardware design community, I have been a great fan and supporter of the Arduino platform, an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. I have often written about these things, blogged, and also given a couple related talks (Arduino Fever - Physical Computing and Innovate - Tweak, Hack, and Bend Technology). Still, for the last couple years, this hasn't been much more than a side-show for me.

To make a long story short, I am announcing today that IntelliDOT has hired me to work full time on their CAREt System, the first wireless, nurse-centric workflow manager to connect caregivers with the information systems they need at the point-of-care.
As an Embedded System Architect, my initial work will be on the lightweight, wireless handheld device that enables nurses to perform safety checks and safely administer medications at the bedside. I'm sure that I will be able to share more information over the coming weeks.

I have immense respect for the team at IntelliDOT; I couldn't be more thrilled that they've invited me to join them and for the opportunity at hand.

La Fonera Hacking
"FON is the largest WiFi community in the world. Community members, known as 'Foneros', share some of their home Internet connection and in return gain access to free Wifi worldwide."

The device that is used to provide the connectivity is the La Fonera (a.k.a. FON), a single Ethernet Port Wireless router with a standard range between 10-50 meters depending on the environment.

The FON is a relatively simple and inexpensive router, built on the AR531x/231x Atheros WiSoC (Wireless System-on-a-Chip), a platform for which the OpenWRT project recently added a Hardware Abstraction Layer (HAL), i.e. the OpenWRT firmware can be deployed on the FON. In short, the FON has all the attributes required to be added to digital playground. Fonera

Where to buy a La Fonera

The Fonera web site and store is available in several languages and the store accepts all kinds of currencies and ships worldwide. Check them out at https://www.fon.com/ or buy it from Amazon.com.

La Fonera (2100) Hardware

  • CPU: Atheros AR531X_COBRA - MIPS 4KEc V6.4 - 183.50 MHz
  • RAM: Hynix hy57v281620etp-h - 16 MB
  • Flash: ST(84) H - 25P64V6P - MYS 636 - 8 MB
  • Ethernet: (1x) Altima AC101 (10/100 Mbit/s) [Auto-MDI(X)]
  • Wireless: IEEE 802.11b / 802.11g (up to 54 Mbps)
  • Serial Port exposed on PCB J2
  • Antenna Connector: RP-SMA Connector (Reverse SMA)
  • Antenna Omni-Directional detachable antenna (2dBi)
  • Powersupply Input: 100-240V ~ 50-60 Hz 0.3A. Output: 5V DC, 2.0A Output
  • Power Consumption: 4 Watt

The 2200 model has a somewhat resigned PCB, seems to consume less power and has the serial port exposed on J1.
The La Fonera+ has two ethernet ports on the back, the La Fonera 2.0 adds two Ethernet Port and a USB 2.0 port. More details on the 2.0 model will be added here, as soon as it arrives.

Putting the OpenWRT firmware on the La Fonera

The Fonera is certainly not he cheapest nor the most capable WIFI router. However, it is one of the most affordable WIFI routers that can run OpenWrt, a Linux distribution for embedded devices. OpenWrt opens the Fonera to a whole universe of packages, including SFTP servers, Java Runtime Environments, or bit torrent clients, to name just a few.
Installing OpenWrt is not for the faint-of-heart, but has already been documented many times and I will just point to what I found the most helpful or detailed recipes. Fonera

Pre-Requisites (OS X Releated)

  • TFTP Server for OS X. TFTP is a simple protocol used to transfer files, and therefore was named the Trivial File Transfer Protocol or TFTP.
  • Ethernet Cable, to connect the FON to your Mac.

Flashing the La Fonera with OpenWRT

The different FON versions and localization may require slightly different approaches. However, the goal is the same, getting SSH on the FON. Here is the outline:

  • To get to RedBoot (the bootloader) over telnet, the RedBoot Config needs to be re-configured.
  • Since the FON firmware does not enable telnet or ssh out of the box, a cross-site scripting hack to start ssh needs to be performed.
  • The FON kernel does not allow you to overwrite RedBoot Config. Therefore, an older 'signed' version of the FON's kernel that includes a flashing utility that does allow overwriting the RedBoot Config partition needs to be deployed.
  • Reboot into the modified kernel and overwrite the RedBoot Config partition again.

Detailed flashing instructions

What's next..

Coming up: More about RedBoot and more importantly Building a customized OpenWRT distribution yourself.

La Fonera (FON2100) Hardware Details
Just a couple days ago, Jordi Vallejo, CTO of FON, introduced the new La Fonera 2.0 (beta/developers edition) - watch it here on YouTube, which now comes with a 2nd ethernet port and a USB port. While we all wait for the Fonera 2.0 to arrive at our doorsteps, lets take another closer and more detailed look at the La Fonera 1.0 (2100) hardware.
Fonera
  • Power (socket for SK1)
    A drop-down regulator (AME1117), drops the input voltage from around 5V to 3.3V and (APL1117) 2.5V.
  • Flash Memory
    ST M25P64 serial flash, with a 50MHz SPI bus and 64Mbit capacity (8MByte), in 300mil SO16 format. SPI, slower than a parallel bus, potentially allows for adding additional memory devices to the bus.
    The flash memory is typically used with two different filesystems. I.e.: Squashfs, a compressed read-only filesystem for Linux and JFFS2, a log-structured file system designed for use on flash devices in embedded systems.
  • SDRAM
    Hynix HY57V281620E synchronous DRAM, 128Mbit organized in 16bit blocks, resulting in 16MByte.
  • Ethernet (RJ45 socket)
    Altima AC101 10/100 Mbit/s full duplex ethernet transceiver (placed on the flip-side of the PCB and running of a 25MHz crystal.
  • Wireless IEEE 802.11b / 802.11g (up to 54 Mbps)
    Atheros AR2315 single-chip WiFi processor running at 40 MHz.
    Integrated 32-bit MIPS R4000-class processor running at 183.5 MHz
  • Interfacing
    Serial (RS-232)
    Connecting the Fonera's serial port to a PC requires an TTL to RS-232 level shifter converting +3.3V and 0V to +12V and -12V.
    There is also a JTAG port on the PCB but ports pins are omitted. Fonera - JTAG connector

More Fonera photos can be found here: http://www.flickr.com/photos/wolfpaulus/tags/fonera/

PhoneME, a JavaVM for the Fonera FON Router
OpenWRT is a Linux distribution optimized especially for embedded devices and also builds the starting point for many popular RouterOS distributions, like DD-WRT, FreeWRT, or X-Wrt. Wikipedia has details on all those project, a good starting point would be here.
Since OpenWrt is optimized for embedded systems, it doesn't come as a surprise that features like a read-only Flash memory filesystem (SquashFS) and a read/write Flash memory filesystem (JFFS2), or BusyBox, which combines many common UNIX utilities into a single executable, are readily available to be configured into a custom image. OpenWrt also comes with a lightweight package management system (IPKG or more recently OPKG), meaning that features that have not already been built into the kernel, can be added later, at runtime.
A Java-Runtime Environment would be one of those features that are not built-in but would be nice to have for some of us. So let's take a look at how a JavaVM could be build, packaged, and deployed into an embedded system that has the OpenWrt firmware.
Just like JavaSE gets build and packaged for a particular host OS, a JavaVM for an embedded system needs to be build with a particular hardware platform in mind. A JavaVM calls directly into the Linux kernel, which means, not only do we need all the kernel related resources when building the JavaVM, we also need to choose a hardware platform.
The OpenWrt sources are easily available at https://svn.openwrt.org/openwrt/trunk/ and for the hardware platform, I have picked the Fonera FON, a relatively simple and inexpensive router, built on the AR531x/231x Atheros WiSoC (Wireless System-on-a-Chip), with an integrated 32-bit MIPS R4000-class processor running at 183.5 MHz. It features 8 MBytes of Flash ROM and 16 MBytes of RAM. Check here fore more details.
With the hardware platform selected and the OpenWrt source downloaded, we can start building. To add a little excitement, I decide to try the build process on a Mac, using OS X 10.5.

Fink or MacPorts

The OpenWrt build process requires that several GNU tools are installed on machine that will eventually perform the build process and while some of these tools seem to be available on OS X, they aren't parameter compatible with the GNU version, i.e. either Fink or MacPorts is needed to get the GNU tools working.

To find out what tools are needed, open a Terminal, cd into the OpenWrt trunk folder and run make help.
After installing binutils, patch, bzip2, flex, bison, gettext, ... with the help of Fink Commander, we're ready to configure the build process by running make menuconfig

The result may come as a surprise, but the kernel configuration is done with the help of a character based UI.
The most important thing to get right here is to pick the correct Target System. For the Fonera FON, this would be Atheros 231x/5312 [2.6]. Moreover, to be able to build a JavaVM later, building the OpenWrt SDK needs to be enable here.
After a subsequent default build (entering make without any arguments) has been successfully completed, the sdk can be found here:
Kamikaze/trunk/build_dir/mips/OpenWrt-SDK-atheros-for-Darwin-i386

(If the build process fails, running make V=99 is revealing what went wrong. In my case it was a missing library. After installing it - again with the help of Fink Commander - the error message went away.)

Kernel configuration with the help of a character based UI

Java

A good starting point for Java in embedded world can be found here and one actually does have a choice, when is comes to Java Virtual Machines for OpenWrt Embedded Linux.
  • JamVM
    JamVM is a new Java Virtual Machine which conforms to the JVM specification version 2 (blue book). In comparison to most other VM's, it is extremely small, but requires the building of the GNU Classpath. Clearly the full version of Classpath isn't going to fit onto a small router, contains some native code and need to be cross-compiled.
  • SableVM and SableVM Mini
    SableVM is a Java Bytecode Interpreter implementing Java virtual machine (JVM) specification, second edition. Its goals are to be reasonably small, fast, and efficient, as well as providing a well-designed and robust platform.
  • PhoneME
    The PhoneME project was created after opensourcing Sun implementation of Java ME. It comes in two versions: PhoneME feature software (CLDC), for mobile phones and PhoneME advanced software (CDC), for higherend devices. Reference implementations are available for x86, ARM and MIPS.
JamVM and SableVM both require the building of the GNU Classpath. Clearly the full version of Classpath isn't going to fit onto a small router, contains some native code, and need to be cross-compiled. Taking the many posts in the OpenWrt related forums seriously, porting GNU Classpath to MIPS seemed to be a very daunting project and even if I'd be successfull, the full version of this project may be to be too to be deployed on the Fonera and still leave some room for an Java application. Considering Bug Labs performance benchmarks for Java on embedded Linux, the PhoneME JavaVM needs to be the 1st choice for a resonably small and fast JavaVM for the embedded target platform, like the Fonera FON. BugLabs.com, JavaVM Benchmark

PhoneME

Next step is to checkout the phoneme sources form: https://phoneme.dev.java.net/svn/phoneme/components (you may have to create an user account at the java.net site before being able to access the source repository). We need cdc's trunk and tools' trunk on the same level and then edit the cdc/trunk/build/linux-mips-openwrt/GNUmakefile, setting the CVM_TARGET_TOOLS_PREFIX to point to the toolchain location in the OpenWrt-SDK, like so:

CVM_TARGET_TOOLS_PREFIX ?= /Users/wolf/Work/Embedded/Kamikaze/trunk/build_dir/mips/OpenWrt-SDK-atheros-for-Darwin-i386/staging_dir/toolchain-mips_gcc4.1.2/bin/mips-linux-uclibc-

Running make in the linux-mips-openwrt folder will produce theses files:
  • linux-mips-openwrt/btclasses.zip
  • linux-mips-openwrt/testclasses.zip
  • linux-mips-openwrt/democlasses.jar
  • linux-mips-openwrt/bin/cvm
  • linux-mips-openwrt/lib/cdc.jar (or linux-mips-openwrt/lib/foundation.jar)

The J2ME_CLASSLIB argument provided to Make, defines what class library will eventually be created:
  • cdc - (default) will create a limited class library (cdc.jar 884 KBytes) that is meant for testing purposes only.
  • foundation - creates the full Foundation Profile class library (foundation.jar 1.475 KBytes).
Just like you would expect,compared to the Foundation Profile, the cdc.jar is missing some of the networking and security related classes.

Creating the ipkg Package

These files now have to be distributed into a manually created folder that needs to look exactly like this: Start by creating a cdc folder in the OpenWrt-SDK package location like here:

/Users/wolf/Work/Embedded/Kamikaze/trunk/build_dir/mips/OpenWrt-SDK-atheros-for-Darwin-i386/package/cdc

Insert this makefile into the cdc folder and also create a files folder.



Eventually, the content layout needs to look like this:
Content Layout
Running make in the SDK folder here:
/Users/wolf/Work/Embedded/Kamikaze/trunk/build_dir/mips/OpenWrt-SDK-atheros-for-Darwin-i386
creates the deployable package, containing the JavaVM and a set of test classes, here:
/Users/wolf/Work/Embedded/Kamikaze/trunk/build_dir/mips/OpenWrt-SDK-atheros-for-Darwin-i386/bin/packages/mips/pmea-wp_1_1-2_mips.ipk

Like declared in the makefile that was responsible for creating the ipk package, the only non-standard OpenWrt package required by PhoneME Advanced is libpthread. Running OpenWrt's make menuconfig again, now shows Java in the Languages menu and if Java gets selected, libpthread (to be found in Base System) is automatically added.
make menuconfig

Deployment and Test

With the package built, all what's left to do is deploying it and running the test suite. Deploying the ipkg file is as easy is putting it into the target's tmp folder (running sftp on the FON and Fugu on the development host, makes this easy and fast).
After ssh- into the FON, running ipkg install /tmp/pmea-wp_1_1-2_mips.ipk or opkg install /tmp/pmea-wp_1_1-2_mips.ipk will install the JavaVM as well as the test classes.
Now executing the test is as simple as /usr/java/bin/cvm -cp /usr/java/testclasses.zip Test

PhoneME Java VM on the LaFonera FON Router
La Fonera 2.0 (FON2202) Hardware Details
On October 18, Jordi Vallejo, CTO of FON, introduced the new La Fonera 2.0 (beta/developers edition) - watch it here on YouTube, and I finally received my FON 2202 yesterday. Fonera 2.0 come with a bigger footprint but also more capabilities, compared to the previous version (FON 2100). Compared to the La Fonera+ (FON 2200), the La Fonera 2.0 now comes an USB-port, which can be used to easily add a printer, scanner, external harddrive, USB-Flash-Drive,or a WebCam to the Network. E.g., I found it impressively easy to plug in USB FLash-Drive (4 GB Kingston DataTraveler) and make it accessible on the local area network (SMB) and also over the Internet (FTP).
However, let start with taking a more detailed look at the La Fonera 2.0 hardware.
Fonera 2.0
  • Flash Memory
    MX 25L6405MC-20G serial flash, with a 50MHz SPI bus and 64Mbit capacity (8MByte), in 300mil SO16 format. SPI, slower than a parallel bus, potentially allows for adding additional memory devices to the bus.
    The flash memory is typically used with two different filesystems. I.e.: Squashfs, a compressed read-only filesystem for Linux and JFFS2, a log-structured file system designed for use on flash devices in embedded systems.
  • SDRAM
    Hynix hy57V561620F synchronous DRAM, 256Mbit organized in 16bit blocks, resulting in 32MByte.
  • Ethernet (RJ45 socket)
    Ethernet controller (Marvell 88E6060) with two PHY (LFE8505).
  • USB 2.0 Host Controller
    The NEC PD720102 open host controller interface works up to 480 Mbps.
  • Wireless IEEE 802.11b / 802.11g (up to 54 Mbps)
    Atheros AR2315 single-chip WiFi processor running at 40 MHz.
    Integrated 32-bit MIPS R4000-class processor running at 183.5 MHz
  • Interfacing
    Serial (RS-232)
    Connecting the Fonera's serial port to a PC requires an TTL to RS-232 level shifter converting +3.3V and 0V to +12V and -12V.
    There is also a JTAG port on the PCB but ports pins are omitted. Fonera - JTAG connector

More Fonera photos can be found here: http://www.flickr.com/photos/wolfpaulus/tags/fonera/

La Fonera 2.0 (FON 2202) Hacking, Cleaning House
Fonera The La Fonera 2.0 (FON 2202) comes with ssh enabled, which isn't a big surprise since it's still in beta and developers are encouraged to develop plugins for the Fonera platform. Even with ssh enabled though, the best way to hack the Fonera, i.e., to replace the currently deployed (very customized) linux distribution with something like DD-WRT or OpenWrt, still is directly accessing the bootloader.

Almost exactly like in previous Fonera versions, the bootloader (RedBoot) waits for a few seconds to be interrupted, before moving on and booting the deployed kernel. The Fonera 2.0 will wait at IP address 192.168.1.1 on port 9000, for no more than 2 seconds, to receive an iterrupting Control C. Meaning, if a host computer with an assigned IP of something like 192.168.1.254 is connected to the Fonara, issues this command:

echo -e "\0377\0364\0377\0375\0006" >break.bin; sudo nc -vvv 192.168.1.1 9000 < break.bin; telnet 192.168.1.1 9000

and the Fonera gets rebooted, RedBoot will pause the booting process and show RedBoot> prompt.

If that for whatever reason doesn't work, there is still a way to access and interrupt the bootloader through the internal serial connector, like shown here: Issuing the following command in OS X's Terminal app,
screen /dev/tty.KeySerial1 9600
rebooting the Fonera, and subsequently pressing Control C will also interrupt the boot process and grant access to the bootloader prompt.
The output in the terminal looks something like this:


+Ethernet eth0: MAC address xx:xx:xx:xx:xx:xx
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.254

RedBoot(tm) bootstrap and debug environment [ROMRAM]
OpenWrt certified release, version 1.1 - built 12:40:38, Sep 3 2007

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

Board: FON 2202
RAM: 0x80000000-0x82000000, [0x80040290-0x80fe1000] available
FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
^C
RedBoot>

However, not interrupting the boot process also has its benefits, like being able to capture a complete boot-log like this:



RedBoot Flash Image System

Command Description
fis create [-b <base>][-l <image length>]
[-s <data length>][-f <flash address>]
[-e <entry>][-r <ram address>][-n] <name>
Creates an image in FLASH from data in RAM
fis delete <name> Removes an image from FLASH
fis erase -f <flash address> -l <length> Erases an area of FLASH
fis free Shows which areas of FLASH are not in use
fis help Displays help for FIS commands
fis init [-f] Initializes FLASH
fis list [-c] List images in FLASH and information about them
The -c option displays image checksum instead of memory address
fis load [-b <base>][-c] <name> Loads an image from FLASH to RAM
The -c option displays the image checksum

Cleaning ...

With full access to RedBoot and its Flash Image System, deleting all but the boot blocks is as simple as issuing the fis init command.
Here is the protocol:


Just like expected (hoped) the RedBoot bootloader was not removed and the FIS directory and RedBoot config stayed in place as well. However, all Fonera code is now gone and there is no need to hurry now after a reboot.

telnet 192.168.1.1 9000 connects back to RedBoot, which now reports:
87E:0000 - 803:0000 = 7B:0000 = 7,872 KBytes Flash Memory available:


OpenWrt: Post Kernel System Initialization on the Fonera FON
Flashing the Fonera Router with a default distribution of OpenWrt requires two files, the kernel image (openwrt-atheros-vmlinux.lzma 704 KB) and the root file system (openwrt-atheros-root.squashfs 1.2 MB). Like previously mentioned, using a TFTP Server on a host machine and standard RedBoot commands on the Fonera might be the easiest way to write the root file system and the kernel into nonvolatile storage (flash memory).
After successfully booting the Fonera and accessing the console via telnet or ssh, displaying the system message buffer by entering the dmesg command, allows the reconstruction of the boot process.

Boot Log



When the kernel boots, it detects the presence of the root file system image (openwrt-atheros-root.squashfs) and mounts it as the root file system. The boot log also reveals that initrd, the initial Ram Disk that a Linux distribution typically mounts during the boot process, is missing. Instead, the kernel command line parameter specifies /etc/preinit as the the first process to gain control at the completion of the kernel's boot process. It also specifies a single console on device ttyS0 at 9600 baud, and the root file system's type as squashfs.

Boot Log (abridged)

Linux version 2.6.26.8 (wolf@wpbook.local) (gcc version 4.1.2) #5 Sun Dec 21 14:47:58 PST 2008
..
Initrd not found or empty - disabling initrd
..
Kernel command line: console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit

preinit



/etc/preinit contains instructions like:
mount proc /proc -t proc
mount sysfs /sys -t sysfs
mount tmpfs /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777
mount devpts /dev/pts -t devpts

and therefore, is responsible for mounting /proc (special-purpose filesystem), /sys, /dev (devices nodes, e.g. console), and /tmp (temporary files)

/etc/preinit also triggers the execution of /etc/preinit.arch, if present. On the FON 2100 this means that support for the reset button on AR5315+ boards is being established.
As the last statement, /etc/preinit call exec /sbin/init, which in fact is a soft link to /bin/busybox
BusyBox now performs an initialization differently from a standard System V init and launches its default initialization script (/etc/init.d/rcS), i.e. BusyBox's version of init still reads the system configuration file /etc/inittab but there is no notion of runlevels.

inittab

::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K stop
tts/0::askfirst:/bin/ash --login
ttyS0::askfirst:/bin/ash --login
tty1::askfirst:/bin/ash --login

/etc/init.d/rcS is a short script that is executing all the startup (beginning with S) or shutdown scripts (beginning with K) that are stored in the /etc/rc.ddirectory. All the scripts names end in a two-digit number and will be launched in order.


#!/bin/sh
# Copyright (C) 2006 OpenWrt.org

{
  for i in /etc/rc.d/$1*; do
    [ -x $i ] && $i $2 2>&1
  done
} | logger -s -p 6 -t '' &

All the scripts in the /etc/rc.d directory are actually symbolic links. Here are all the deployed startup scripts in a default OpenWrt distribution built for the Atheros AR231x / (MIPS 4KEc):

Launch Scripts stored in /etc/rc.d/

/etc/rc.d/S10boot -> ../init.d/boot
/etc/rc.d/S20fstab -> ../init.d/fstab
/etc/rc.d/S39usb -> ../init.d/usb
/etc/rc.d/S40network -> ../init.d/network
/etc/rc.d/S45firewall -> ../init.d/firewall
/etc/rc.d/S50cron -> ../init.d/cron
/etc/rc.d/S50dropbear -> ../init.d/dropbear
/etc/rc.d/S50httpd -> ../init.d/httpd
/etc/rc.d/S50telnet -> ../init.d/telnet
/etc/rc.d/S60dnsmasq -> ../init.d/dnsmasq
/etc/rc.d/S60led -> ../init.d/led
/etc/rc.d/S95done -> ../init.d/done
/etc/rc.d/S97watchdog -> ../init.d/watchdog
/etc/rc.d/S99sysctl -> ../init.d/sysctl

Summary

A default OpenWrt deployed on a La Fonera FON router does not use initrd, an initial Ram Disk that a Linux distribution typically mounts during the boot process, nor a standard System V init. Instead, a kernel command line console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit is used to define /etc/preinit as the the first process to gain control at the completion of the kernel's boot process. BusyBox is launched and /etc/init.d/rcS via /etc/inittab executes all the launch scripts stored in /etc/rc.d/. /etc/inittab also launches the login shell.