element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • 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 2
  • Blog
  • Forum
  • Documents
  • 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: tomaja
Date Created: 8 May 2015 11:09 AM
Views: 105
Likes: 1
Comments: 0
  • wifi
  • mqtt
  • easy_configure
  • beaglebone_black
  • qt
  • netcat
Related
Recommended

EasyConfigure - Configurator 2

tomaja
tomaja
8 May 2015

Previous posts:

EasyConfigure - Modular/Configurable System Intro

EasyConfigure - Hardware Components

EasyConfigure - BASH scripting

EasyConfigure - MQTT test setup

EasyConfigure - Remote sensor unit preparation

EasyConfigure - Configurator

EasyConfigure - Sudden Impact Monitor

EasyConfigure - Electrolube PU Resin

EasyConfigure - Remote Sensor Unit Fail - Workaround demonstration

 

Configurator

This tool is used to setup all remote sensor units so that they can connect to wireless network and start sending data to central unit (no hardcoded WiFi APs and passwords - can be transferred to different locations and used right away).

I was using my old Raspberry Pi B as a central unit but it seems like it was a bit slow so I switched to BBONE-BLACK-4G - ELEMENT14 - BEAGLEBONE BLACK REV C, CORTEX A8 | Farnell element14.

BeagleBone Black is running Debian Linux and is connected to wireless network using a WIFI DONGLE - ELEMENT14 - USB DONGLE, WLAN, 150MBPS | Farnell element14.

BeagleBone Black is currently set up to use a static IP. so I can use it easier but this is not that great. This is probably the only place where intervention is required but I plan to make the BeagleBone Black automatically discoverable by Configurator application so that no manual intervention is required (at this moment, administrator would have to set the WiFi connection on the BeagleBone manually and use the assigned IP in configurator GUI). However, BBB still needs to connect to different, possibly(probably) protected WiFi APs. To make this easier, I could make a BASH script that is called with AP SSID and Password passed as parameters - Users would then just connect to BBB using USB cable and ssh to 192.168.7.2 or I could make a node.js program to make the setup accessible from browsers via http://192.168.7.2/.

 

Current status

GUI is now extended with additional tab for device management.

First tab is used to scan for and setup found devices and the second one is used to enter each device's ID (SSID), password and a friendly name.

Figure 1. First Configurator tab - Device scanning and configuring

 

Figure 2. Device management - Setup passwords and friendly names for client applications to show instead of si_12345 names.

 

The initial version of Configurator application was using ssh connection to BeagleBone Black but that was too complicated if anyone would like to run this application on Windows. That's why I decided to turn over to simple TCP connection for communicating with BBB.

Configurator application now relies on a couple of IP servers running on BeagleBone Black. While still in prototype phase, these servers are created using nc(1): arbitrary TCP/UDP connections/listens - Linux man page in listening mode on port 51081 (scan_server.sh), 51082 (configure_server.sh), 51083 (get_list.sh) and 51084 (set_list.sh). In a final product all these "server" scripts can be combined in a single server application (instead of BASH scripts).

Scanning is performed using a BASH script and its output is sent back to the Configurator application.

Similarly, configure_server.sh accepts client connections on port 51082 and receives configuration string from Configurator app. This string is then parsed and sent to corresponding remote sensor device.

"Load Devices List" button triggers a connection to BBB:51083 and the list of devices with their IDs, password and friendly names is received back from BBB. Similarly, "Save Device List" sends the list to set_list.sh listening on port 51084.

 

Future improvements

As it can be seen on Figure 2, There's a 4th column in the devices table. This column is reserved for a list of available sensors for each device. This field will be populated automatically as data starts to arrive to the broker (BBB). This is not yet implemented due to lack of time but it's not hard to do, Configurator will just have to subscribe to all topics and check the readings to see the list of sensors for each device. Remote sensor device scan the I2C bus to get the list of sensors that are connected (in future versions, sensors that are interfaced through SPI or analog sensors could be added - that would require an additional MCU for each of them that interfaces them and then talks to ESP8266 over I2C).

Anonymous
Element14

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 © 2022 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube