PkGen

Introduction

PkGen connects to a either a SmartMesh IP Manager or SmartMesh WirelessHART Manager, allowing you to send commands to the the packet generation application on the corresponding motes running in master mode.

Mote modes are discussed in the SmartMesh IP User's Guide and the SmartMesh WirelessHART User's Guide

Running PkGen

You can run the PkGen application:

  • by double-clicking on the Windows executable at /win/ PkGen.exe
  • by double-clicking on its source files at /src/ bin/PkGen/PkGen.py (may require additional steps on non-Windows OSes)

Description

The PkGen application consists of four frames:

  • The api frame allows you to specify whether you are connecting to a connect a SmartMesh IP or SmartMesh WirelessHART network. Since you are connecting to a manager, the "device type" selector is disabled.
  • The manager connection frame allows you to specify how to connect to the manager.
  • Once connected, the mote list contains the list of motes current in the network.
  • The status frame displays general status information.
An example of the PkGen application window is shown below, after the user has connected to a SmartMesh IP Manager. Aside from the API and connection tabs, the application appears the same for SmartMesh WirelessHART Managers.

Steps

  • Start the PkGen application, the following Window opens.
  • Select the type of network you will connect to; in our case SmartMesh IP.
  • Select the way to connect to the manager, in our case, using the SerialMux. After connecting, the application retrieves the list of motes currently in Operational state in the network.

 

 

The application does not display the access point or motes which are not in operational mode.

The application will list all motes in Operational mode, regardless of whether they are operating in master of slave mode. You can only interact with motes that you know are running in master mode.

 

  • For the mote of you choice enter the configuration you wish to send to the PkGen application running on the mote:
    • num is the number of packets you want the mote to generate.
    • rate is the amount of time between two consecutive packets, in ms.
    • size is the size of the packet payload, in bytes.
  • The configuration below has mote 00-17-0d-00-00-38-06-d6 send 300 packets, one every 200 ms, each carrying 35 bytes of the packet payload. Note that this rate may not be supportable for all devices for a given network size and topology.

  • A number of counters are there, for your convenience:
    • num - the number of packets generated by the mote which have been received. Note that this only counts packets generated by the mote's PkGen application, i.e. if it is generating different types of data, it will not be accounted for here.
    • pk./sec - an approximate rate counter, in packets received by the application, per second.
  • The clear button allows you to clear the counters.