Sun Microsystems V2.0 manual Contents

Page 3

Contents

 

Introduction

5

Building and deploying Sun SPOT applications

6

Deploying and running a sample application

6

Deploying a pre-existing jar

12

Incorporating utility classes into your application

12

Excluding files from the compilation

13

Manifest and resources

13

Other user properties

13

Built-in properties

14

Using the Basestation

14

Overview

14

Set up

15

Base Station configuration

16

Remote operation

16

Introduction

16

Ensure that the remote Sun SPOT is executing the OTA Command Server

16

Connect a Sun SPOT base station

17

Launch the spot client to control a remote Sun SPOT via the base station

17

Using short names for SPOTs

18

Take suitable actions during over-the-air downloads

18

Managing keys and sharing Sun SPOTs

18

Background

18

Changing the owner of a Sun SPOT

19

Sharing Sun SPOTs

19

What is protected?

20

Generating a new key-pair

20

Limitations

20

Deploying and running a host application

20

Example

20

Your own host application

21

Incorporating pre-existing jars into your host application

21

Configuring network features

21

Mesh routing

21

Trace route

22

Logging

22

Hardware configurations and USB power

22

Developing and debugging Sun SPOT applications

24

Overview of an application

24

Threads

24

Thread priorities

24

The Sun SPOT device libraries

25

Introduction

25

Sun SPOT device library

25

Persistent properties

26

Overriding the IEEE address

27

Accessing flash memory

27

Using input and output streams over the USB and USART connections

28

The radio communication library

29

Radio properties

35

Monitoring radio activity

37

Conserving power using deep sleep mode

37

Shallow Sleep

37

Deep Sleep

38

Activating deep sleep mode

38

USB inhibits deep sleep

39

Preconditions for deep sleeping

39

Deep sleep behaviour of the standard drivers

39

The deep sleep/wake up sequence

39

3

Image 3
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 Background Using short names for SPOTsManaging keys and sharing Sun SPOTs Take suitable actions during over-the-air downloadsSharing Sun SPOTs Changing the owner of a Sun SpotLimitations What is protected?Deploying and running a host application Generating a new key-pairMesh routing Configuring network featuresYour own host application Incorporating pre-existing jars into your host applicationHardware 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 modeDevice Condition to permit deep sleep USB inhibits deep sleepPreconditions for deep sleeping Deep sleep behaviour of the standard driversWriting 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 Start address Space Use Contents of the arm directoryContents of the lib directory Memory usageContents of the bin directory preverify.exe Contents of the tests directory Contents of the upgrade directory