Sun Microsystems V2.0 Welding System User Manual


 
16
Base Station configuration
It is possible to select a channel and pan id for the base station using command line properties in
conjunction with
ant host-run
. The properties are:
-Dremote.channel=nn
-Dremote.pan.id=nn
Alternatively, if you are operating in dedicated mode, the
IRadioPolicyManager
interface provides
operations to adjust the output power of the radio, the PAN Id and the channel number. To access
the policy manager from your host program do:
Spot.getInstance().getRadioPolicyManager()
Remote operation
Introduction
Until now, in this manual, we have worked with Sun SPOTs connected directly to the host
computer. In this section we show how it’s possible to carry out some, but not all, of the same
operations on a remote Sun SPOT communicating wirelessly with the host computer via a base
station.
The operations that can be performed remotely include:
ant deploy
ant jar-deploy
ant run
ant fork
ant debug
ant info
ant settime
ant deletepublickey
ant set-system-property
ant system-properties
ant delete-system-property
In each case, the procedure is the same:
1. ensure that the remote Sun SPOT is executing the OTA (“over the air”) Command Server
2. connect a Sun SPOT base station
3. specify the remote Sun SPOT’s ID, either on the ant command line (using the
-DremoteId=<IEEE address>
switch) or in the application’s build.properties file
(
remoteId=<IEEE address>
)
If you wish, you may also carry out a fourth step, which is:
4. program the remote Sun SPOT application to take suitable actions during over-the-air
downloads.
Each of these four is now considered in more detail
Ensure that the remote Sun SPOT is executing the OTA Command Server
The remote Sun SPOT must run a thread that listens for commands. To check whether or not the
command server is enabled on a SPOT use the
ant info
command. Factory-fresh SPOTs have the
command server enabled by default (except for basestations).