Difference between revisions of "WISE-1530 SDK"
Erick.huang (talk | contribs) |
Erick.huang (talk | contribs) |
||
Line 76: | Line 76: | ||
[[File:Serial tool setting.png|RTENOTITLE]] | [[File:Serial tool setting.png|RTENOTITLE]] | ||
− | *The screen will show as below(use [http://ess-wiki.advantech.com.tw/view/WISE-1530_SDK# | + | *The screen will show as below(use [http://ess-wiki.advantech.com.tw/view/WISE-1530_SDK#WISE-1530_Demo.28StartKit.29 StartKit ]example). |
[[File:WISE 1530 start screen.png|610x363px|WISE 1530 start screen.png]] | [[File:WISE 1530 start screen.png|610x363px|WISE 1530 start screen.png]] |
Revision as of 06:31, 27 October 2017
Contents
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® 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 running the Microsoft Windows 7 operating systems
Please refer to the following steps for setup a WISE series of boards before using WISE-1530.
Step01: Please prepare boards as below.
① 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 cable
Step02: Connect the WISE-ED22 to PC using micro-USB cable(Please refer to Connection with target board).
- Install Driver ( Download latest driver )
- The device will be visible in the Device Manager as below, user can use serial tools (putty, tera term ...etc.) to key-in command.
- The serial tools setting as below.
- The screen will show as below(use StartKit example).
WICED Studio
The user can refer to the following steps for setup WICED Studio with WISE-1530 SDK.
Windows Install
- Download WICED-Studio-5.2.0.22-IDE-Installer.zip
- 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
- After installation in completed, launch WICED Studio IDE from shortcut on desktop
- When you see the Select WICED Platform page, choose the 43xxx_Wi-Fi item. You can change in "WICED Platform" in SDK toolbar also.
Copy patch file
- Download and unzip WISE-1530_SDK_4.1.8_platform_patch.zip
- 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...
Step3: Type "snip.gpio-WISE_1530"
Field explanation: snip.gpio-WISE_1530
- snip.gpio: application project name
- WISE_1530: platform name, for WISE-1530 platform don't change this field
Build Project
Double click "Make Target" file to build project.
It is build complete when you see below
Generate a Programming File
It will generate three bin files in <SDK folder>\43xxx_Wi-Fi\build folder when build complete.
- Bootloader: waf.bootloader-NoOS-WISE_1530.bin
- DCT( Device Configuration Table): DCT.bin:
- Application: snip.gpio-WISE_1530.bin
Download and install J-Link software, we need J-Flash tool to combine three bin files for programming.
Launch J-Flash
Open bootloader bin file
Merge DCT bin file
Merge application bin file
Save as a final bin file
Programming
Generate a programming file then use WISE-ED22 to program WISE-1530. User can refer WISE-ED22 Drag-n-drop Programming section.
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 Adv_patch.zip, then copy Adv folder to <SDK folder>\43xxx_Wi-Fi\ apps. Project Exploreer window will appear Adv folder. You can press 'F5' to refresh if you do not see.
Step 2: Create a "Adv.StartKit-WISE_1530" target file and build the application.
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.
Step 4 to step 8 are manipulated in cell phone.
Step 4: Install and launch the BLE Scanner app.
Step 5: Drop the screen to rescan device, it will list out BLE device nearby. Find the WiFiInt device and press CONNECT button.
Step 6: If the connection is successful can see the below picture then press "CUSTOM SERVICE" button.
Step 7: Find the UUID: ACA0EF7C-EEAA-48AD-9508-19A6F6B356CE 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.
Step 8: Find the UUID: 40B7DE33-93E4-4C8B-A876-D833B415A6CE for Password characteristic then procedure as Step5.
Step 9: If the join is successful can see network IP on console screen.