This version (14 Jan 2021 05:33) was approved by Robin Getz.The Previously approved version (03 Jan 2021 21:55) is available.Diff

Software example using EV-COG-SMARTMESH1Z

This document explains how temperature data can be sent via EV-COG-SMARTMESH1Z configured in the slave mode to the E-manager connected to the users PC. It also explains the software flow and how to view the expected output.

Software Details

A modular software framework is provided for quick application prototyping. Based on the application use case, developers need to download the respective software packs.

The EV-COG-SMARTMESH1Z interfaced EV-COG-AD3029LZ , software development kit consists of these packs:-

  1. BSP - Board Support Package for EV-COG-AD3029LZ - This pack along with the DFP is required to develop applications using the on-board drivers.
  2. SmartMesh C library- This pack is required for the implementation of the serial APIs of the EV-COG-SMARTMESH1Z and nullifies the need for application software to deal low level processes.

For details on the C-Library, follow thislink

Software Overview

  • Application software has provisions to handle sensor data collection or preprocessing of collected data and can draw implications on the collected data.
  • BSP handles sending and receiving of packets over UART interface.
  • C-LIB is a library for handling API calls, HDLC packetisation, etc.

Software Architecture

This section gives user a basic understanding on how the software is designed for handling both transmission and reception of packets between the EV-COG-SMARTMESH1Z and EV-COG-AD3029LZ.

To download the software source from Analog Devices Git - click on "SmartMesh-Temperature-Sensor-Software"

Transmission of Packets

The Application level software handles tasks such as invoking API commands, handling API replies and performing user-application specific tasks. The C-Lib later performs HDLC packetization and other tasks there by making it easy for the user to send commands to the EV-COG-SMARTMESH1Z. In the BSP, APIs specific to UART communication aid in sending transmit packets over the UART lines.

Reception of Packets

When EV-COG-SMARTMESH1Z sends a packet to EV-COG-AD3029LZ, the received packet is written to a circular buffer using the UART specific APIs of the BSP. At the application level software , the circular buffer is continuously checked for data written. When a byte of data is written to the circular buffer, the application level software calls routines that handle the data written to the buffer. The C-Lib processes the received packet and sends a callback to the application level software with only the required field in the received packet.

Software Flow:-

Interface Guide

This section covers the various steps involved in the interface of the EV-COG-SMARTMESH1Z with EV-COG-AD3029LZ and thereby run the C-library on the EV-COG-AD3029LZ and get it to talk to EV-COG-SMARTMESH1Z.

Following are the steps involved :-

  • Connect the EV-COG-SMARTMESH1Z with EV-COG-AD3029LZ as shown in the Board Interface section.
  • Download and Install the necessary soft wares for working with the EV-COG-SMARTMESH1Z and EV-COG-AD3029LZ as mentioned in the Software Details section.
  • For setting up the SmartMesh-IP-Manager follow this link.
  • Download the Source code.
  • Place the contents of the SmartMesh C-Library in the your project folder.
  • Here is a list of files of the SmartMesh C-Library you need to include in the project folder:-
    • dn_endianness.c
    • dn_hdlc.c
    • dn_ipmt.c
    • dn_lock.c
    • dn_serial_mt.c
  • Import the source into IAR and run the application software.

Importing source file to IAR

Here is the link for working with IAR Embedded Workbench for programming EV-COG-3029LZ which cover topics related to initial settings and project importing tasks and running the projects.

Successful Interface of EV-COG-SMARTMESH1Z with EV-COG-AD3029LZ

Steps to obtain output as shown in fig.1 :-

  • Open Tera Term.
  • Click on Serial and select the Com port to which the manager is connected.
  • Type “login user” .
  • Type “sm” which is a command for showing all the motes connected to the manager.
Steps to obtain output as shown in fig.2 :-

  • Click on APIExplorer.exe.
  • Select Manager and click on connect through “serialMux” or through specific Com port.
  • In the command window select “subscribe”.
  • To subscribe to all notifications fill “FFFFFFFF” in the filter section and “00000000” in the unackFilter.
  • In the “ notifications “ section, one can see the data and other notifications.
Steps to obtain output as shown in fig.3 :-

  • Click on TempMonitor.exe.
  • Press “load” manager.
  • In the mote list, the temperature data sent by the mote is visible.

Example project

To download an example project to interface EV-COG-SMARTMESH1Z with EV-COG-AD3029LZ click on "SmartMesh-Temperature-Sensor-Software"

The example project sends temperature data or a dummy data to the manager which can be viewed on TempMonitor(GUI) or on the APIExplorer(GUI) of the manager.


End of Document

resources/eval/user-guides/ev-cog-ad3029lz/example_project/temp_sensor_smartmesh.txt · Last modified: 14 Jan 2021 05:24 by Robin Getz