Troubleshooting FAQ (https://www.sunspotworld.com/docs/troubleshooting-faq.php)

来源:互联网 发布:济宁软件开发sdllwl 编辑:程序博客网 时间:2024/04/19 20:54
 

Problem with remote commands (e.g. deploy, info, etc.) being ignored

This can happen if the SPOT application exits then it will not listen for remote commands. Connect the SPOT via USB and redeploy a known application to it.

Basestation not recognized

Run 'ant selectbasestation' and then hit the reset button on the SPOT. This problem can be caused if you had (mistakenly) deployed an application to the basestation.

Port in use error

One thing you need to be careful about is some nasty behaviour in Windows if you unplug a SPOT while a client-side application is running (e.g. "ant run"). In this scenario:

  1. "ant run"
  2. application is running
  3. unplug SPOT
  4. plug it back in
  5. ctrl-c the "ant run"
  6. "ant run"

you'll get the "port in use" error. When you pull out the plug the rxtx/USB goes into a funny state and you must exit the process before re-connecting the device. So:

  1. "ant run"
  2. application is running
  3. unplug SPOT
  4. ctrl-c the "ant run"
  5. plug it back in
  6. "ant run"

will work fine.

Can't import the package java.util.Set or java.util.HashSet

The Squawk JVM implements the CLDC 1.1 spec of Java ME, so not all Java SE classes are available.

How do I recover a SPOT with badly broken software?

If your SPOT crashes shortly after startup - for example, you inadvertently deployed an application with a bad bug - it can be hard to get your SPOT's attention in order to reflash a more stable application. The most reliable procedure is:

  1. Unplug USB from the SPOT
  2. Power the SPOT down by holding the attention button in until the red light flashes twice quickly.
  3. Type an ant command with the relevant port specified: "ant info -Dport=COM6"
  4. Wait until the command responds once with the message
           [java] Port COM6 unavailable...       [java] Available ports: COM1 COM2 COM3 LPT1       [java] retrying...
    And then quickly plug your SPOT into the USB. The info should now appear, and the SPOT will be "trapped" in its bootloader ready to be reflashed.

How Do I....

How do I make my PC (host) application talk to a SPOT over the USB connection?

Have your host application use the RXTX library, provided with the SDK. For details please see: http://www.sunspotworld.com/forums/viewtopic.php?t=190

How do I pass in some system properties to a Spot ap (e.g. -Dfoo=bar)?

You can define properties in the midlet's manifest file, in resources/META_INF/MANIFEST.MF

How do I get involved?

Buy a SPOT development kit and then swap tips, questions, comments on the SunSpotWorld forums.

Can I port the Sun SPOT to a different hardware platform?

A Sun SPOT is an integrated hardware & software system. So it's not clear what it would mean to port it.

Some software parts that you might be interested in (from more to less generic):

  • The Java virtual machine (Squawk)
  • On ARM
  • on ARM9
  • The radio stack
  • on the specific radio chip.
  • The general mechanism for device drivers (not yet finalized)
  • All of the specific drivers
  • The SPI libraries
  • The AVR/power controller code
  • The demo sensor board APIs/code.
  • The bootloader

Some of this code is visible to the ordinary user (such as the APIs), while other code is needed to get hardware up and runing, with little API impact (like bootloaders and power controllers).

原创粉丝点击