Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleGoal


Excerpt

Build your very first network, understand how the LEDs indicate the state of the motes, issue simple CLI commands on the manager, understand the use of the netid.


Table of Contents

The Setup

In this part, you will run your motes and manager as a completely standalone network. That is, you will neither connect your network to the cloud, nor connect your motes to other managers.

You will interact with both your manager and one of your motes over their "Command Line Interface" (CLI) by connecting them to your computer with a USB cable.

Gliffy
imageAttachmentIdatt110794006
nameunplugfest_part1_setup
diagramAttachmentIdatt110794002

LEDs Activity During Join

  • Switch on your manager. What LED is ON?

    Info
    iconfalse
    titleAnswer 33.1.1



  • Switch on your mote. What sequence of LED patterns do you see?

    Info
    iconfalse
    titleAnswer 33.1.2



Tip
titleCrash Course 33.1.1 (given by your instructor)

 What exactly is happening when the nodes are joining the network?

  • Switch on all your motes

Serial Ports Madness, Oh My!

  • Connect a USB cable between your computer and your manager. Open your Device Manager (if you're on Windows) and write down the serial ports that have appeared.
  • Connect a second USB cable to your mote.
  • Write down the serial port numbers in the table below
Info
iconfalse
titleAnswer 33.1.3



managermote
first serial port<your answer here><your answer here>
second serial port<your answer here><your answer here>
third serial port<your answer here><your answer here>
fourth serial port<your answer here><your answer here>



Tip
titleCrash Course 33.1.2 (given by your instructor)

Why 4 serial ports, and which one do I use?

CLI Commands on the Manager

  • Open the serial terminal program you installed (PuTTY, TeraTerm, ...) and connect to the third serial port of your manager, at 9600 baud.

Tip
titleWhat just happened?

You just connected to the "Command Line Interface" (CLI) of the manager! You can now type commands and read responses.

  • Type the following to log into the manager as a user:

    Code Block
    login user


List the motes

  • Type the following command (sm stands for "show motes"):

    Code Block
    sm


  • What is the list of motes in your network?

    Info
    iconfalse
    titleAnswer 33.1.4



  • Compare that to the labels on your motes. Make sure they correspond.

Show the manager's statistics

  • Type the following command:

    Code Block
    show stat


  • What is the reliability of your network?

    Info
    iconfalse
    titleAnswer 33.1.5



  • What is the stability of your network?

    Info
    iconfalse
    titleAnswer 33.1.6



  • What is the average latency of your network?

    Info
    iconfalse
    titleAnswer 33.1.7



Tip
titleCrash Course 33.1.3 (given by your instructor)

Definition of reliability, stability, latency.

Ping a mote

  • Type the following command:

    Code Block
    ping 2


  • How long did mote 2 take to respond? This is called the "Round Trip Time" (RTT) of your network.

    Info
    iconfalse
    titleAnswer 33.1.8



Retrieve the manager's netid

  • Type the following command (minfo stands for "mote information"):

    Code Block
    minfo


  • What is the netid of your manager?

    Info
    iconfalse
    titleAnswer 33.1.9



Tip
titleCrash Course 33.1.4 (given by your instructor)

What is the netid, and what is it used for?

CLI Commands on the Mote

  • Open a second serial terminal program (don't close the first one), and connect to the third serial port of your mote, at 9600 baud.

Retrieve the mote's netid

  • Type the following command:

    Code Block
    minfo


  • What is the netid of your mote?

    Info
    iconfalse
    titleAnswer 33.1.10


Attach To a Different Network

Tip

Your instructor's manager is already attached to IBM Bluemix (something you will do as well in Part 2: A Canopy Network Coordinated through IBM Watson IoT). If you attach your mote to your instructor's manager, it will appear in the IBM Watson IoT Platform.


  • Ask your instructor for the netid of his/her manager
  • Type the following command:

    Code Block
    mset netid <netid your instructor gave you>


  • Power cycle your mote (switch it off and on)
  • Make sure you see your mote appear at https://makeamesh.eu-gb.mybluemix.net/, attached to your instructor's manager.
  • Revert your mote's netid to your manager's netid and power cycle your mote.
Info
titleAbout Security

This trick of attaching to a different network works because there is no Access Control List (ACL) defined on the instructor's manager. In a production network, the ACL on the manager lists the motes that can join, and their join key. A different join key (or "password to connect") is used for each mote.

For maximum flexibility during this session, the instructors manager is configured so it accepts any mote.