Sun Microsystems V2.0 manual Hardware configurations and USB power, Trace route, Logging

Page 22

For situation 2 above you should configure the SPOT as a dedicated mesh router, using the command:

ant selectmeshrouter

When the SPOT is reset (by pressing the attention button or by an ant run command) it will begin acting as a dedicated router. A SPOT set in this configuration does not need the spot.mesh.enable property to be set.

Trace route

A SPOT can optionally run a trace route server. If a SPOT is running the trace route server it can participate in route tracing requests. The default is for the server not to run. To enable the server set the system property spot.mesh.traceroute.enable to true, like this:

ant set-system-property –Dkey=spot.mesh.traceroute.enable –Dvalue=true

You should then see the server indicate its presence at start-up, like this:

[TraceRouteServer] starting

If you have a number of SPOTs running the trace route server you can issue trace route requests, like this:

ant tracert -DremoteId=0014.4F01.0000.0006

which will trace the current route to the specified SPOT.

Logging

As a diagnostic aid, you can enable display of all network route discovery and route management activity. To do that, set the system property spot.mesh.route.logging to true, like this:

ant set-system-property –Dkey=spot.mesh.route.logging –Dvalue=true

To see the same diagnostics for host applications, use:

ant host-run –Dspot.mesh.route.logging=true

See also the section below “Adjusting Log Output” for information on controlling whether opening and closing connections will be logged.

Hardware configurations and USB power

The SPOTs in the development kit come in two configurations:

SPOT + battery + demo sensor board

SPOT only

The SPOT-only package is intended for use as a radio base station, and operates on USB-supplied power. Apart from the lack of battery and sensor board the base station SPOT is identical to other SPOTs.

SPOTs are expected to work in a battery-less configuration (powered by USB power) if they do not have any other boards (such as the demo sensor board) fitted. If other boards are fitted the power consumption may exceed the maximum permitted by the USB specification. This is especially

22

Image 22
Contents Page Page Contents Http protocol support Introduction Building and deploying Sun Spot applications Deploying and running a sample applicationBuild Successful Total time 3 seconds \MyApplication Ant -Dport=COM2 info Total time 4 seconds \MyApplication Total time 0 seconds \MyApplication Deploying a pre-existing jar Incorporating utility classes into your applicationExcluding files from the compilation Manifest and resourcesOther user properties Built-in properties Using the BasestationOverview Set up Remote operation Base Station configurationIntroduction Connect a Sun Spot base station Take suitable actions during over-the-air downloads Using short names for SPOTsManaging keys and sharing Sun SPOTs Background Changing the owner of a Sun Spot Sharing Sun SPOTsGenerating a new key-pair What is protected?Deploying and running a host application LimitationsIncorporating pre-existing jars into your host application Configuring network featuresYour own host application Mesh routingTrace route Hardware configurations and USB powerLogging Page Threads Overview of an applicationThread priorities Sun Spot device library Sun Spot device librariesDevice Interface Persistent properties Accessing flash memory Overriding the Ieee addressUsart Radio communication library Program Radiogram protocol Client end Server endYou can open server radiogram connections in a similar way Broadcasting Radio properties Turning the receiver off and on Monitoring radio activity Conserving power using deep sleep modeShallow Sleep Activating deep sleep mode Deep SleepDeep sleep behaviour of the standard drivers USB inhibits deep sleepPreconditions for deep sleeping Device Condition to permit deep sleepWriting a device driver Configuring the http protocol Http protocol supportConfiguring projects in an IDE Socket Proxy GUI modeJavadoc/source configuration Classpath configurationDebugging Ant selectapplication Configuring NetBeans as a debug client Configuring Eclipse as a debug clientUsing library suites Advanced topicsWith adderlib as your current directory, execute the command Use the command Using the spot client SpotSerialPortException other exception in serial port comms Persistent system properties ReferenceProperty name Meaning Memory usage Contents of the arm directoryContents of the lib directory Start address Space UseContents of the bin directory preverify.exe Contents of the upgrade directory Contents of the tests directory