element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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
IoT on Wheels Design Challenge
  • Challenges & Projects
  • Design Challenges
  • IoT on Wheels Design Challenge
  • More
  • Cancel
IoT on Wheels Design Challenge
Blog IOT on Wheels Design Challenge - Smart Drive - First Steps with mbed os - Blog #2
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: vlasov01
  • Date Created: 26 Sep 2017 2:08 AM Date Created
  • Views 545 views
  • Likes 5 likes
  • Comments 2 comments
  • mqtt
  • mbed os 5
  • stm32 nucleo
  • wifi shield
  • smartdrive
Related
Recommended

IOT on Wheels Design Challenge - Smart Drive - First Steps with mbed os - Blog #2

vlasov01
vlasov01
26 Sep 2017

IOT on Wheels Design Challenge - Smart Drive - Project Index

Communication

 

I've introduced my project Smart Drive in my previous blog post.

My project requires a secure connection with Internet to exchange information. I've selected MQTT protocol as it is open, lightweight (low power consumption), supports data confidentiality (TLS) and widely adopted (including client for STM32).

 

Hardware

The following characteristics of Nucleo Wi-Fi expansion board X-NUCLEO-IDW01M1 enable my communication requirements for a secure connection with Internet to exchange information over MQTT protocol.

  • low power IEEE 802.11 b/g/n transceiver
  • integrated SMD antenna
  • integrated protocol stacks: TCP/IP, TLS/SSL

 

X-NUCLEO-IKS01A2 - Motion MEMS and environmental sensor expansion board for STM32 Nucleo  will provide sensor reading related to acceleration and orientation.

 

I've connected Nucleo Wi-Fi expansion board  X-NUCLEO-IDW01M1X-NUCLEO-IDW01M1 and Nucleo Motion MEMS and environmental expansion board X-NUCLEO-IKS01A2 - Motion MEMS and environmental sensor expansion board for STM32 Nucleo - STMicroelectronics with Nucleo development board  NUCLEO-L476RGNUCLEO-L476RG

image

mbed os cloud IDE

I've try several development IDEs for STM32. I've decided to use mbed os IDE https://os.mbed.com/compiler/  . It is fast, easy to use. It has some constraints in terms of debugging, but serial communication from the board provides capability to get log output.It is acceptable for me way to debug after my previous experience in a similar setup with other MCUs. As well it is possible to export project from mbed os and import into other IDEs. But I run into some errors when I've tried to build the project with STM System Workbench.

 

MQTT and WiFi Configuration

MQTT protocol support comes with one of the several STM32 ODE Function Packs - STMicroelectronics  I've decided to try FP-CLD-BLUEMIX1, as it was build by IBM, which created MQTT protocol.The MQTT client implementation is based on Apache Paho project. The documentation and MQTT server hosted in the cloud. I've created a new mbed-os project using FP-CLD-BLUEMIX1 template. Then I've configured WiFi parameters in the project and removed references to a NFC board.

 

image

 

Build, Deployment and Debugging

I've connected STM modules over USB to a serial terminal. Then after a successful compilation of the project I've uploaded the binary to STM32 USB disk. The program start execution right away after the upload. The board was able successfully connect to my WiFi access point and to the MQTT server in the cloud.

image

 

Cloud connection

I was able to confirm MQTT connection from the cloud server by entering my board MAC address,

image

  • Sign in to reply
  • vlasov01
    vlasov01 over 7 years ago in reply to e14phil

    Thank you!

     

    I've realized that MQTT client rebooted the board and got stuck. You can see it on in the screen capture where it tries connect to AP without success after restart. I've spent some time trying to resolve the issue, but without success. I was hoping to complete this challenge without resorting to a debugger, but I think it only option that I can see for now as my next step.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • e14phil
    e14phil over 7 years ago

    Looking good!

    • Cancel
    • Vote Up 0 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