New England Plan 9 User Group etc

Java Sun SPOTs (Small Programable Object Technology)

These were Sun microcontrollers that run Squawk Java ME directly on metal with gc and all the bells and whistles, created by Sun Microsystems in 2005.

The feature mesh networking and tcp/ip and multitasking. Even the drivers are java just like Java OS.

They run a command and control server by default and there’s graphical network builders and deployment managers (Solarium) they also do some more esoteric stuff like process migration.

Solarium can also run simulated SPOTs, which can connect to the real spots over the base station.

Hardware

There's two major revisions

Oracle Revision 400MHz, 1MB of RAM, 8M of flash.

Sun Revision 180Mhz, 512K of ram, 4M of flash.

Both of them run code off flash so the limitations are not entirely straightforward.

Programming Environment

After Oracle bought Sun, they discontinued the Sun SPOTs in 2012 and took the site down. Sun Spot Dev runs a mirror and an archived 3.0 SDK, as well as hosting an archive of the SPOTManager java web start. However at some point in the last few years, Oracle did finally stop hosting the web start and this file no longer works (unless previously cached).

Thankfully I purchased the revision 6 version of the SPOTs, released by Oracle in 2011 (a year before canceling them), which contained an SDK disc both with the 6.0 Yellow Release and a standalone SPOTManager.jar.

I've uploaded this SDK to the Internet Archive Java Sun SPOT v6.0 SDK

To interface with them, after initially trying an old version of OpenSolaris, I went with Tribblix, a "retro" illumos distro that was reccomend to me by Lewellyn on the 9fans discord.

I was having some issues and in the process of troubleshooting I ended up using Oracle SDK 1.6.0_45 which you can download with an Oracle account from their archives. This did require me to install the java-developer overlay on Tribblix.

If you're reading this in the future and that's not possible, please reach out. I also installed and set up Apache Ant version 1.8.1 but the version on the disc may be sufficient.

You'll want to install those and get your path, JAVA_HOME and ANT_HOME set up and run the spot manager to let it set up the environment. Make sure you don't have netbeans installed at this point or the installer just doesn't work.

RXTX Version mismatch
The 6.0 SDK shipped on my disc ships with a mismatched RXTX
You should see some output like
 	[java] WARNING:  RXTX Version mismatch
	[java] 	Jar version = RXTX-2.1-7
	[java] 	native lib Version = RXTX-2.2pre2
When you use ant.
You need this mismatched rxtx, it has patches despite being linked incorrectly. Make sure you're loading the rxtx from the sdk it shouldn't be a problem on Tribblix.

After installation you'll need to get the SDKs upgraded- I was having several days of issues apparently because I had corrupted my unit in the process of finding a working setup- the "factory reset" in the SPOTManager finally did the trick and everything started to function as expected. These things are generally fickle though, but usually a simple

ant upgrade

will work to get them responding correctly again. Though apparently the command the manager was using, which may be more necessary in some situations, is

ant restore

SPOTManager and especially netbeans do not actually seem to be necessary in most cases, run

ant

To get a list of commands, for most build scenarios you can simply do

ant deploy run

Which compiles, deploys, runs, and sets startup for the target project.