Skip to main content

Posts

Showing posts from September, 2008

SunSpot: MovementDetection

Problem: Method "thresholdExceeded" always works even though we didn't move the spot or move the spot when it is in deepsleep. Cause: I suppose that the events occurred when we do move and wait for sending the messages when the receiver is available. Solution: Disable ThresholdEvent before starting in deepsleep mode -- accel.enableThresholdEvents(IAccelerometer3D.ALL_AXES, false);

SunSpot: UnableToDeepSleep

Problem: When we use sleepMgr.ensureDeepSleep(...), it goes to UnableToDeepSleepException even we don't have any thread running. The error says that "another thread is runnable within x", Cause: Because of many system threads which run from time to time, sunspot won't let us do ensuredeepsleep. Solution: We just call the command to block every thread running which is Thread.sleep(...) or Utils.sleep(...). Then, the spot will go to deepsleep. Note: In my experiment, OTA doesn't affect with deepsleep mode. References: https://www.sunspotworld.com/forums/viewtopic.php?p=7755

SunSpot: Ant command

To display remote system out : ant run -DremoteId=xxxx.xxxx.xxxx.xxxx ant -DremoteId=xxxx.xxxx.xxxx.xxxx echo To display all spot info in range: ant hello To display info of connected spot: ant info To enable OTA: ant enableota To see output of spot: ant echo -DremoteId=xxxxx.xxxx.xxxx.xxxx To check sdk version: ant sdk-info To upgrade sdk: ant upgrade To make sure the basestation running: ant startbasestation To flashbootloader: ant flashbootloader

Re-install Java on Mac OS X

Move or remove all of the following /Library/Java /Applications/Utilities/Java /System/Library/Frameworks/JavaVM.framework /System/Library/Java /System/Library/CoreServices/Jar\ Launcher.app /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework /System/Library/Frameworks/JavaEmbedding.framework /System/Library/CFMSupport/StubLibraries/JavaEmbeddingLib and all your Java 6 installation receipts from /Library/Receipts/. Then re-install Java from the Leopard DVD with the commands open /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/Java.pkg open /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/JavaTools.pkg

Re-install Java on Mac OS X

Move or remove all of the following /Library/Java /Applications/Utilities/Java /System/Library/Frameworks/JavaVM.framework /System/Library/Java /System/Library/CoreServices/Jar\ Launcher.app /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework /System/Library/Frameworks/JavaEmbedding.framework /System/Library/CFMSupport/StubLibraries/JavaEmbeddingLib and all your Java 6 installation receipts from /Library/Receipts/. Then re-install Java from the Leopard DVD with the commands open /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/Java.pkg open /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/JavaTools.pkg