The demo do this:
Connect the KIT (see details below) to IBM Watson IoT Platform and send to it the pressure sensor data.
For do this we use MQTT and TLS.
The SW is write in uPython and run on the SPWF04Sx WiFi module.
The final result is shown below.
For this example we use this KIT:
X-NUCLEO-IDW04A1 (WiFi evaboard) with FW version 1.1
STEVAL-PCC018V1 (USB/RS232TTL adapter board)
X-NUCLEO-IKS01A2 (Mems Sensor evaboard)
IBM Watson IoT Platform
Firefox browser ver.53.0.3
The FW version used on the SPWF01Sx module is ver.1.1
It will be available soon.
See below the HW kit.
First go to IBM Watson IoT Platform and create your account, see below
Now is necessary get the security certificate from IBM Watson and save it in .der format.
Follow the steps show below.
Connect to the PC your X-NUCLEO-IDW04A1 using an RS232-TTL/USB adapter (we suggest the STEVAL-PCC018V1). See below.
Now open TeraTerm and configure it as shown below.
Verify the dimension of your .der file, see below.
In TeraTerm type this command:
1360 is the dimension of our certificate.
Go to file menu (TeraTerm) and click on: send file
Now select your certificate file (.crt) exported before, make sure to put the check on binary option. See below.
At the end you must see something like below.
Now type, in TeraTerm, the commands below:
- AT+S.PYTHON (for enter in uPython mode)
- Then type: CTRL E
- Modify the file: SPWF04-Bluemix.py
change SSID, PASSWORD and the name of the IBM Watson account. See below.
- Now copy and paste the file SPWF04-Bluemix.py in TeraTerm
Then type: CTRL D
if (w.ssid() != 'PocketCube-A1A2'): w.init(mode=WLAN.STA, ssid='PocketCube-A1A2', auth=(WLAN.WPA,'R3TDF0NJ')) print ('SSID properly configured') m.init(ID='d:quickstart:nucleo:123456789emcu')
On the IBM Watson page, you will see pressure sensor data (in mBar).
This example does not handle disconnections, it’s just a test; after a dozen of data the connection is suspended.
The SPWF04-Bluemix.py is protected by a password.
For the momente the SPWF04-Bluemix.py is only for AVNET-SILICA customers.
If you are AVNET-SILICA customers, write me an email and request the password for: SPWF04-Bluemix.py
please specify also your Name, City, Country and your contact in AVNET-SILICA.
If you are STM customer please contact directly your local office of STM.