Download and install the latest version of WICED SDK, available for Windows, Mac and Linux. To setup on Windows platform, follow the steps present in this link.
To connect to the Quickstart Service, follow these steps:
Open the WICED SDK eclipse base IDE
Under demo->IBM , place the bluemix_iot quick start project
The MQTT library implementation is included in the libraries and can be found under protocol section
WICED SDK setup :
Edit the wifi_config_dct.h under bluemix_iot as per your accesspoint credentials
In the make target window add the following new target ( for this example we have used BCM94343W hardware)
And click on build target for this make target. On successfull build and download the application to hardware, open any serial port communication like TeraTerm or Putty to see the hardware console output.
The below console message can be viewed
Enter the deviceId that you see in the console log, in the quickstart website to visualize the data points as shown below
IBM Internet of Things Foundation
At this step, we have successfully sent the sensor data to IBM Watson IoT Platform Quickstart service using the WICED hardware
Show LessThis application snippet demonstrates the e-mail capability based on the state changes on the selected input.
The selected input could be discrete or analog input. Input could be the current temperature, security device going off, PIR detector, reed switch output, etc. For this example discrete input is used and the input is toggled by the push button switch (SW1) on the evaluation board.
To setup the application, please download the attached push2email snipped application and copy it to the WICED -SDK. For example the .../apps/snip directory of the WICED SDK.
Using .../apps/snip/push2email/wifi_config_dct.h, update the wi-fi configuration for WICED target platform board to connect to your network.
Change the CLIENT_AP_SSID with your access point SSID.
Change the CLIENT_AP_PASSPHRASE with your access point's security code.
You should change the "wiced.email.test@gmail.com" email address with your own email address, in the push2email.c file. This should first be changed after #define RECIPIENT (line 48) and then again in the section to setup email account (line 168).
Build the push2email application and download it to your target
snip.push2email-<YourPlatform> download run
For BCM943362WCD4 WICED evaluation board make target would be as following:
snip.push2email-BCM943362WCD4 download run
When the push2email application runs on the target, the initial state of the LED1, based on the state of the SW1 switch, is sent as an email to the recipient. The following would be received by the email recipient: "WICED device is up initial LED state is ON."
As the SW1 switch is pressed to toggle the LED1 state, the state changes of the LED1 are sent to email recipient.
With new smtp signin security added by the mail service providers, embedded devices sign-in is prevented. The wiced.email.test@gmail.com email address is created for demo purposes and the sign-in is set to access for less secure apps. Similar sign-in setup may require to send mail using your own smtp server. To receive email no such setup is required but Wiced device generated emails may end up in spam folder.