YWireless Quick Start Guide
YWireless Quick Start Guide
This tutorial will show you how to get started with RX111 kit, which showcases end-to-end IoT solutions by Micrium, Medium One, Renesas, Qualcomm, and Future Designs.
What you need to get started:
RX111 Kit (Order here)
Smart Garage Demo (if your board is not already flashed with the demo)
WiFi Internet access
Step 1: What’s in the RX111 Kit
The RX111 kit includes Renesas’ RX111 module which supports 4 PMOD headers, and is flashed with Micrium’s cloud-ready RTOS and Smart Garage Door IOT Demo. It also includes a Qualcomm GT202 WiFi module for Internet connectivity. The kit also includes a free subscription to Medium One’s IoT Cloud platform for real-time data stream processing.
Step 2: Activate Kit on Medium One’s IoT Cloud
Click here to activate the kit and complete the registration process to create a Medium One account preloaded with the RX111 demo workflows. Please note your wireless network settings, as you will be prompted for them during the activation process.
Note: Medium One does not store your wifi credentials, you can leave any fields blank and manually enter the information yourself in the smart-home-garage.cfg file that will be generated after activation. Refer to Appendix B below on how to manually edit the smart-home-garage.cfg file.
Once activation is completed, you will receive an email with your Medium One account credentials and a separate email with your smart-home-garage.cfg file attached. This file contains WiFi settings for the RX111 board and Medium One API keys.
Step 3: Connect RX111 to the Cloud
When you connect the RX111 board to your computer, it will appear as a USB thumb drive. Delete the existing smart-home-garage.cfg file before replacing it with the one provided in Step 2. Then, press and release the reset button to reboot the RX111 module to apply the new settings. If the WiFi settings are correct, you will see the green LED light up. This may take up to 15 seconds depending on your network. If the WiFi settings are incorrect, the red LED will illuminate and you will need to correct the settings by editing the smart-home-garage.cfg file. If you encounter any issues with loading the configuration file onto your RX111, please see Appendix A: Troubleshooting (below) for help. Once the green LED is illuminated and the device is connected to the Internet, visit www.mediumone.com and login to your newly created sandbox account with your credentials from Step 2. Once logged in, you will see a Real Time Events Log widget on the dashboard page, with the “smartmeter” user selected. You should now see events coming from the RX111 board appearing in the log in real-time. The RX111 board sends a statistics event every minute while idle.
Now you have real-time data flow from your module to cloud.
Tip: You can always restore the RX111 board to factory settings by holding the SW4 button and toggling the reset button. Release the reset button before releasing SW4.
Step 4: Connect µC/Probe to the RX111
To connect µC/Probe to the Smart Garage µC/Probe workspace application, download and extract the pre-made µC/Probe workspace, then open the RX111-GarageDoorOpener.wspx workspace file in Probe. Next, you will need the device’s IP address. Pressing SW4 will trigger a diagnostics message to be sent to Medium One, which contains a field called “ip_address.” Copy the value of the “ip_address” field into µC/Probe’s connection settings window (Settings → TCP/IP → Remote Host), press OK, then hit the Play button at the top left corner of the screen.
Try pressing the garage door opener switch (SW2) a few times. You should see the garage door widget in µC/Probe opening and closing.
Pro tip: You can add your own widgets to the Probe workspace to visualize additional state information about the device. For instance, you can map an LED widget to the variable SHG_IsConnToBroker to see the MQTT broker connection state. To do this, add an LED widget (found under Miscellaneous) to the workspace, then expand the app.c node under the Symbol Browse and click-and-drag the SHG_IsConnToBroker variable onto the LED widget. Then, edit the LED properties and map the value 0 to the color red, and 1 to the color green. Now, when the device is connected to the broker, the LED widget will turn green.
Step 5: Demo: Auto Garage Door Workflow
Next, let’s demo the Garage Door Auto-Close workflow. This workflow monitors the garage door to see if there has been at least 2 minutes without motion. If so, it will automatically send a command to the RX111 board to close the garage door.
Medium One has the ability to process each event. Click on Workflow Studio → select “Garage Door Auto-Close.” Double-click on the Base Python box to see the sample python script that will check if the garage door was open with no activity for more than 2 minutes. To see this workflow in action, press SW2 to open the garage door (the orange LED will illuminate when the door is open), and wait 2 minutes for the garage door to automatically close (the LED will turn off, and the garage door will close in µC/Probe), triggered by Medium One. If you click on the “motion detected” button, that will reset the auto-close timer.
Medium One workflow
Smart garage python script
Step 6: Demo: Generate RX111 Diagnostic Email with Single Button
The RX111 is transmitting various stats to Medium One’s cloud including resource utilization and appliance power usage from µC/Probe. If you click on the SW4 button, that will trigger a workflow in Medium One to generate a diagnostics email that will be sent to you. You can select that workflow named “Generate Diagnostics” to explore and modify that script.
Step 7: What’s Next
Congrats! You have just created an end-to-end IoT prototype! The rest is up to your imagination.
Follow these guides to learn more.
Micrium: Smart Garage application sources
Renesas: Add-on PMODs
Here is a link to the schematic
Mac OS X Finder creates additional files on the USB storage device, so you must use the command line to remove the old file and copy over the new one. Open up the Terminal application and try the following commands, replacing <volume_name> with the name of the USB device.
cp /path/to/new/smart-home-garage.cfg /Volumes/<volume_name>/
Windows 10 does something similar, but this should be resolved now, since the device will always contain the smart-home-garage.cfg files, preventing the OS from creating any.
Some text editors have trouble saving onto the device because the file system is so small (2KB). If you encounter an issue with your favorite text editor, create the file on your desktop, then move it over to the USB device.
If your device is connected to the Internet (the green LED is lit up) but you do not see any activity on your feed when pressing the buttons, you may not be connected to the Medium One cloud. When the device cannot connect to the cloud, the orange LED should blink periodically. Verify your network configurations are correct in the smart-home-garage.cfg file.
You can always restore the device to factory settings (reformat the storage medium and create a default cfg file) by holding SW4, pressing and releasing reset, then releasing SW4.
Common wifi connectivity issues:
SSID with spaces are not supported
If additional authentication required after connection (such as internal webpages), the board will not work
Some potential issues with 5.0 GHz wifi band, recommend connecting to 2.4 GHz if possible
B: Editing smart-home-garage.cfg
Here is a an example configuration file with explanation on options
# # Smart Home Garage Configuration # # WiFi Settings # format: # ssid: access-point-ssid # auth: auth-type [crypto-type] [passphrase] # ip: dhcp|[static ip-address subnet-mask gateway] # [dns: [dns-ip] [dns-ip2] [dns-ip3]] # # Options: # ssid: The access point SSID is case-sensitive and must not exceed 32 characters. # # auth # auth-type: open, wpa, wpa2, wpa-psk, wpa2-psk, wpa-cckm, wpa2-cckm, # wpa2-psk-sha256 # crypto-type: wep, tkip, aes, wapi # passphrase: Case-sensitive. Must be 64 characters or fewer. # # ip # dhcp|static # ip/subnet/gateway: Settings for static IP address configuration. # Format: xxx.xxx.xxx.xxx # # Examples: # Open WiFi using a dynamic IP and the default DNS server. Wifi SSIDs with spaces in the name not supported # ssid: linksys # auth: open # ip: dhcp # # WPA2 (AES) authentication using a static IP and the FreeDNS DNS server # ssid: MyAccessPoint # auth: wpa2 aes MySecretPassphrase # ip: static 10.10.1.123 255.255.255.0 10.10.1.1 # dns: 126.96.36.199 188.8.131.52
ssid: MyAccessPoint auth: wpa2 aes MyPassphrase ip: dhcp # MQTT Broker Settings #
# Medium One MQTT end point, do not change host: mqtt.mediumone.com
# Medium One MQTT end point, do not change port: 61619
# MQTT username <project_id> can be found by logging into your Medium One account => settings => MQTT. <user_login> is your user’s login_id hash which can be found from the /users/<login_id> client-api endpoint un:<project_id>/<user_login>
# Medium One API user password <API_KEY> is any valid enabled api key in your project.
# <user_password> is the plaintext password for your user
# Medium One MQTT publish and subscribe topics. <deviceid> is arbitrary. topic-publish: 0/<project_id>/<user_login>/<deviceid> topic-subscribe: 1/<project_id>/<user_login>/<device_id>/event