Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 25 Next »

Goal

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.

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.

LEDs Activity During Join

  • Switch on your manager. What LED is ON?

    Answer 33.1.1


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

    Answer 33.1.2


Crash 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

Answer 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>

Crash 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.

What 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:

    login user

List the motes

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

    sm
  • What is the list of motes in your network?

    Answer 33.1.4


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

Show the manager's statistics

  • Type the following command:

    show stat
  • What is the reliability of your network?

    Answer 33.1.5


  • What is the stability of your network?

    Answer 33.1.6


  • What is the average latency of your network?

    Answer 33.1.7


Crash Course 33.1.3 (given by your instructor)

Definition of reliability, stability, latency.

Ping a mote

  • Type the following command:

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

    Answer 33.1.8


Retrieve the manager's netid

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

    minfo
  • What is the netid of your manager?

    Answer 33.1.9


Crash 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:

    minfo
  • What is the netid of your mote?

    Answer 33.1.10


Attach To a Different Network

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:

    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.

About 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.

  • No labels