Clone this repo:

Branches

  1. f97bb71 add elements for build scripts, update of readme by bartlomiej.zarnowski · 6 years ago master
  2. 6a4f873 Initial commit by bartlomiej.zarnowski · 6 years ago


The Lumpy Ci40 application

The Lumpy Ci40 is part of bigger project called "Weather Station". Using code from this repository you will be able to handle various sensor clicks inserted into your Ci40 board. Values measured by those clicks will be sent to Creator Device Server.

Environment for Weather Station project

The complete IoT Environment is builded with following components:

  • LWM2M cloud server
  • Ci40 application which allows usage of clicks in mirkroBUS sockets.
  • Contiki based applications build for clicker platform:
  • a mobile application to present Weather measurements.

Ci40 application specific dependencies

This application uses the Awa LightweightM2M implementation of the OMA Lightweight M2M protocol to provide a secure and standards compliant device management solution without the need for an intimate knowledge of M2M protocols. Additionnaly MikroE Clicks support is done through LetMeCreate library.

Integration with openWrt

It's assumed that you have build envriroment for ci40 openWrt described here and this is located in folder work. So structure inside will be:

work/
  build/  
  constrained-os/  
  dist/
  packages/

Clone this repository into work/packages, after this operation structure will look:

work/
  build/  
  constrained-os/  
  dist/
  packages/
    weather-station-gateway

Now copy folder from packages/weather-station-gateway/feeds into work/dist/openwrt/openwrt-ckt-feeds. Then execute commands:

cd work/dist/openwrt
./scripts/feeds update
./script/feeds update weather-station-gateway
./script/feeds install weather-station-gateway
make menuconfig

in menuconfig please press / and type weather-station-gateway one occurrence will appear. Mark it with <*> and do save of config. In terminal type make to build openwrt image with this application. After uploading to ci40 edit file located in /etc/init.d/weather_station_initd and put proper switch arguments related to clicks which you put into mikroBus port.

Setup for execution - development

While Lumpy uses Awa Client Deamon to communicate with Cloud LWM2M server it requires few things to be done before project will run. First of all you need to go to CreatorKit console and create certificate which will be used to make secure connection. If you havent done this earlier, you will find usefull informations on Creator Device Server page. Then you have to provide IPSO object definitions, to do so please run clientObjectsDefine.sh shript from scripts folder (make sure Awa client deamon is working!). And here you go! Wait! No! Put some clicks into Ci40 mikroBUS, and then you can execute Lumpy with one of following options:

SwitchDescription
-1, --click1Type of click installed in microBUS slot 1 (default:none)
-2, --click2Type of click installed in microBUS slot 2 (default:none)
-s, --sleepDelay between measurements in seconds. (default: 60s)
-v, --logLevelDebug level from 1 to 5 (default:info): fatal(1), error(2), warning(3), info(4), debug(5) and max(>5)
-h, --helpprints help

Please refer to section 'Supprted clicks' to obtain argument values for switch --click1 and --click2. If one of slots is empty you can skip proper switch or set it's value to none.

Supported clicks

From wide range of MikroE clicks in this project you can use:

ClickArgument
Air Qualityair
Carbon monoxideco
Thermo3thermo3
Thunderthunder
Weatherweather

License

Copyright (c) 2016, Imagination Technologies Limited and/or its affiliated group companies. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.