EC544 Networking the Physical World

SunSPOT installation notes

Essentials:

  • Look closely at http://www.sunspotworld.com/GettingStarted/
  • clean-up
    • remove NetBeans install
    • remove .netbeans/.nbi/etc info from X: drive and C:
    • uninstall SunSPOTManager
      • Open the Sun SPOT Manager tool
      • Click the SDKs tab and select a current SDK and click uninstall
      • Wait for it to remove the files
      • Rename or delete the folder in the C://
      • Restart the manager tool
  • install new JRE
  • in the case where the OS is 64bits, make sure you run the 64 bits version or IE
  • Run SPOTmanaer.jnlp from http://www.sunspotworld.com/SPOTManager/
  • Install the SunSPOT modules in C:\SunSPOT
  • After the installer finishes wait for SPOTmanager to start
  • Add ANT_HOME C:\Program Files\NetBeans 6.9.1\java\ant or the latest installed on the machines
  • Add JAVA_HOME C:\Program Files\Java\jdk1.6.0_07 env vars or the latest installed on the machines
  • Add SUNSPOT_HOME “C:\Sun\SunSPOT” (Is this necessary?)
  • Add “;%JAVA_HOME%\bin;%ANT_HOME%\bin” to the path
  • make sure that the sunspot properties file is present in your home directory. ( it contains some variables like sunspot_home, this file can be found in the course directory, under sunspot_setup)
  • Reboot
  • Run SPOTmanaer.jnlp from the desktop (or from the 64 bits browser, if it complains about not being a 64 bits)
  • It will likely ask to install the modules again, let it
  • After the installer finishes wait for the SPOTmanager
  • Click on the SDK’s tab and install the latest SDK (choose $SUNSPOT_HOME, i.e C:\Sun\SunSPOT)
  • now plugin the SunSPOT and look at the relevant section in http://www.sunspotworld.com/GettingStarted/

RXTX files

These files are here: \\engna2.bu.edu\support\software\windows\i386\Sun\ch-rxtx-2.2-20081207-win-x64

  • You need to add the precompiled files to support RXTX on windows 64 bits.
    • Copy RXTXcomm.jar —> <JAVA_HOME>\jre\lib\ext
    • Copy rxtxSerial.dll —> <JAVA_HOME>\jre\bin
    • Copy rxtxParallel.dll —> <JAVA_HOME>\jre\bin

Netbeans Note

  • when launching netbeans for the first time, do not import anything. It should create a hidden directory in your home folder of the latest version you are using.
  • Check the Java Platform combo in the Libraries tab of one of your modules. This controls nbjdk.home.
  • nbjdk.home=C:\\Program Files\\Java\\jdk1.6.0_25
  • You can also create ~/.nbbuild.properties for settings which should apply to any NB checkout on the machine unless overridden in user.build.properties. (Changes made from the IDE will always be stored in user.build.properties.)
  • Netbeans needs to pick up the 64 bits JDK in order to work with the RXTX drivers. Edit the following in NetBean’s etc/netbeans.conf file to match your 64 bit jdk:
    • netbeans_jdkhome=”C:\Program Files\Java\jdk1.6.0_27″

Troubleshooting

If windows cannot find driver, do this:

  • Check SunSPOT.inf in your SDK directory. As posted by kersing, make sure it contains the line “include=mdmcpq.inf” so it looks as follows:

[SpotInstall]
include=mdmcpq.inf
CopyFiles=SpotCopyFiles
AddReg=SpotAddReg

  • Plug in your first Spot, let windows look for the drivers, if it cannot find them, make sure SunSPOT.inf is in the windows\inf directory, if it is not, copy it there from your sdk directory.
  • Choose “install anyway” when being queried about the fact that the drivers were not signed.

    Possible error Suggested fix
    The Sun SPOT manager tool does not start Make sure all paths are correct (JDK and ant directories)
    Does not prompt for SunSPOT installation directory In SDKs tab, pick the latest available and click Install
    Sun SPOT is not detected Plug in the device, Control Panel, Add hardware, use automated detection and restart the manager tool

    If SunSPOT Manager says “please reset SPOT”:

    • Open a command prompt and navigate to C:\Sun\SunSPOT\sdk
    • Plug in the Spot and open Device manager, check which com port the Spot is on.
    • With the Spot device unplugged run the command “ant -Dport=COMnn info” where nn is the correct com port.
    • Wait with the Spot at the ready, then connect it when the buildfile says “retrying…”
    • It should find the Spot and reset it. Now you can refresh SPOT manager.
    Useful Links:

    TinyOS Notes

    • Make ‘Administrators’ owners of all files in C:\Program Files\UCB
    • Run the tinyos install script (part 2) and tinyos-copy
    • Re-propagate permissions from C:\Program Files\UCB\cygwin
    • Map link cygwin’s /opt to the x: drive
      • (ln -s ~/tinyos-1.x /opt/tinyos-1.x; need to rename the old dir first)

    check the yinstall and xinstall scripts in …/tinyos-1.x/contrib/xbow/bin I believe the yinstall was my/a earlier attempt to correct the install issues.

    Removing cygwin:

    • delete the folder c:\cygwin and all its sub-folders
    • remove the Environment Variable CYGWIN
    • edit the Environment path accordingly
    • Start…Run… regedit and delete these two registry trees
      • “HKEY_CURRENT_USER_Software_Cygnus Solutions” “HKEY_LOCAL_MACHINE_Software_Cygnus Solutions”