element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Or choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Sudden Impact Wearables Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Sudden Impact Wearables Design Challenge
  • More
  • Cancel
Sudden Impact Wearables Design Challenge
Blog EasyConfigure - Configurator
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: tomaja
  • Date Created: 14 Apr 2015 2:39 PM Date Created
  • Views 316 views
  • Likes 0 likes
  • Comments 0 comments
  • mqtt
  • easy_configure
  • sudden_impact
  • qt
  • esp8266
  • arduino
Related
Recommended

EasyConfigure - Configurator

tomaja
tomaja
14 Apr 2015

Previous posts:

EasyConfigure - Modular/Configurable System Intro

EasyConfigure - Hardware Components

EasyConfigure - BASH scripting

EasyConfigure - MQTT test setup

EasyConfigure - Remote sensor unit preparation

 

 

Configuration tool

Some progress has been made on EasyConfigure configuration tool and I would like to share the current status.

 

This tool will be used to configure remote sensor units and allow them to start sending their sensor data to central MQTT broker (Raspberry Pi).

Application relies on two helper scripts that are running on Raspberry Pi. These scripts are used to scan available remote units (scan.sh), and to send settings to each of them (configure.sh).

These two BASH scripts are being run remotely over ssh. Scripts output is parsed and used to update UI.

image

Figure 1. Sudden Impact configuration tool after two remote units were detected (ESP8266 and CC3200 Launchpad running in AP mode)

 

Usage

First step is to set the SSID prefix for remote units. My units are set to have SSIDs in si_XYZQW format, where XYZQW is a 5 digit number and si_ is common prefix. This is required for enumeration of available units. Each unit is assigned with a unique password and ssid/password pairs are stored in a text file at the moment, but I plan to make that table editable using this tool.

 

Units switch from AP to STATION mode after configuration is received. To be able to connect to main AP, all units must receive it's SSID and password - these are set using Wireless AP Settings inputs.

It is also required to set the MQTT Broker address, port, username and password (in this implementation, all units will be using the same MQTT username).

 

After all fields are set, administrator should click Configure Remote Units button to send configuration to remote units. Units then switch to STATION mode, connect to MQTT broker and start publishing sensor readings.

 

ESP8266 firmware

This application "talks" to ESP8266 based remote sensor units. Each ESP8266 is running a firmware that's built using Arduino IDE for ESP8266 (https://github.com/esp8266/Arduino). I built Arduino IDE from source - it was trivial. Initially, I had a lot of trouble with watchdog resetting ESP8266 but after I posted a few comments, GitHub project maintainer was kind enough to introduce a change. He exposed WTD enable/disable functions through special ESP object and I was finally able to run the script without interruption.

 

Further improvements

1) I plan to add status indictors for each remote unit in the list so that it's clearly visible if some unit is not sending updates. This tool will subscribe to all units updates. As soon as message from remote unit arrives, online indicator will be turned on (green LED image) and corresponding timer will be set. Timer will reset every time a message arrives. After timer expires, offline indicator will be turned on for corresponding unit raw (red LED image).

2) Raspberry Pi (MQTT Broker and DB) can be automatically found on the network and this would enable automatic setup function.

3) Reconnect feature should be implemented. Currently, after connection is lost, unit has to be restarted to be able to connect to MQTT broker again.

 

This application is also built using Qt framework to make it easily portable to other platforms.

In my next post, I will share the Sudden Impact Monitor application progress. That application is used to display the sensor readings. It runs in near-realtime and on multiple platforms.
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube