Chris Miller

05/14/07

Home
About Me
Interests

 

Chris Miller's research page

This page will be updated to provide details about my current and past research activity.

Current Project

 
Sensor network development using stargate and motes from Crossbow.

In developing the sensor network, we needed to be capable of acquiring sensor data from the motes at the stargate.  The process for setting up the nodes for a simple data acquisition is listed below.

Initial setup

  • Install TinyOS on a host PC
    • Insert the TinyOS Support Tools CD-ROM.  If you do not have the CD, TinyOS can be downloaded here. (If you do not already have cygwin and you are making a windows installation, you will want to also get cygwin if downloading the program)
    • Go to folder TinyOS install and double-click tinyos-1.1.0is.exe
    • Follow InstallShield wizard
    • Update to TinyOS 1.1.10
      • Copy tinyos-1.1.10July2005cvs-1.cygwin.noarch.rpm from TinyOS Updates folder on CD-ROM to C:\tinyos\cygwin\tmp\
      • Open Cygwin, enter

        cd /tmp

        rpm --nodeps --force --ignoreos -Uvh tinyos-1.1.10July2005cvs-1.cygwin.noarch.rpm

    • Correct reinstall bug
      • Open file reinstall.extra in C:\tinyos\cygwin\opt\intyos-1.x\tools\make\avr\
      • Change line

        BUILD_DEPS = exe0 setid program delsetid

        to

        BUILD_DEPS = setid program delsetid

    • I recommend visiting the TinyOS tutorial linked below

Programming the radio motes

  • Programming board used : MIB510

  • Radio mote used : MICA2 MPR400

  • Connect the mica2 to the programming board, connect power to the programming board and connect the programming board to a PC using a serial cable (a USB to serial may be used).

  • Program motes with SurgeReliable

    • Open Cygwin

    • change to surge reliable source directory

      cd /opt/tinyos-1.x/contrib/xbow/apps/Surge_Reliable

    • open the Makefile and make sure that the line under 'For MICA2 and MICA2DOT' is uncommented, and make sure that the line below 'For MICAZ' is commented by placing a # at the front of the line

    • the syntax to build applications is

      make <platform> [re]install,<ID> <prorammer>,<port>

      • the ID is the unique node ID to give each mote

      • the port is the port of serial connection (for me, com4)

    • program base station mote, enter

      make mica2 install,0 mib510,com4 (substitute com port)

    • program other motes, enter

      make mica2 reinstall,<ID> mib510,com4

      • give each a unique ID

    • SurgeReliable will program the motes to transmit sensor board data every 4 seconds.  The data packets will be forwarded to the base node (ID 0).

Collecting Data

  • Connect the base radio mote (ID 0) to a stargate, connect sensor boards to the other radio motes and turn them on.  (Information from this point forward will be based on connection of MTS300CA/310CA sensor boards to the radios)

  • Collect data on stargate

    The data coming into the stargate from the base radio over the serial connection is a raw data packet.  This packet must be decoded to extract the desired data.  Each type of message can have a different format, the messages that we are interested in for this project are Surge Messages.  There are four levels of hierarchy to the header format for this message.  They are:

1. Raw packet header

2. TinyOS message header

3. Multi-hop message header

4. Surge message header

  • The format of these headers is as shown in the table below

    Raw TinyOS Multi-hop Surge Bytes
    Sync byte       1
    Packet type       1
      Message address     2
      Message type     1
      Group ID     1
      Data length     1
        Source Address   2
        Origin Address   2
        Sequence #   2
        Hop count   1
          Type 1
          Reading 2
          Parent Address 2
          Battery/Sequence # 4
          Light 1
          Temp 1
          Magnetometer X 1
          Magnetometer Y 1
          Accelerometer X 1
          Accelerometer Y 1
      CRC     2
    Sync byte       1
  • The sync byte is always 0x7E
  • Any byte in the packet with value 0x7E or 0x7D is encoded by inserting 0x7D prior to the byte and XORing the byte with 0x20 (i.e. 0x7E will be represented by 0x7D5E)
  • Multi-byte fields in the raw packet are in Little Endian notation
  • Battery voltage/sequence # field is a combination of the two values.  The nine most significant bits are the battery level, and the 23 least significant bits are the sequence #.  (Convert to Big Endian notation before trying to divide)
  • The fields that should be checked to verify a surge message are:

    Packet type

    0x42

    P_PACKET_NO_ACK

    Message type

    0x11

    AMTYPE_SURGE_MSG

    Type

    0x00

    SURGE_TYPE_SENSORREADING

 

  • If these fields match up, then the data fields of the surge message can be read and stored in a database or log on the stargate.

 
  • For more information and manuals on the sensor boards of the crossbow motes, visit here.
  • For more information and manuals on the mica2 radios visit here.
  • For a tutorial on TinyOS visit here.

 

About me

 
   

Home | About Me | Interests

This site was last updated 05/14/07