Difference between revisions of "WISE-1530 SDK"

From ESS-WIKI
Jump to: navigation, search
 
(221 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
= Overview =
 +
 +
WISE-1530 is used Cypress's WICED<sup>®</sup>&nbsp;&nbsp;SDKs to develop Wi-Fi and BLE&nbsp;application.&nbsp;WISE-1530 SDK use C/C++ language Runs on Windows<sup>®</sup>, Mac<sup>®</sup>&nbsp;OS X<sup>®</sup>, and Linux<sup>®</sup>&nbsp;through Eclipse<sup>®</sup>-based integrated development environment (IDE).
 +
 +
Single installer package with support for:
 +
 +
*​Wi-Fi + Bluetooth combo solution
 +
**Wi-Fi solutions
 +
**Bluetooth (Basic Rate, Enhanced Data Rate and Bluetooth Low Energy)
 +
*Sample applications for many popular use cases like
 +
**Connecting to&nbsp;cloud services
 +
**Low-power BLE-based sensors and beacons
 +
**Smart home gateways
 +
**BLE-WiFi introducer
 +
*Code snippets to understand&nbsp;WICED APIs
 +
 +
User can refer to '''[http://www.cypress.com/products/wiced-software WICED Software]'''&nbsp;to get more information.
 +
 
= Setup Development Environment =
 
= Setup Development Environment =
  
Line 5: Line 23:
 
The user needs to prepare for hardware as following:
 
The user needs to prepare for hardware as following:
  
*WISE-1530, WISE-1500 and WISE-ED22.
+
*WISE-1530, WISE-1500 and [[WISE-ED22_User_Manual|WISE-ED22]].
 
*802.11b/g/n (2.4 GHz) Wireless Access Point (AP).
 
*802.11b/g/n (2.4 GHz) Wireless Access Point (AP).
*PC running the Microsoft&nbsp;Windows&nbsp;7 operating systems
+
*PC Runs on Windows®, Mac® OS X®, and Linux®
  
Please refer to the following steps for setup a WISE series of boards before using WISE-1520.
+
Please refer to the following steps for setup a WISE series of boards before using WISE-1530.
  
 
'''Step01:'''&nbsp;Please prepare boards as below.
 
'''Step01:'''&nbsp;Please prepare boards as below.
  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;[[File:WISE-1530 hardware setup.png|RTENOTITLE]]
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;[[File:WISE-1530 hardware setup.png v2.png|543x386px|RTENOTITLE]]&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
  
 
'''①'''&nbsp;WISE-1530
 
'''①'''&nbsp;WISE-1530
Line 32: Line 50:
 
booting. “ON”: enabled, “OFF”: disable
 
booting. “ON”: enabled, “OFF”: disable
  
'''⑦'''&nbsp;One reset button on WISE-1500 and the other on WISE-ED22
+
'''⑦'''&nbsp;WISE-1530 reset button, one button on WISE-1500 and the other on WISE-ED22
  
 
'''⑧&nbsp;'''Micro USB connector&nbsp; &nbsp;&nbsp;
 
'''⑧&nbsp;'''Micro USB connector&nbsp; &nbsp;&nbsp;
Line 42: Line 60:
 
'''⑨'''&nbsp;RF connector
 
'''⑨'''&nbsp;RF connector
  
'''Step02:'''&nbsp;Connect the [[WISE-ED22_User_Manual|WISE-ED22]] to PC using micro-USB cable.
+
''''''Power connector
  
*&nbsp;Install Driver ( [https://developer.mbed.org/media/downloads/drivers/mbedWinSerial_16466.exe Download latest driver] )
 
  
*The device will be visible in the Device Manager as below, user can use&nbsp;serial tools&nbsp;(putty, tera term ...etc.) to key-in command.&nbsp;
 
  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;[[File:Mbed uart.png|649x466px|Mbed  uart.png]]
+
'''Step02:'''&nbsp;Connect the [[WISE-ED22_User_Manual|WISE-ED22]] to PC using micro-USB cable(Please refer to WISE-ED22&nbsp;[http://ess-wiki.advantech.com.tw/view/WISE-ED22_User_Manual#Connection_with_target_board Connection with target board]).
 +
 
 +
*Install Driver ( [https://developer.mbed.org/media/downloads/drivers/mbedWinSerial_16466.exe Download latest driver] )
 +
 
 +
*The device will be visible in the Device Manager as below.
 +
 
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;[[File:Mbed uart.png|649x466px|Mbed  uart.png]]
  
 
== WICED Studio ==
 
== WICED Studio ==
Line 54: Line 76:
 
The user can refer to the following steps for setup WICED&nbsp;Studio with WISE-1530 SDK.
 
The user can refer to the following steps for setup WICED&nbsp;Studio with WISE-1530 SDK.
  
=== '''Windows Install:''' ===
+
=== Windows Install ===
  
#Download [https://community.cypress.com/servlet/JiveServlet/downloadBody/3991-102-4-4268/WICED-Studio-4.1.1.8-IDE-Installer.exe.zip WICED-Studio-4.1.1.8-IDE-Installer.exe.zip]
+
#Download [https://www.cypress.com/products/wiced-software WICED-Studio_SDK download]
 
#Extract the installer exe from the zip file to temp folder on your computer; do not execute the installer from the zip file
 
#Extract the installer exe from the zip file to temp folder on your computer; do not execute the installer from the zip file
 
#Double click the installer exe to install WICED Studio as below picture
 
#Double click the installer exe to install WICED Studio as below picture
Line 71: Line 93:
 
<ol start="4" style="list-style-type: decimal;">
 
<ol start="4" style="list-style-type: decimal;">
 
<li>After installation in completed, launch WICED Studio IDE from shortcut on desktop</li>
 
<li>After installation in completed, launch WICED Studio IDE from shortcut on desktop</li>
<li>When you see the Select WICED Platform&nbsp;page, Select the&nbsp;'''<span style="color:#0000FF;">43xxx_Wi-Fi&nbsp;</span>'''item&nbsp;</li>
+
<li>When you see the Select WICED Platform&nbsp;page, choose&nbsp;the&nbsp;'''<span style="color:#0000FF;">43xxx_Wi-Fi&nbsp;</span>'''item. You can change in&nbsp;"WICED Platform" &nbsp;in SDK toolbar also.</li>
 
</ol>
 
</ol>
  
Line 78: Line 100:
 
[[File:WICED installer 6.png|480x342px|WICED installer 6.png]]
 
[[File:WICED installer 6.png|480x342px|WICED installer 6.png]]
  
=== '''Copy patch file''' ===
+
=== Copy patch file ===
  
#Download and unzip [[Media:WM-BN-BM-22_SDK_4.1.x_platform_patch.zip|WM-BN-BM-22_SDK_4.1.x_platform_patch.zip]]
+
#Download and unzip [[Media:WM-BN-BM-22_SDK_5.1.x_platform_patch_v1.6.zip|WM-BN-BM-22_SDK_5.1.x_platform_patch.zip]]
#Copy&nbsp;platforms folder to &lt;SDK folder&gt;\43xxx_Wi-Fi\ and select replace
+
#Copy&nbsp;platforms and WICED folders to &lt;SDK folder&gt;\43xxx_Wi-Fi\ and select replace
#Copy&nbsp;WICED folder to &lt;SDK folder&gt;\43xxx_Wi-Fi\ and select replace
 
  
 
== Build Source File ==
 
== Build Source File ==
  
=== Make a "Make Target" file ===
+
=== Create a "Make Target" file ===
  
 
&nbsp; &nbsp; &nbsp; &nbsp;Step1: In Make Target window click mouse right button
 
&nbsp; &nbsp; &nbsp; &nbsp;Step1: In Make Target window click mouse right button
Line 94: Line 115:
 
[[File:WICED make target new.png|392x262px|WICED make target new.png]]
 
[[File:WICED make target new.png|392x262px|WICED make target new.png]]
  
&nbsp; &nbsp; &nbsp; &nbsp;Step3: Type "snip.gpio-BCMUSI22.A1"
+
&nbsp; &nbsp; &nbsp; &nbsp;Step3: Type "snip.gpio-WISE_1530A1"
  
[[File:WICED make target input name.png|RTENOTITLE]]
+
[[File:WICED make target input name-v02.png|RTENOTITLE]]
  
Field&nbsp;explanation:&nbsp;'''<u>snip.gpio</u>'''-'''<u>BCMUSI22</u>'''.<u>'''A1'''</u>
+
Field&nbsp;explanation:&nbsp;'''<u>snip.gpio</u>'''-'''<u>WISE_1530A1</u>'''
  
 
*snip.gpio: application project name
 
*snip.gpio: application project name
*BCMUSI22: platform name, for WISE-1530 platform don't change this field.
+
*WISE_1530A1: platform name, for WISE-1530&nbsp; A1 version platform don't change this field.
*A1: platform version, for WISE-1530 platform don't change this field.&nbsp;
+
 
 +
*The platform name had rename to&nbsp;WISE_1530A1. Please the following picture WISE_1530&nbsp;replace to&nbsp;WISE_1530A1.
  
 
[[File:WICED make target snip.gpio.png|RTENOTITLE]]
 
[[File:WICED make target snip.gpio.png|RTENOTITLE]]
Line 110: Line 132:
  
  
​&nbsp; &nbsp; &nbsp; &nbsp;User can&nbsp;&nbsp;refer &lt;SDK folder&gt;\43xxx_Wi-Fi\doc\make_target_examples.txt to get more detail.
+
​ &nbsp; &nbsp; &nbsp;&nbsp;
 
 
[[File:WICED make target example.png|RTENOTITLE]]
 
  
 
=== Build Project ===
 
=== Build Project ===
Line 118: Line 138:
 
Double click&nbsp;"Make Target" file to build project.
 
Double click&nbsp;"Make Target" file to build project.
  
[[File:WICED compile-1.png|RTENOTITLE]]
+
[[File:WICED compile-1 v03.png|RTENOTITLE]]
  
 
It is build complete when you see below&nbsp;
 
It is build complete when you see below&nbsp;
  
[[File:WICED compile-2.png|RTENOTITLE]]
+
[[File:WICED compile-2 v02.png|RTENOTITLE]]
  
 
== Generate a Programming File ==
 
== Generate a Programming File ==
Line 128: Line 148:
 
It will generate three bin files in &lt;SDK folder&gt;\43xxx_Wi-Fi\build folder when build complete.
 
It will generate three bin files in &lt;SDK folder&gt;\43xxx_Wi-Fi\build folder when build complete.
  
#Bootloader: waf.bootloader-NoOS-BCMUSI22.A1.bin&nbsp;
+
#Bootloader: waf.bootloader-NoOS-WISE_1530A1.bin&nbsp;
 
#DCT(&nbsp;Device Configuration Table): DCT.bin:
 
#DCT(&nbsp;Device Configuration Table): DCT.bin:
#Application: snip.gpio-BCMUSI22.A1.bin
+
#Application: snip.gpio-WISE_1530A1.bin
 
 
[[File:WICED 3-bin files.png|RTENOTITLE]]
 
  
=== Combine .bin FIles ===
+
[[File:WICED 3-bin files v02.png|RTENOTITLE]]
  
 
Download and install&nbsp;[https://www.segger.com/downloads/jlink/JLink_Windows_V616j.exe J-Link]&nbsp;software, we need J-Flash tool to&nbsp;combine three bin files for&nbsp;programming.
 
Download and install&nbsp;[https://www.segger.com/downloads/jlink/JLink_Windows_V616j.exe J-Link]&nbsp;software, we need J-Flash tool to&nbsp;combine three bin files for&nbsp;programming.
  
Setp 1: Launch J-Flash and &nbsp;setup
+
=== Launch J-Flash ===
  
 
[[File:WISE-1530 J-Flash launch.png|RTENOTITLE]]
 
[[File:WISE-1530 J-Flash launch.png|RTENOTITLE]]
  
Step 2:&nbsp;
+
=== Open bootloader bin file ===
 +
 
 +
[[File:WISE-1530 J-Flash bootloader v02.png|RTENOTITLE]]
 +
 
 +
=== Merge DCT bin file ===
 +
 
 +
[[File:WISE-1530 J-Flash DCT v02.png|RTENOTITLE]]
 +
 
 +
=== Merge application bin file ===
 +
 
 +
[[File:WISE-1530 J-Flash Application v02.png|RTENOTITLE]]
 +
 
 +
=== Save as a final bin file ===
 +
 
 +
[[File:WISE-1530 J-Flash Save-as v05.png.png|RTENOTITLE]]
 +
 
 +
== Programming&nbsp; ==
 +
 
 +
Generate a programming file then use [[WISE-ED22_User_Manual|WISE-ED22]] to program&nbsp;WISE-1530. User can refer WISE-ED22&nbsp;[http://ess-wiki.advantech.com.tw/view/WISE-ED22_User_Manual#Drag-n-drop_Programming Drag-n-drop Programming]&nbsp;section.
 +
 
 +
== Debug Setting ==
 +
 
 +
Launch&nbsp;a serial port tool(use tera term in this), then setting as below.
 +
 
 +
[[File:Serial tool setting.png|386x314px|Serial tool setting.png]]
 +
 
 +
Press&nbsp;WISE-1530 reset button, the screen will show as below.
 +
 
 +
[[File:WISE 1530 snip.gpio screen.png|586x363px|WISE 1530 snip.gpio screen.png]]
 +
 
 +
= Example =
 +
 
 +
== WISE-1530 Demo(StartKit) ==
 +
 
 +
=== Introduction ===
 +
 
 +
The Demo application has two main function.&nbsp;One is an BLE and WiFi introducer example. It demonstrates GATT database initialization, DCT configuration, processing read/write requests from a BLE client, and sending data to the client. The BLE WiFi Introducer has two components, an app running on a WICED devices, and an app(BLE Scanner) running on Android device. The other is&nbsp;&nbsp;[[IoTGateway/WiseSnail|AgentLite]]&nbsp;exapmle. It&nbsp;demonstrates how to get the sensor value from WISE-1500 sensors and upload data to cloud&nbsp;server.
 +
 
 +
=== Detailed about WISE-1530 Demo ===
 +
 
 +
The detailed behavior about this example is explained as following:
 +
 
 +
*System initiation.
 +
 
 +
:Initiation hardware, Wi-Fi wlan connectivity,&nbsp;button1 thread…etc.<br/>
 +
 
 +
*BLE and WiFi introducer
 +
 
 +
:WISE-1530 will attempt use default SSID and password connection to AP. If success, WISE-1530 will Loop in [[IoTGateway/WiseSnail|AgentLite]]. Otherwise BLE will advertising for set SSID and password. The manipulation follow&nbsp;as below&nbsp;[http://ess-wiki.advantech.com.tw/view/WISE-1530_SDK#Step_by_step_usage_guide Step by step usage guide]&nbsp;.<br/>
 +
 
 +
*Initiation sensor and access data from it.
 +
 
 +
:The TI HDC1050 has been design-in on WISE-1500. It’s a digital humidity sensor with integrated temperature sensor. The HDC1050 is initialized in example and the user can get data of humidity and temperature from it.<br/>
 +
 
 +
*Loop in AgentLite or web service.
 +
 
 +
:When device connect to AP,&nbsp;&nbsp;there are many things needed to do including connected to WISE-PaaS server, keep getting data from sensor and data exchanged through AgentLite. It is going to infinite loop for cloud service.<br/>
 +
 
 +
=== Step by step usage guide ===
 +
 
 +
Step 1: Download and unzip&nbsp;[[Media:WISE_1530_patch_v06.zip|WISE_1530_patch.zip]], then copy WISE_1530 folder to&nbsp;&lt;SDK folder&gt;\43xxx_Wi-Fi\ apps.&nbsp;Project Explorer window will appear&nbsp;&nbsp;WISE_1530 folder. You can press 'F5' to refresh if you do not see.
 +
 
 +
[[File:WISE-1530 folder v01.png.png|RTENOTITLE]]
 +
 
 +
 
 +
 
 +
Step 2: Create a "WISE_1530.StartKit-WISE_1530A1" target file and build the application.
 +
 
 +
[[File:WISE-1530 startkit v2.png]]
 +
 
 +
Step 3: Follow "[http://ess-wiki.advantech.com.tw/view/WISE-1530_SDK#Generate_a_Programming_File Generate a Programming File]" to generate a bin file, &nbsp;then download&nbsp;bin file to WISE-1530. You will see below message in console screen if success.
 +
 
 +
[[File:WISE-1530 Ble Wifi Introducer start v2.png|563x348px|WISE-1530 Ble Wifi Introducer start v2.png]]
 +
 
 +
 
 +
 
 +
Step 4 to step 8 are&nbsp;manipulated on&nbsp;your&nbsp;phone.
 +
 
 +
Step 4:&nbsp;Install and launch the BLE Scanner app.
 +
 
 +
[[File:WISE-1530 BLE scanner app.jpg|RTENOTITLE]]
 +
 
 +
Step 5:Pull down the screen to rescan devices and it will list nearby BLE devices. Find the '''WiFiInt '''device and press CONNECT button.
 +
 
 +
[[File:WISE-1530 BLE scaaner-1.png|244x430px|WISE-1530 BLE scaaner-1.png]]&nbsp;
 +
 
 +
Step 6: If the connection is successful, you can see the picture below. Press the "CUSTOM SERVICE" button.
 +
 
 +
[[File:WISE-1530 BLE scaaner-2.png|244x430px|WISE-1530 BLE scaaner-2.png]]
 +
 
 +
Step 7: Find the UUID: ACA0EF7C-EEAA-48AD-9508-19A6F6B356&nbsp;for SSID characteristic. Press the "W" button to enter input window. Input new SSID name then press the OK button.&nbsp;Last, user can press "R" button to check new SSID name.
 +
 
 +
[[File:WISE-1530 BLE scaaner-3.png|495x431px|WISE-1530 BLE scaaner-3.png]]
 +
 
 +
Step 8:&nbsp; Find the UUID: 40B7DE33-93E4-4C8B-A876-D833B415A6CE&nbsp;for Password characteristic then procedure as Step7.
 +
 
 +
[[File:WISE-1530 BLE scanner-4.png|244x430px|WISE-1530 BLE scanner-4.png]]
 +
 
 +
Step 9:&nbsp;If the join&nbsp;is successful can see network IP&nbsp;on console screen.
 +
 
 +
[[File:WISE-1530 BLE scanner-5.png|563x348px|WISE-1530 BLE scanner-5.png]]
 +
 
 +
Step 10: If Connect to broker and WISESnail success, user can see temperature, humidity, GPIO1 and GPIO2 on cloud server.
 +
 
 +
[[File:WISE-1530 Conn to Broker.jpg|602x372px|WISE-1530 Conn to Broker.jpg]]
 +
 
 +
[[File:WISE-1530 Conn to Snail.jpg|602x372px|WISE-1530 Conn to Snail.jpg]]
 +
 
 +
=== Memory/Flash Usage ===
 +
 
 +
The WISE-1530 has 1 MBytes flash and 256 KBytes RAM. The Start kit flash and memory&nbsp;usage ia as below.
 +
 
 +
----
 +
 
 +
{| border="1" cellspacing="1" cellpadding="1" style="width: 446px;"
 +
|-
 +
| style="width: 252px; text-align: center;" | &nbsp;Module&nbsp;<br/>
 +
| style="width: 85px; text-align: center;" | Flash<br/>
 +
| style="width: 92px; text-align: center;" | Static RAM<br/>
 +
|-
 +
| style="width: 252px;" | Adv_WiseSnail<br/>
 +
| style="width: 85px; text-align: center;" | 18284<br/>
 +
| style="width: 92px; text-align: center;" | 27096
 +
|-
 +
| style="width: 252px;" | Bluetooth_Embedded_Low_Energy_Stack<br/>
 +
| style="width: 85px; text-align: center;" | 154<br/>
 +
| style="width: 92px; text-align: center;" | 57<br/>
 +
|-
 +
| style="width: 252px;" | bluetooth_low_energy<br/>
 +
| style="width: 85px; text-align: center;" | 78493<br/>
 +
| style="width: 92px; text-align: center;" | 9348<br/>
 +
|-
 +
| style="width: 252px;" | button_manager&nbsp;<br/>
 +
| style="width: 85px; text-align: center;" | 588<br/>
 +
| style="width: 92px; text-align: center;" | 4
 +
|-
 +
| style="width: 252px;" | command_console<br/>
 +
| style="width: 85px; text-align: center;" | 3688<br/>
 +
| style="width: 92px; text-align: center;" | 404
 +
|-
 +
| style="width: 252px;" | command_console_wifi&nbsp;<br/>
 +
| style="width: 85px; text-align: center;" | 11146<br/>
 +
| style="width: 92px; text-align: center;" | 0
 +
|-
 +
| style="width: 252px;" | crc<br/>
 +
| style="width: 85px; text-align: center;" | 1060<br/>
 +
| style="width: 92px; text-align: center;" | 0
 +
|-
 +
| style="width: 252px;" | DHCP_Server<br/>
 +
| style="width: 85px; text-align: center;" | 1524<br/>
 +
| style="width: 92px; text-align: center;" | 132
 +
|-
 +
| style="width: 252px;" | DNS<br/>
 +
| style="width: 85px; text-align: center;" | 1724<br/>
 +
| style="width: 92px; text-align: center;" | 44
 +
|-
 +
| style="width: 252px;" | GPIO_button<br/>
 +
| style="width: 85px; text-align: center;" | 120
 +
| style="width: 92px; text-align: center;" | 4
 +
|-
 +
| style="width: 252px;" | Host MCU-family library<br/>
 +
| style="width: 85px; text-align: center;" | 15718<br/>
 +
| style="width: 92px; text-align: center;" | 2492
 +
|-
 +
| style="width: 252px;" | Interrupt Vectors<br/>
 +
| style="width: 85px; text-align: center;" | 388<br/>
 +
| style="width: 92px; text-align: center;" | 0
 +
|-
 +
| style="width: 252px;" | libc<br/>
 +
| style="width: 85px; text-align: center;" | 48018<br/>
 +
| style="width: 92px; text-align: center;" | 3364
 +
|-
 +
| style="width: 252px;" | MQTT_Client<br/>
 +
| style="width: 85px; text-align: center;" | 5643<br/>
 +
| style="width: 92px; text-align: center;" | 736
 +
|-
 +
| style="width: 252px;" | Networking<br/>
 +
| style="width: 85px; text-align: center;" | 5113<br/>
 +
| style="width: 92px; text-align: center;" | 13280<br/>
 +
|-
 +
| style="width: 252px;" | NetX-Duo - Interfaces & Stacks<br/>
 +
| style="width: 85px; text-align: center;" | 0
 +
| style="width: 92px; text-align: center;" | 16
 +
|-
 +
| style="width: 252px;" | Other<br/>
 +
| style="width: 85px; text-align: center;" | 170044<br/>
 +
| style="width: 92px; text-align: center;" | 2930
 +
|-
 +
| style="width: 252px;" | Packet Buffers<br/>
 +
| style="width: 85px; text-align: center;" | 0
 +
| style="width: 92px; text-align: center;" | 23088<br/>
 +
|-
 +
| style="width: 252px;" | platform<br/>
 +
| style="width: 85px; text-align: center;" | 1620<br/>
 +
| style="width: 92px; text-align: center;" | 308<br/>
 +
|-
 +
| style="width: 252px;" | RAM Initialisation<br/>
 +
| style="width: 85px; text-align: center;" | 4028<br/>
 +
| style="width: 92px; text-align: center;" | 0
 +
|-
 +
| style="width: 252px;" | resources<br/>
 +
| style="width: 85px; text-align: center;" | 385936<br/>
 +
| style="width: 92px; text-align: center;" | 0
 +
|-
 +
| style="width: 252px;" | Ring_Buffer<br/>
 +
| style="width: 85px; text-align: center;" | 112<br/>
 +
| style="width: 92px; text-align: center;" | 0
 +
|-
 +
| style="width: 252px;" | Startup Stack & Link Script fill<br/>
 +
| style="width: 85px; text-align: center;" | 144<br/>
 +
| style="width: 92px; text-align: center;" | 25
 +
|-
 +
| style="width: 252px;" | Supplicant - BESL<br/>
 +
| style="width: 85px; text-align: center;" | 3470<br/>
 +
| style="width: 92px; text-align: center;" | 812
 +
|-
 +
| style="width: 252px;" | ThreadX<br/>
 +
| style="width: 85px; text-align: center;" | 8596<br/>
 +
| style="width: 92px; text-align: center;" | 400
 +
|-
 +
| style="width: 252px;" | TLV<br/>
 +
| style="width: 85px; text-align: center;" | 28
 +
| style="width: 92px; text-align: center;" | 0
 +
|-
 +
| style="width: 252px;" | WICED<br/>
 +
| style="width: 85px; text-align: center;" | 5452
 +
| style="width: 92px; text-align: center;" | 1040
 +
|-
 +
| style="width: 252px;" | WICED_Bluetooth_Firmware_Driver<br/>
 +
| style="width: 85px; text-align: center;" | 36692<br/>
 +
| style="width: 92px; text-align: center;" | 0
 +
|-
 +
| style="width: 252px;" | wiced_log<br/>
 +
| style="width: 85px; text-align: center;" | 290
 +
| style="width: 92px; text-align: center;" | 1104
 +
|-
 +
| style="width: 252px;" | wifi_utils<br/>
 +
| style="width: 85px; text-align: center;" | 1082
 +
| style="width: 92px; text-align: center;" | 36
 +
|-
 +
| style="width: 252px;" | WWD<br/>
 +
| style="width: 85px; text-align: center;" | 20429<br/>
 +
| style="width: 92px; text-align: center;" | 3176
 +
|-
 +
| style="width: 252px; background-color: rgb(255, 255, 51);" | TOTAL (bytes)&nbsp;<br/>
 +
| style="width: 85px; background-color: rgb(255, 255, 0); text-align: center;" | 825556<br/>
 +
| style="width: 92px; background-color: rgb(255, 255, 0); text-align: center;" | 89896<br/>
 +
|}
 +
 
 +
== I/O Test (factory) ==
 +
 
 +
=== Introduction ===
 +
 
 +
The I/O Test application is a WISE-1530 I/O testing example. It's need extra I/O board(WISE-ED30) to plug in to WISE-1500. The hardware setup as below.&nbsp;This&nbsp;instance could test m2.com I/O that WISE-1530 supported([[MCU/WISE-1530|M2.COM Pinout]]), include GPIO, ADC, I2C. SPI...etc interface. It used WICED SDK API to read and write I/O.
 +
 
 +
[[File:WISE-1530 IO testing setup v3.png|RTENOTITLE]]
 +
 
 +
=== I/O Test Use WICED API ===
 +
 
 +
Step 1: Download and unzip&nbsp;[[Media:WISE_1530_patch_v06.zip|WISE_1530_patch.zip]], then copy WISE_1530 folder to&nbsp;&lt;SDK folder&gt;\43xxx_Wi-Fi\ apps.
 +
 
 +
Step 2: I/O test source code please refer as below files.
 +
 
 +
[[File:WISE-1530 IO testing src code v2.png|RTENOTITLE]]
 +
 
 +
 
 +
 
 +
 
 +
 
 +
Step 3:&nbsp;Create a "WISE_1530.factory-WISE_1530A1" target file and build the application. Download firmware to WISE-1530 then press reset button.
 +
 
 +
[[File:WISE-1530 IO testing target file v2.png|RTENOTITLE]]
 +
 
 +
Step 4: You will see below message in console screen if success. Input '1' to select I/O Function Test, the screen will show I/O test items.Input 1~7 to test I/0 and 0 to return previous page.&nbsp;
 +
 
 +
[[File:WISE-1530 IO testing screen.png|553x384px|WISE-1530 IO testing screen.png]]
  
[[File:WISE-1530 J-Flash bootloader.png]]
+
=== I/O Test Use SUSI&nbsp;API ===
  
Step 3:
+
The I/O Test example also support SUSI API (please refer [http://ess-wiki.advantech.com.tw/wiki/images/f/f0/SUSI4_User_Manual.pdf SUSI_API]).The SUSI support GPIO, I2C, SPI, ADC and PWM APIs.&nbsp;&nbsp;You can simple revise setting to accomplish SUSI API I/O Test.
  
[[File:WISE-1530 J-Flash DCT.png]]
+
Step 1: The SUSI API I/O test source code are&nbsp;as below files.
  
Step 4:
+
[[File:WISE-1530 SUSI src code.png|RTENOTITLE]]
  
[[File:WISE-1530 J-Flash Application.png]]
+
Step 2: Open SimpleCli.mk and change USE_SUSI_API to 1.
  
Step 5:
+
[[File:WISE-1530 SUSU setting.png|RTENOTITLE]]
  
[[File:WISE-1530 J-Flash Save-as.png]]
+
Step 3: Double click "WISE_1530.factory-WISE_1530A1" target file and build the application. Then download the firmware to WISE-1530, you can see the screen that same as I/O Function Test.

Latest revision as of 05:38, 25 February 2021

Overview

WISE-1530 is used Cypress's WICED®  SDKs to develop Wi-Fi and BLE application. WISE-1530 SDK use C/C++ language Runs on Windows®, Mac® OS X®, and Linux® through Eclipse®-based integrated development environment (IDE).

Single installer package with support for:

  • ​Wi-Fi + Bluetooth combo solution
    • Wi-Fi solutions
    • Bluetooth (Basic Rate, Enhanced Data Rate and Bluetooth Low Energy)
  • Sample applications for many popular use cases like
    • Connecting to cloud services
    • Low-power BLE-based sensors and beacons
    • Smart home gateways
    • BLE-WiFi introducer
  • Code snippets to understand WICED APIs

User can refer to WICED Software to get more information.

Setup Development Environment

Preparing for Hardware

The user needs to prepare for hardware as following:

  • WISE-1530, WISE-1500 and WISE-ED22.
  • 802.11b/g/n (2.4 GHz) Wireless Access Point (AP).
  • PC Runs on Windows®, Mac® OS X®, and Linux®

Please refer to the following steps for setup a WISE series of boards before using WISE-1530.

Step01: Please prepare boards as below.

          RTENOTITLE          

 WISE-1530

 WISE-1500

 WISE-ED22

 WISE-ED22 reset button

 CN2 on WISE-1500

 SW3 on WISE-1500    

  • Pleas check pin1 and pin2 to “OFF” as default.
  • Switch pin2 to decide whether running “backup to default” while device

booting. “ON”: enabled, “OFF”: disable

 WISE-1530 reset button, one button on WISE-1500 and the other on WISE-ED22

⑧ Micro USB connector    

  • Drag-n-drop programming
  • Serial port and debugging
  • Power supplies for UART1 debug port

 RF connector

Power connector


Step02: Connect the WISE-ED22 to PC using micro-USB cable(Please refer to WISE-ED22 Connection with target board).

  • The device will be visible in the Device Manager as below.

          Mbed  uart.png

WICED Studio

The user can refer to the following steps for setup WICED Studio with WISE-1530 SDK.

Windows Install

  1. Download WICED-Studio_SDK download
  2. Extract the installer exe from the zip file to temp folder on your computer; do not execute the installer from the zip file
  3. Double click the installer exe to install WICED Studio as below picture

WICED installer 1.png

WICED installer 2.png

WICED installer 3-1.png

WICED installer 4.png

WICED installer 5.png

  1. After installation in completed, launch WICED Studio IDE from shortcut on desktop
  2. When you see the Select WICED Platform page, choose the 43xxx_Wi-Fi item. You can change in "WICED Platform"  in SDK toolbar also.


WICED installer 6.png

Copy patch file

  1. Download and unzip WM-BN-BM-22_SDK_5.1.x_platform_patch.zip
  2. Copy platforms and WICED folders to <SDK folder>\43xxx_Wi-Fi\ and select replace

Build Source File

Create a "Make Target" file

       Step1: In Make Target window click mouse right button

       Step2: Select New...

WICED make target new.png

       Step3: Type "snip.gpio-WISE_1530A1"

RTENOTITLE

Field explanation: snip.gpio-WISE_1530A1

  • snip.gpio: application project name
  • WISE_1530A1: platform name, for WISE-1530  A1 version platform don't change this field.

*The platform name had rename to WISE_1530A1. Please the following picture WISE_1530 replace to WISE_1530A1.

RTENOTITLE



​       

Build Project

Double click "Make Target" file to build project.

RTENOTITLE

It is build complete when you see below 

RTENOTITLE

Generate a Programming File

It will generate three bin files in <SDK folder>\43xxx_Wi-Fi\build folder when build complete.

  1. Bootloader: waf.bootloader-NoOS-WISE_1530A1.bin 
  2. DCT( Device Configuration Table): DCT.bin:
  3. Application: snip.gpio-WISE_1530A1.bin

RTENOTITLE

Download and install J-Link software, we need J-Flash tool to combine three bin files for programming.

Launch J-Flash

RTENOTITLE

Open bootloader bin file

RTENOTITLE

Merge DCT bin file

RTENOTITLE

Merge application bin file

RTENOTITLE

Save as a final bin file

RTENOTITLE

Programming 

Generate a programming file then use WISE-ED22 to program WISE-1530. User can refer WISE-ED22 Drag-n-drop Programming section.

Debug Setting

Launch a serial port tool(use tera term in this), then setting as below.

Serial tool setting.png

Press WISE-1530 reset button, the screen will show as below.

WISE 1530 snip.gpio screen.png

Example

WISE-1530 Demo(StartKit)

Introduction

The Demo application has two main function. One is an BLE and WiFi introducer example. It demonstrates GATT database initialization, DCT configuration, processing read/write requests from a BLE client, and sending data to the client. The BLE WiFi Introducer has two components, an app running on a WICED devices, and an app(BLE Scanner) running on Android device. The other is  AgentLite exapmle. It demonstrates how to get the sensor value from WISE-1500 sensors and upload data to cloud server.

Detailed about WISE-1530 Demo

The detailed behavior about this example is explained as following:

  • System initiation.
Initiation hardware, Wi-Fi wlan connectivity, button1 thread…etc.
  • BLE and WiFi introducer
WISE-1530 will attempt use default SSID and password connection to AP. If success, WISE-1530 will Loop in AgentLite. Otherwise BLE will advertising for set SSID and password. The manipulation follow as below Step by step usage guide .
  • Initiation sensor and access data from it.
The TI HDC1050 has been design-in on WISE-1500. It’s a digital humidity sensor with integrated temperature sensor. The HDC1050 is initialized in example and the user can get data of humidity and temperature from it.
  • Loop in AgentLite or web service.
When device connect to AP,  there are many things needed to do including connected to WISE-PaaS server, keep getting data from sensor and data exchanged through AgentLite. It is going to infinite loop for cloud service.

Step by step usage guide

Step 1: Download and unzip WISE_1530_patch.zip, then copy WISE_1530 folder to <SDK folder>\43xxx_Wi-Fi\ apps. Project Explorer window will appear  WISE_1530 folder. You can press 'F5' to refresh if you do not see.

RTENOTITLE


Step 2: Create a "WISE_1530.StartKit-WISE_1530A1" target file and build the application.

WISE-1530 startkit v2.png

Step 3: Follow "Generate a Programming File" to generate a bin file,  then download bin file to WISE-1530. You will see below message in console screen if success.

WISE-1530 Ble Wifi Introducer start v2.png


Step 4 to step 8 are manipulated on your phone.

Step 4: Install and launch the BLE Scanner app.

RTENOTITLE

Step 5:Pull down the screen to rescan devices and it will list nearby BLE devices. Find the WiFiInt device and press CONNECT button.

WISE-1530 BLE scaaner-1.png 

Step 6: If the connection is successful, you can see the picture below. Press the "CUSTOM SERVICE" button.

WISE-1530 BLE scaaner-2.png

Step 7: Find the UUID: ACA0EF7C-EEAA-48AD-9508-19A6F6B356 for SSID characteristic. Press the "W" button to enter input window. Input new SSID name then press the OK button. Last, user can press "R" button to check new SSID name.

WISE-1530 BLE scaaner-3.png

Step 8:  Find the UUID: 40B7DE33-93E4-4C8B-A876-D833B415A6CE for Password characteristic then procedure as Step7.

WISE-1530 BLE scanner-4.png

Step 9: If the join is successful can see network IP on console screen.

WISE-1530 BLE scanner-5.png

Step 10: If Connect to broker and WISESnail success, user can see temperature, humidity, GPIO1 and GPIO2 on cloud server.

WISE-1530 Conn to Broker.jpg

WISE-1530 Conn to Snail.jpg

Memory/Flash Usage

The WISE-1530 has 1 MBytes flash and 256 KBytes RAM. The Start kit flash and memory usage ia as below.


 Module 
Flash
Static RAM
Adv_WiseSnail
18284
27096
Bluetooth_Embedded_Low_Energy_Stack
154
57
bluetooth_low_energy
78493
9348
button_manager 
588
4
command_console
3688
404
command_console_wifi 
11146
0
crc
1060
0
DHCP_Server
1524
132
DNS
1724
44
GPIO_button
120 4
Host MCU-family library
15718
2492
Interrupt Vectors
388
0
libc
48018
3364
MQTT_Client
5643
736
Networking
5113
13280
NetX-Duo - Interfaces & Stacks
0 16
Other
170044
2930
Packet Buffers
0 23088
platform
1620
308
RAM Initialisation
4028
0
resources
385936
0
Ring_Buffer
112
0
Startup Stack & Link Script fill
144
25
Supplicant - BESL
3470
812
ThreadX
8596
400
TLV
28 0
WICED
5452 1040
WICED_Bluetooth_Firmware_Driver
36692
0
wiced_log
290 1104
wifi_utils
1082 36
WWD
20429
3176
TOTAL (bytes) 
825556
89896

I/O Test (factory)

Introduction

The I/O Test application is a WISE-1530 I/O testing example. It's need extra I/O board(WISE-ED30) to plug in to WISE-1500. The hardware setup as below. This instance could test m2.com I/O that WISE-1530 supported(M2.COM Pinout), include GPIO, ADC, I2C. SPI...etc interface. It used WICED SDK API to read and write I/O.

RTENOTITLE

I/O Test Use WICED API

Step 1: Download and unzip WISE_1530_patch.zip, then copy WISE_1530 folder to <SDK folder>\43xxx_Wi-Fi\ apps.

Step 2: I/O test source code please refer as below files.

RTENOTITLE



Step 3: Create a "WISE_1530.factory-WISE_1530A1" target file and build the application. Download firmware to WISE-1530 then press reset button.

RTENOTITLE

Step 4: You will see below message in console screen if success. Input '1' to select I/O Function Test, the screen will show I/O test items.Input 1~7 to test I/0 and 0 to return previous page. 

WISE-1530 IO testing screen.png

I/O Test Use SUSI API

The I/O Test example also support SUSI API (please refer SUSI_API).The SUSI support GPIO, I2C, SPI, ADC and PWM APIs.  You can simple revise setting to accomplish SUSI API I/O Test.

Step 1: The SUSI API I/O test source code are as below files.

RTENOTITLE

Step 2: Open SimpleCli.mk and change USE_SUSI_API to 1.

RTENOTITLE

Step 3: Double click "WISE_1530.factory-WISE_1530A1" target file and build the application. Then download the firmware to WISE-1530, you can see the screen that same as I/O Function Test.