Necessary Hardware
...
- FTDI Serial Drivers
- IDE/programmer/debugger of your choice
- SmartMesh C Library
- SmartMesh QuickStart Library
- Git client (optional)
Downloading Libraries
Anchor | ||||
---|---|---|---|---|
|
There are two ways to download the QuickStart Library:
a) Clone The Source Code
Create the QuickStart_Library
folder anywhere on your computer and navigate to it.
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
Initialize and update the neccessary C Library submodule:
(...)
/QuickStart_Library
$ git submodule init
(...)
/QuickStart_Library
$ git submodule update
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
- Go to the QSL release page and download the latest zip/tar.
- Go to the C Library release page and download the latest zip/tar. The 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.
- Unzip the files using your favourite compression tool.
...
- 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.
- sm_clib/ is the C Library itself as a collection of headers (.h) and source code files (.c).
- 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.
- contains the same example for the NUCLEO-L053R8 development board.
Note |
---|
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:
...
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 Anchor sec_serialDrivers sec_serialDrivers
sec_serialDrivers | |
sec_serialDrivers |
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.
...
The ports of interest are the third and fourth, which map to the CLI and API, respectively, as defined by Table 1.
Device Device
| Serial Port Number | Usage | Baudrate | Data Bits | Parity | Stop Bits | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SmartMesh IP Manager | third* | CLI | 9600 | 8 | No | 1 | ||||||
fourth* | API | 115200** | 8** | No** | 1** | |||||||
SmartMesh IP Mote | third* | CLI | 9600 | 8 | No | 1 | ||||||
fourth* | API | 115200** | 8** | No** | 1** |
...