Installation

Necessary Hardware

  • Microcontroller/development board of your choice
    • With necessary programmer
  • SmartMesh IP Mote (DC9003A-B)
    • With 6 female-female jumper cables
  • SmartMesh IP Manager (DC2274A-A)
  • SmartMesh Interface Board (DC9006A)
    • With USB-A to USB-micro cable
  • Computer (should support Python and Java)

Necessary Software

Downloading Libraries

There are two ways to download the QuickStart Library:

a) Clone The Source Code

Clone the repository with git (or a git GUI client):

$ git clone https://github.com/dustcloud/QSL-for-sm_clib.git

Enter the repository:

$ cd QSL-for-sm_clib

Initialize and  update the necessary C Library submodule:

$ git submodule init
$ git submodule update


You can also checkout the latest release with subversion:

$ svn checkout https://github.com/dustcloud/QSL-for-sm_clib.git

but then you will also have to checkout the latest release of the C Library, since SVN does not support git submodules:

$ svn checkout https://github.com/dustcloud/sm_clib.git

b) Download Zip/Tar

  1. Go to the QSL release page and download the latest zip/tar.
  2. Go to the C Library release page and download the latest zip/tar. The C Library is automatically generated from the SmartMesh IP stack library source, and so it may change with each stack release and needs to be downloaded separately.
  3. Unzip the files using your favourite compression tool.

Directory Structure

The QSL repository contains the following directories:

  • sm_qsl/ contains the QuickStart Library as a collection of headers (.h) and source code files (.c).
  • sm_clib/ is a submodule that contains the underlying C Library, with sample applications for its direct use.
    • sm_clib/ is the C Library itself as a collection of headers (.h) and source code files (.c).
      • ports/ contains an example of the necessary C Library ports.
    • examples/ contains sample applications which use the C Library directly.
  • examples/ contains sample applications utilizing the QSL
    • rpi/SimplePublish/ contains an example that connects and starts publishing random data, where the necessary porting functions have been implemented for the Raspberry Pi.
    • samc21_xplained_pro/SimplePublish/ contains the same example for the SAM C21 Xplained Pro evaluation board.
    • nucleo-l053r8/SimplePublish/ contains the same example for the NUCLEO-L053R8 development board.
       

If you chose the zip download or subversion checkout, the sm_clib/ directory from the separate unzipped folder/svn checkout should be copied into the QSL repository, as some example code will expect the above structure.


The SmartMesh QuickStart Library, and C Library it depends on, are both designed so you can drop their directories into your application without modification, i.e. these two folders from the structure above:

  • sm_qsl/
  • sm_clib/sm_clib/

You are free to modify them to suit your needs; however, we recommend you avoid changing the contents of these two directories, as this will allow you to easily replace them with future revisions.

In addition to the files in these folders, you need to implement a handful of functions, as discussed in the next section.

Install FTDI Serial Drivers

To be able to connect to and configure the mote and manager, your computer will need the necessary FTDI Serial Drivers. Most modern OSes come with FTDI drivers pre-installed (e.g. Linux), but you may have to install them manually if they do not configure automatically when you plug in the interface board or manager. Follow the installation guide corresponding to your OS if you have any trouble.

If installed correctly, the interface board or manager should appear as a group of 4 serial ports when connected via USB:

  • Windows: 4 COM ports can be viewed using the Device Manager (Control Panel -> System -> Hardware -> Device Manager -> Ports)
  • Linux: $ dmesg | grep FTDI should detect FTDI converters attached to /dev/ttyUSBn to /dev/ttyUSBn+3

The ports of interest are the third and fourth, which map to the CLI and API, respectively, as defined by Table 1


Device

Serial Port NumberUsageBaudrateData BitsParityStop Bits
SmartMesh IP Managerthird*CLI96008No1
fourth*API115200**8**No**1**
SmartMesh IP Motethird*CLI96008No1
fourth*API115200**8**No**1**
Table 1: Serial port configurations

*: Refers to the serial ports created by the FTDI drivers.
**: Default values (can be changed).


Note that for Windows, the COM port assignment will change whenever you connect the interface board (or manager) to a different USB port.