Download Print this page
Cypress CY8CKIT-062-BLE Manual

Cypress CY8CKIT-062-BLE Manual

Ble indoor positioning with psoc 6 mcu with ble connectivity
Hide thumbs Also See for CY8CKIT-062-BLE:

Advertisement

Quick Links

Objective
This Bluetooth Low Energy (BLE) example project demonstrates how to create an indoor navigation system using the BLE
broadcasting mode that can be configured over a GATT connection.
Overview
This example project configures the BLE Pioneer Kit as a time-multiplexed broadcaster and a connectable Indoor Positioning
Service (IPS) server. The GAP role is set to the broadcaster or peripheral and the GATT role set to the server. By default, the
device broadcasts the IPS data and then switches over to Connectable Advertisement mode when a button is pressed. The IPS
data broadcast interval is 100 ms, and the IPS Broadcast mode is indicated by the blue LED on the BLE Pioneer Kit. The
connectable advertisement interval (to configure IPS data over GATT connection) is set to 20-30 ms for 180 seconds and the
BLE device switches over to IPS Broadcast mode on an advertisement timeout or when a button is pressed. The green LED on
the BLE Pioneer Kit indicates the Connectable Advertisement mode and the red LED indicates the connected state.
This example supports all the GATT sub-procedures defined in the IPS specification.
Requirements
PSoC Creator™ 4.2
Tool:
Programming Language: C (Arm
Associated Parts: All
PSoC 6
Related Hardware:
CY8CKIT-062-BLE PSoC 6 BLE Pioneer Kit
Hardware Setup
This example uses the kit's default configuration. See the
Connect the BLE Pioneer Kit to the computer's USB port.
1.
2.
Connect the BLE Dongle to one of the USB ports on the computer.
LED Behavior
If the V
voltage is set to lesser than 2.7 V in the DWR settings System tab, only the red LED is used. The red LED blinks to
DDD
indicate that the device is advertising. The red LED is OFF when a device is connected to a peer device. When the device is in
Hibernate mode, the red LED stays ON.
LED behavior for V
voltage greater than 2.7 V is described in the
DDD
Software Setup
BLE Host Emulation Tool
This example requires the CySmart application. Download and install either the
the CySmart app for
iOS
or Android. You can test behavior with any of the two options, but the CySmart app is simpler. Scan
one of the following QR codes from your mobile phone to download the CySmart app.
www.cypress.com
®
GCC 5.4-2016-q2-update)
BLE parts
kit guide
Document No. 002-17647 Rev.**
CE217647 - BLE Indoor Positioning with
PSoC 6 MCU with BLE Connectivity
to ensure the kit is configured correctly.
Operation
section.
CySmart Host Emulation Tool
PC application or
1

Advertisement

loading
Need help?

Need help?

Do you have a question about the CY8CKIT-062-BLE and is the answer not in the manual?

Questions and answers

