This 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.