element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
  • Settings
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
Blog Arm Education: Internet of Things Course - Weather Station
  • Blog
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
  • Share
  • More
  • Cancel
  • Author Author: ralphjy
  • Date Created: 4 Jul 2019 6:38 PM Date Created
  • Views 478 views
  • Likes 5 likes
  • Comments 2 comments
Related
Recommended
  • RoadTest
  • arm education iot course

Arm Education: Internet of Things Course - Weather Station

ralphjy
ralphjy
4 Jul 2019

Course module 12 finishes up by implementing a weather station device using the the Environmental sensors and the BLE device.  This course module is another example of the course not being finished before it was released.  There are 3 lab videos, the first one is a combination of the following two and probably should have been deleted.

 

In module 11 I encountered a problem where the device did not seem to be advertising its BLE characteristics.  I wondered if this could be associated with the fact that we were provided with a different BLE shield than what the project had used.  We received an X-NUCLEO-IDB05A1 which replaced the XNUCLEO-IDB04A1 which had been deprecated.  I tried building the weather station program with the same result as previously.  The program built and downloaded successfully but BLE did not seem to be working.  After a lot of Google searching I found some X-CUBE-BLE1 apps that implemented drivers on the X-NUCLEO-IDB05A1: https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32c…

 

One of these apps was a SensorDemo_BLESensor app.  It approximated what the weather station program was trying to do.  I tried building and deploying it and voila - everything worked.

 

I was able to discover the device:

image

 

and display the environmental sensors:

image

 

And plot the data:

imageimageimage

 

 

After a close examination of the code, I discovered that X-NUCLEO-IDB05A1 requires extra parameters when setting up its GAP profile.

 

Here are the gap_init functions:

 

tBleStatus aci_gap_init_IDB05A1(uint8_t role, uint8_t privacy_enabled, uint8_t device_name_char_len, uint16_t* service_handle, uint16_t* dev_name_char_handle, uint16_t* appearance_char_handle)

 

tBleStatus aci_gap_init_IDB04A1(uint8_t role, uint16_t* service_handle, uint16_t* dev_name_char_handle, uint16_t* appearance_char_handle)

 

The IDB05A1 has two additional parameters, privacy_enabled and device_name_char_len.  The latest mbed SDK code has provisions to handle either board.  The lab code using an older version of the SDK does not have the extra code for the IDB05A1.  So again, the course is out of date.

 

I thought that I might try to fix the old program, but the file structure and file locations have changed between SDK versions and I also found that there were 89 references to the IDB05A1 in the files. Other incompatibilities probably exist.  So, I guess I'm satisfied that I accomplished the intent of the lab.  Not worth the effort to make it work exactly like it should have.

 

 

The final section of the course was to build a weather station app for the Android device.  I thought I'd give it a try to see if I could get it to work with the new mbed code.  Again, ran into problems with obsolete code.  This time the Android code/configuration.

The versions of Gradle used previously have issues with the latest version of Android Studio.  A bit beyond my current level of understanding.  I went through a couple rounds of updates and finally was successful after upgrading to the latest versions of Gradle and Gradle Plugin (was a bit of a pain because the version numbers don't track easily - needed to find a cross reference table).  I ended up using Gradle 5.1.1-all and Gradle Plugin 3.4.1.

image

image

image

 

I was able to deploy the app to my Nexus tablet, but it didn't work (wouldn't connect).

image

 

At this point, I think I'm done.  It has been a very frustrating experience.  All that's left is to write my review.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 6 years ago +1
    Nice update. Yes, there is nothing more frustrating than dealing with incomplete demonstrations or outdated material. DAB
  • dubbie
    dubbie over 6 years ago

    I've always found software to be this frustrating. Whenever possible I avoid all updates but usually there comes a time when you just have to bite the bullet and get stuck into a complicated upgrade. Sometimes at work using Windows I was able to avoid complete upgrades to Windows by just carrying on with the same old version (because I had got it working) and just implement alternative updates. In the end, my University went for a global update over the intranet and then we had no choice. When that happened I just started buying new stuff after every update as it wasn't worth trying to keep the old stuff working. When I retired it was getting to the point where I was having to buy new stuff every year which makes keeping lecture notes valid more time consuming.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 6 years ago

    Nice update.

     

    Yes, there is nothing more frustrating than dealing with incomplete demonstrations or outdated material.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
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 © 2025 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