background image

 

 

BLE Indoor Positioning with PSoC

 

6 MCU with BLE Connectivity 

 

www.cypress.com

 

Document No. 002-17647 Rev.** 

iOS 

 

 

Android 

 

Terminal Tool 

This example uses a terminal window. You must have terminal software, such as Tera Term or PuTTy. 

Operation 

You can connect to the IPS Server device with CySmart or any BLE 4.1- or BLE 4.2-compatible device configured in the GAP 
Central role and capable of discovering IPS. To connect to the IPS Server, press 

SW2

 on 

CY8CKIT-062 PSoC 6 BLE Pioneer 

Kit

 to switch to Connectable Advertisement mode. The blue LED indicates that the Connectable Advertisement mode is enabled. 

To accept the password displayed on the HyperTerminal, press 

SW2

 on the 

CY8CKIT-062 PSoC 6 BLE Pioneer Kit

 

or press ‘

y

’ 

on the HyperTerminal. Optionally, the example project can use the legacy Security Mode 1 Level 3 (Authenticated pairing with 
encryption). 

Operation Steps 

1.  Plug the CY8CKIT-062-

BLE kit board into your computer’s USB port. 

2.  Open a terminal window and perform following configuration: Baud rate 

– 115200, Parity – None, Stop bits – 1, Flow control 

– XON/XOFF. These settings must match the configuration of the PSoC Creator UART Component in the project. 

3.  Build the project and program it into the PSoC 6 MCU device. Choose 

Debug

 > 

Program

. For more information on device 

programming, see PSoC Creator Help. Flash for both CPUs is programmed in a single program operation. 

4.  Observe the blue LED blinks while the device is advertising, and the output in the terminal window.  

5.  Do the following to test example, using the CySmart Host Emulation Tool application as Indoor Positioning Service Client:  

a.  Connect the BLE Dongle to your Windows PC. Wait for the driver installation to complete, if necessary. 
b.  Right-click the BLE Component and select Launch CySmart to launch the CySmart Host Emulation Tool. Alternatively, 

you can navigate to 

Start 

>

 Programs 

Cypress

 and click 

CySmart

c. 

CySmart automatically detects the BLE dongle connected to the PC. Click 

Refresh

 if the BLE dongle does not appear 

in the 

Select BLE Dongle Target

 pop-up window. Click 

Connect

, as shown in 

Figure 1

. 

Summary of Contents for CY8CKIT-062-BLE

Page 1: ...d the red LED indicates the connected state This example supports all the GATT sub procedures defined in the IPS specification Requirements Tool PSoC Creator 4 2 Programming Language C Arm GCC 5 4 201...

Page 2: ...t 2 Open a terminal window and perform following configuration Baud rate 115200 Parity None Stop bits 1 Flow control XON XOFF These settings must match the configuration of the PSoC Creator UART Compo...

Page 3: ...riate message You must upgrade the firmware before you can complete this step Follow the instructions in the window to update the dongle firmware d Select Configure Master Settings and then click Rest...

Page 4: ...rt BLE advertisement if no device is connected or device is in Hibernate mode red LED is on Otherwise skip this step g Observe the simulated Latitude and Longitude values in the HyperTerminal program...

Page 5: ...formats is listed in Table 1 Figure 5 CySmart Window Table 1 Accordance Between Different Formats of Latitude and Longitude Latitude Longitude 49 808800 0x46D6D4A5 24 041500 0x11189F1B 49 808804 0x46D...

Page 6: ...establish a BLE connection between the CySmart Host Emulation Tool and your device Figure 6 CySmart Device Discovery and Connection l Click Pair Click Yes to a pairing request received from the peer d...

Page 7: ...BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity www cypress com Document No 002 17647 Rev 7 Figure 8 Value Writing...

Page 8: ...for CySmart mobile app mentioned in step 5 For more details see the Android and iOS CySmart User Guide 7 Use the UART debug port to view verbose messages a The code example ships with the UART debug...

Page 9: ...us 140001 pending 1 Store bonding data status 140001 pending 1 Store bonding data status 0 pending 0 CY_BLE_EVT_GATTS_READ_CHAR_VAL_ACCESS_REQ handle 3 CY_BLE_EVT_GATTS_READ_CHAR_VAL_ACCESS_REQ handle...

Page 10: ...used to receive events specific to the service s attribute operations The CYBLE_EVT_STACK_ON event indicates successful initialization of the BLE Stack After this event is received the Component star...

Page 11: ...irmware controlled digital output pins that control LEDs General tab Uncheck HW connection Drive mode Strong Drive SysInt SW2_Int This Component is configured to extract interrupts from GlobalSignal D...

Page 12: ...BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity www cypress com Document No 002 17647 Rev 12 Figure 12 GATT Settings...

Page 13: ...LE Indoor Positioning with PSoC 6 MCU with BLE Connectivity www cypress com Document No 002 17647 Rev 13 Figure 13 GAP Settings Figure 14 GAP Settings Peripheral configuration 0 Advertisement Settings...

Page 14: ...BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity www cypress com Document No 002 17647 Rev 14 Figure 15 GAP Settings Peripheral configuration 0 Advertisement Packet...

Page 15: ...BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity www cypress com Document No 002 17647 Rev 15 Figure 16 GAP Settings Peripheral configuration 1 Advertisement Settings...

Page 16: ...BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity www cypress com Document No 002 17647 Rev 16 Figure 17 GAP Settings Peripheral configuration 1 Advertisement Packet...

Page 17: ...gle core Complete Component on CM0 only CM0 will be used Single core Complete Component on CM4 only CM4 will be used Dual core Controller on CM0 Host and Profiles on CM4 CM0 and CM4 will be used CM0 f...

Page 18: ...ption Figure 19 Select CPU Core 2 Identify the CPU on which host files will run In the workspace explorer panel right click Host Files choose Properties Set the Cores property corresponding to the CPU...

Page 19: ...on interrupts to the appropriate core in DWR Interrupts tab For Single core Complete Component on CM0 option BLE_bless_isr and peripheral interrupts on CM0 For Single core Complete Component on CM4 op...

Page 20: ...U System Design Presents the theory and design considerations related to this code example Software and Drivers CySmart Bluetooth LE Test and Debug Tool CySmart is a Bluetooth LE host emulation tool f...

Page 21: ...ypress com Document No 002 17647 Rev 21 Document History Document Title CE217647 BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity Document Number 002 17647 Revision ECN Orig of Change Subm...

Page 22: ...compilation of the Software is prohibited TO THE EXTENT PERMITTED BY APPLICABLE LAW CYPRESS MAKES NO WARRANTY OF ANY KIND EXPRESS OR IMPLIED WITH REGARD TO THIS DOCUMENT OR ANY SOFTWARE OR ACCOMPANYI...

Reviews: