Sun Microsystems V2.0 manual Ant -Dport=COM2 info

Page 9

or

ant –Dport=COM2 info

The difference between these two commands is that the “spotport” version will check that there is a Sun SPOT connected to the specified port, whereas the “port” version will attempt to connect to a Sun SPOT on the specified port regardless. You should normally use the “spotport” version. If you prefer, you may specify the port in the build.properties file of the application:

spotport=COM2

or

port=COM2

On Unix-based systems, including Mac OS X, if you see an UnsatisfiedLinkError exception, this means that you need to create a spool directory for the communications driver RXTX to use, as locks are places in that directory. See the section notes on the RXTX driver in the Installation Guide for guidance on how to set up your spool directory.

5. To deploy the example application, use the “ant jar-deploy command.

C:\MyApplication>ant jar-deploy

Buildfile: build.xml

-pre-init:

-init-user:

-init-system:

-do-init:

-post-init:

init:

-set-jar-name:

-check-for-jar:

-override-warning-find-spots:

-main-find-spots:

[echo] Using Sun SPOT device on port COM45

-do-find-spots:

-pre-suite:

-do-suite:

[exec] [loaded object memory from 'file://C:/SunSPOT/dev/lib/translator.suite']

[exec] [loaded object memory from 'file://C:/SunSPOT/dev/arm/transducerlib.suite']

[exec] [Loaded squawk.imlet.Startup]

[exec] [Including resource: META-INF/MANIFEST.MF]

[exec] [Adding property key: Manifest-Version value: 1.0]

[exec] [Adding property key: Ant-Version value: Apache Ant 1.6.5]

[exec] [Adding property key: Created-By value: 1.5.0_06-b05 (Sun Microsystems Inc.)]

[exec] [Adding property key: MIDlet-Name value: Test]

[exec] [Adding property key: MIDlet-Version value: 1.0.0]

9

Image 9
Contents Page Page Contents Http protocol support Introduction Deploying and running a sample application Building and deploying Sun Spot applicationsBuild Successful Total time 3 seconds \MyApplication Ant -Dport=COM2 info Total time 4 seconds \MyApplication Total time 0 seconds \MyApplication Incorporating utility classes into your application Deploying a pre-existing jarManifest and resources Excluding files from the compilationOther user properties Using the Basestation Built-in propertiesOverview Set up Base Station configuration Remote operationIntroduction Connect a Sun Spot base station Managing keys and sharing Sun SPOTs Using short names for SPOTsTake suitable actions during over-the-air downloads BackgroundSharing Sun SPOTs Changing the owner of a Sun SpotDeploying and running a host application What is protected?Generating a new key-pair LimitationsYour own host application Configuring network featuresIncorporating pre-existing jars into your host application Mesh routingHardware configurations and USB power Trace routeLogging Page Overview of an application ThreadsThread priorities Sun Spot device libraries Sun Spot device libraryDevice Interface Persistent properties Overriding the Ieee address Accessing flash memoryUsart Radio communication library Program Radiogram protocol Server end Client endYou can open server radiogram connections in a similar way Broadcasting Radio properties Turning the receiver off and on Conserving power using deep sleep mode Monitoring radio activityShallow Sleep Deep Sleep Activating deep sleep modePreconditions for deep sleeping USB inhibits deep sleepDeep sleep behaviour of the standard drivers Device Condition to permit deep sleepWriting a device driver Http protocol support Configuring the http protocolSocket Proxy GUI mode Configuring projects in an IDEClasspath configuration Javadoc/source configurationDebugging Ant selectapplication Configuring Eclipse as a debug client Configuring NetBeans as a debug clientAdvanced topics Using library suitesWith adderlib as your current directory, execute the command Use the command Using the spot client SpotSerialPortException other exception in serial port comms Reference Persistent system propertiesProperty name Meaning Contents of the lib directory Contents of the arm directoryMemory usage Start address Space UseContents of the bin directory preverify.exe Contents of the tests directory Contents of the upgrade directory