Summary of Contents for Cypress CY8CKIT-062-BLE

  • Page 1 GCC 5.4-2016-q2-update) Associated Parts: All PSoC 6 BLE parts Related Hardware: CY8CKIT-062-BLE PSoC 6 BLE Pioneer Kit Hardware Setup This example uses the kit’s default configuration. See the kit guide to ensure the kit is configured correctly. Connect the BLE Pioneer Kit to the computer’s USB port.
  • Page 2: Operation

    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. 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.
  • Page 3 Select Configure Master Settings and then click Restore Defaults, as Figure 2 shows. Then click OK. Figure 2. CySmart Master Settings Configuration Set the Duplicate Filter Policy = Disable duplicate filtering in the Master Configuration > Scan parameters window. See Figure www.cypress.com Document No. 002-17647 Rev.**...
  • Page 4 Observe the simulated Latitude and Longitude values in the HyperTerminal program. On the CySmart Host Emulation Tool, click Start Scan. Your device name (configured as IPS) should appear in the Discovered devices list, as Figure 4 shows. Figure 4. CySmart Device Discovery and Connection www.cypress.com Document No. 002-17647 Rev.**...
  • Page 5 0x46D6D635 24.041533 0x1118A0AB 49.808821 0x46D6D699 24.041542 0x1118A10F 49.808825 0x46D6D6FD 24.041550 0x1118A173 49.808829 0x46D6D761 24.041559 0x1118A1D7 49.808834 0x46D6D7C5 24.041567 0x1118A23B 49.808838 0x46D6D829 24.041575 0x1118A29F 49.808842 0x46D6D88D 24.041584 0x1118A303 49.808846 0x46D6D8F1 24.041592 0x1118A367 49.808850 0x46D6D955 24.041601 0x1118A3CB www.cypress.com Document No. 002-17647 Rev.**...
  • Page 6 Change the Indoor Positioning Configuration characteristic value to 51 and click Write Value, then click Read Value. Observe the result in CySmart and HyperTerminal (Figure 8). Value 51 sets only the Latitude, Longitude, and Floor Number in the advertisement packet. For details, see Indoor Positioning Service Specification. www.cypress.com Document No. 002-17647 Rev.**...
  • Page 7 BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity Figure 8. Value Writing www.cypress.com Document No. 002-17647 Rev.**...
  • Page 8 CY_BLE_EVT_SET_TX_PWR_COMPLETE CY_BLE_EVT_GAPP_ADVERTISEMENT_START_STOP, state: 2 Latitude - 49.808804. Longitude - 24.041500 CY_BLE_EVT_GAP_KEYS_GEN_COMPLETE Latitude - 49.808808. Longitude - 24.041500 Latitude - 49.808813. Longitude - 24.041500 Latitude - 49.808817. Longitude - 24.041500 Latitude - 49.808821. Longitude - 24.041500 www.cypress.com Document No. 002-17647 Rev.**...
  • Page 9 CY_BLE_EVT_GAP_DEVICE_DISCONNECTED: bdHandle=10, reason=13, status=0 CY_BLE_EVT_GAPP_ADVERTISEMENT_START_STOP, state: 2 Latitude - 49.808842. Longitude - 24.041500 Latitude - 49.808846. Longitude - 24.041500 Latitude - 49.808850. Longitude - 24.041500 Latitude - 49.808854. Longitude - 24.041500 Latitude - 49.808859. Longitude - 24.041500 www.cypress.com Document No. 002-17647 Rev.**...
  • Page 10 P5[0] \UART_DEB:tx\ P5[1] \UART_DEB:rts\ P5[2] \UART_DEB:cts\ P5[3] Disconnect_LED P0[3] The red color of the RGB LED Advertising_LED P1[1] The green color of the RGB LED Simulation_LED P11[1] The blue color of the RGB LED P0[4] www.cypress.com Document No. 002-17647 Rev.**...
  • Page 11 The BLE Component is configured as the IPS Server in the GAP Peripheral role with the settings shown in Figure 11 to Figure 18. The Custom Profile is used as there is no defined Indoor Positioning Profile specification defined. Figure 11. General Settings www.cypress.com Document No. 002-17647 Rev.**...
  • Page 12 BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity Figure 12. GATT Settings www.cypress.com Document No. 002-17647 Rev.**...
  • Page 13 BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity Figure 13. GAP Settings Figure 14. GAP Settings: Peripheral configuration 0  Advertisement Settings www.cypress.com Document No. 002-17647 Rev.**...
  • Page 14 BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity Figure 15. GAP Settings: Peripheral configuration 0  Advertisement Packet www.cypress.com Document No. 002-17647 Rev.**...
  • Page 15 BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity Figure 16. GAP Settings: Peripheral configuration 1  Advertisement Settings www.cypress.com Document No. 002-17647 Rev.**...
  • Page 16 BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity Figure 17. GAP Settings: Peripheral configuration 1  Advertisement Packet www.cypress.com Document No. 002-17647 Rev.**...
  • Page 17 All application host-files must be run on the host core.  The BLE subsystem (BLESS) interrupt must be assigned to the core where the controller runs.  All additional interrupts (SW2, etc.) used in the example must be assigned to the host core. www.cypress.com Document No. 002-17647 Rev.**...
  • Page 18 For Single core (Complete Component on CM0+) option – CM0+  For Single core (Complete Component on CM4) option – CM4  For Dual core (Controller on CM0+, Host and Profiles on CM4) option – CM4 www.cypress.com Document No. 002-17647 Rev.**...
  • Page 19 For Single core (Complete Component on CM4) option: BLE_bless_isr and peripheral interrupts on CM4  For Dual core (Controller on CM0+, Host and Profiles on CM4) option: BLE_bless_isr interrupt on CM0+, other peripheral interrupts on CM4 Figure 21. Assign Interrupts www.cypress.com Document No. 002-17647 Rev.**...
  • Page 20: Related Documents

    Reusing This Example This example is designed for the CY8CKIT-062-BLE pioneer kit. To port the design to a different PSoC 6 MCU device, kit, or both, change the target device using the Device Selector and update the pin assignments in the Design Wide Resources Pins settings as needed.
  • Page 21: Document History

    BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity Document History Document Title: CE217647 - BLE Indoor Positioning with PSoC 6 MCU with BLE Connectivity Document Number: 002-17647 Revision Orig. of Submission Description of Change Change Date 6092398 NPAL 06/05/2018 New spec www.cypress.com Document No. 002-17647 Rev.**...
  • Page 22: Worldwide Sales And Design Support

    Cypress is not liable, in whole or in part, and you shall and hereby do release Cypress from any claim, damage, or other liability arising from or related to all Unintended Uses of Cypress products.