Sun Microsystems V2.0 Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Software-Handbücher Sun Microsystems V2.0 herunter. Sun Microsystems V2.0 User's Manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken

Inhaltsverzeichnis

Seite 1

Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. Sun™ Small Programmable Object Technology (Sun SPOT) Developers’ Guide This vers

Seite 2

10 [exec] [Adding property key: MIDlet-Vendor value: Sun Microsystems Inc] [exec] [Adding property key: MIDlet-1 value: Spottests,, squawk.

Seite 3 - Contents

11 -do-init: -post-init: init: environment: [java] To configure the environment for Squawk, try the following command: [java] set

Seite 4

12 [java] -------------------------------------------------------------------- [java] Hits - Class:95.74% Monitor:92.38% Exit:100.0

Seite 5 - Introduction

13 Excluding files from the compilation To exclude files or folders matching a specific pattern from the java compilation, set the ant property spot.

Seite 6

14 resources/META-INF/MANIFEST.MF within its root folder. The adderlib extension has such a file, whose content is FavouriteSnake: Viper This de

Seite 7

15 HostSun SPOT(“base s tation”)Sun SPOT(“Target”)USB802.15.4 radio The Host can be any of the supported platforms (e.g. Windows PC, Mac). The Host a

Seite 8

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 an

Seite 9

17 To configure the SPOT so that this thread is started each time the SPOT starts issue this command via a USB connection: ant enableota The SPOT

Seite 10

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, i

Seite 11

19 Even if you aren’t concerned about security, you need to be aware of this if you want to be able to use Sun SPOTs interchangeably amongst two or m

Seite 12

2 Copyright © 2007 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. Sun Microsystems, Inc. ha

Seite 13 - Manifest and resources

20 ant deploy for each Sun SPOT. What is protected? Applications and customized libraries are always verified and unless the digital signature can b

Seite 14 - Using the Basestation

21 When the switch is specified a basestation will still be correctly identified if one is available, but if no basestation is available the port pr

Seite 15 - Sun SPOT

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

Seite 16 - Remote operation

23 critical during the USB enumeration which occurs when plugging in a new device. During this phase the SPOT may only draw 20% (100mA) of its full p

Seite 17

24 Developing and debugging Sun SPOT applications Overview of an application A Sun SPOT application is actually implemented as a MIDlet. This should

Seite 18

25 The libraries only use system priorities in three cases: 1. To guarantee that application threads don't run during a system operation during

Seite 19

26 Each physical device is controlled by a single instance of the respective class, accessed through the interfaces listed above. The single instance

Seite 20

27 - there is a possibility that another isolate has written a new value for the property since the current isolate started - your application has

Seite 21 - Configuring network features

28 example above two sectors are allocated (and thus erased), starting with the first sector available to applications. Using the Record Management S

Seite 22 - 0014.4F01.0000.0006

29 Configuring USART parameters The URL for USART access can uniquely be extended with additional parameters to configure the USART if required. For

Seite 23

3 Contents Introduction ...

Seite 24 - Threads

30 The radiogram protocol provides datagram-based communication between two devices. This protocol provides no guarantees about delivery or ordering.

Seite 25

31 Program 2 RadiostreamConnection conn = (RadiostreamConnection) Connector.open("radio://0014.4F01.0000.0007:100"); DataInputStream dis =

Seite 26

32 where serverAddr is the 64bit IEEE Address of the radio of the server, and portNo is a port number in the range 0 to 255 that identifies this par

Seite 27 - Using IFlashMemoryDevice

33 There are some points to note about using datagrams: • Only datagrams obtained from the connection may be passed in send or receive calls on the

Seite 28 - Configuration

34 There are some important points to note about using this operation: • If setting a timeout it must be set before opening streams or creating dat

Seite 29 - About the radio stack

35 The following table explains the current usage of ports in the reserved range. Port number Protocol Usage 8 radiogram:// OTA Command Server 9

Seite 30

36 DefaultChannelNumber DefaultPanId DefaultTransmitPower Turning the receiver off and on The radio receiver is initially turned off, but turns on a

Seite 31 - The radiogram protocol

37 RSSI (received signal strength indicator) measures the strength (power) of the signal for the packet. It ranges from +60 (strong) to -60 (weak). T

Seite 32

38 • CPU – power on but CPU clock off (the CPU's power saving mode) • Master system clocks – power on • Low level firmware – power on • RAM

Seite 33 - Using system allocated ports

39 If it is important that your application knows whether or not deep sleep happened, then you can alternatively execute this code: ISleepManager s

Seite 34 - Port number usage

4 Writing a device driver...

Seite 35

40 2. Of all threads executing a Thread.sleep() it determines which will resume soonest. If the sleep interval is less than the minimum deep sleep t

Seite 36 - Signal strength

41 http protocol support The http protocol is implemented to allow remote SPOT applications to open http connections to any web service accessible fr

Seite 37

42 HTTP Proxy If the host computer running the Socket Proxy is behind a proxy server, the device can still access the Internet if the following prop

Seite 38

43 Classpath configuration The classpath for an application that runs on a Sun SPOT needs to include the following jars in this order: SDK_INSTALL_D

Seite 39

44 where xxxx is the id of the SPOT running the application being debugged and yyyy is the id of your base station. Note that xxxx can be a short na

Seite 40

45 Using non-default channel or pan id It is not possible for an application being debugged to select dynamically a different channel or pan id. Inst

Seite 41

46 Expand each of the first four of these, then select and edit the “Source attachment”. Point this to the relevant source jar as follows: transduce

Seite 42

47 Start by copying LibraryExtensionSampleCode to a working area. This contains two sub-directories: adderlib and addertest. adderlib contains the li

Seite 43 - Debugging

48 Note that by default, the library is built without line number information to save space in flash memory. For debugging purposes, you may find it

Seite 44

49 The source code for the libraries is supplied in three parts: spotlib_source.jar contains the code that supports the SPOT main board; multihop_sou

Seite 45 - Unexpected exceptions

5 Introduction The purpose of this guide is to aid developers of applications for Sun SPOTs. The guide is divided into two sections. Building and de

Seite 46 - Advanced topics

50 Wire objects together At system startup, a development tool should create and wire together various objects. This code shows the general style: S

Seite 47

51 Reference Persistent system properties Property name Meaning spot.hardware.rev spot.powercontroller.firmware.version spot.sdk.version spot.exter

Seite 48 - Running startup code

52 Memory usage The Sun SPOT flash memory runs from 0x10000000 to 0x10400000 (4M bytes), and is organized as 8 x 8Kb followed by 62 x 64Kb followed b

Seite 49 - Implementing IUI

53 debugger_classes.jar The classes of the Sun SPOT high-level debugger. Used by the debug proxy. desktop_signing.jar Classes that are used to secu

Seite 50 - Execute commands

54 Contents of the src directory: multihoplib_source.jar Source code for the radio communications stack. sdproxylauncher_source.jar Source code fo

Seite 51 - Reference

6 Building and deploying Sun SPOT applications Deploying and running a sample application The normal process for creating and running an application

Seite 52

7 [delete] Deleting directory C:\MyApplication\build [delete] Deleting directory C:\MyApplication\suite [delete] Deleting directory C:\MyApp

Seite 53

8 -post-init: init: -override-warning-find-spots: -main-find-spots: [echo] Using Sun SPOT device on port COM45 -do-find-spots: slots: -ru

Seite 54

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

Kommentare zu diesen Handbüchern

Keine Kommentare