Sun Microsystems V2.0 Welding System User Manual


 
18
remote.pan.id
either on the command line or in the
.sunspot.properties
file in your user root
folder.
Using short names for SPOTs
As a shortcut, it is possible to use short names for SPOTs instead of the full 16-digit IEEE address.
To do this create a file called “spot.names” in your user home directory. The file should contain
entries of the form:
<short-name>=<IEEE_ADDRESS>
for example
my-spot-1=0014.4F01.0000.0006
Note that these short names are used for all connections opened from host applications to remote
SPOTs, but are not available on SPOTs themselves.
Take suitable actions during over-the-air downloads
During over-the-air downloads, an application should suspend operations that use radio or flash
memory, or that are processor intensive.
To do this, you need to write a class that implements the interface
com.sun.spot.peripheral.ota.
IOTACommandServerListener
, and attach it to the
OTACommandServer
with code something like this:
OTACommandServer otaServer = Spot.getInstance().getOTACommandServer();
IOTACommandServerListener myListener = new MyListener();
otaServer.addListener(myListener);
Your listener object will then receive callbacks
preFlash()
and
postFlash()
around each flash
operation.
Managing keys and sharing Sun SPOTs
Background
When you update your Sun SPOT with a new library or application, or with a new config page,
the data that you send is cryptographically signed. This is for two reasons:
to ensure that the code executing on your Sun SPOT contain valid bytecodes
to prevent remote attackers from downloading dangerous code to your Sun SPOT via the
radio.
By default, each user of each SDK installation has their own public-private key pair to support this
signing. This key pair is created automatically when that user first requires a key (for example,
when deploying an application for the first time).
Factory-fresh Sun SPOTs are not associated with any owner and do not hold a public key. The first
user to deploy an application to that device (either via USB or over-the-air) becomes its owner.
During this process, the owner's public key is automatically transferred to the device. Only the
owner is allowed to install new applications or make configuration changes. This is enforced by
digitally signing the application or config page with the owner’s private key, and verifying the
signature against the trusted public key stored on the device.