22
ATWILC3000 ATWILC3000 BlueKitchen BTstack User Guide Introduction The ATWILC3000 is a single chip IEEE ® 802.11 b/g/n RF/Baseband/Medium Access Control (MAC) link controller and Bluetooth ® 5.0 compliant module. This single-chip solution contains separate Bluetooth and WLAN subsystems that share a single RF section with Bluetooth/Wi-Fi ® coexistence handled automatically. Each subsystem has its own physical interface: WLAN control and data use Secure Digital Input Output (SDIO)/Serial Peripheral Interface (SPI), while Bluetooth is available via the UART interface. Both subsystems require separate protocol stacks. For WLAN, a TCP/IP stack with IEEE 802.11 driver for the ATWILC3000 is used, while Bluetooth uses a Bluetooth stack. This document describes the use of “BTstack”, a third party Bluetooth Stack provided by BlueKitchen GmbH. BTstack is free for evaluation and non-commercial use. For license information, contact BlueKitchen GmbH. This document also provides a quick overview on the use of the ATWILC3000 as a BLE Peripheral. BTstack is not limited to this usage and more information can be found in the API documentation and in the BTstack manual, available at: https://bluekitchen-gmbh.com/btstack/. Note:  1. The BlueKitchen BLE stack is supported in ATWILC RTOS Driver Release 4.03 and available from Advanced Software Framework (ASF) 3.42 and later. 2. For more information on BlueKitchen GmbH contact: BlueKitchen GmbH Engelstrasse 9 8004 Zurich Switzerland Web: https://bluekitchen-gmbh.com E-mail: [email protected] © 2018 Microchip Technology Inc. User Guide DS50002795A-page 1

ATWILC3000 BlueKitchen BTstack User Guideww1.microchip.com/downloads/en/DeviceDoc/ATWILC3000-Blue...ATWILC3000 ATWILC3000 BlueKitchen BTstack User Guide Introduction The ATWILC3000

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

  • ATWILC3000 ATWILC3000 BlueKitchen BTstack User Guide

    Introduction

    The ATWILC3000 is a single chip IEEE® 802.11 b/g/n RF/Baseband/Medium Access Control (MAC) linkcontroller and Bluetooth® 5.0 compliant module. This single-chip solution contains separate Bluetooth andWLAN subsystems that share a single RF section with Bluetooth/Wi-Fi® coexistence handledautomatically.

    Each subsystem has its own physical interface: WLAN control and data use Secure Digital Input Output(SDIO)/Serial Peripheral Interface (SPI), while Bluetooth is available via the UART interface. Bothsubsystems require separate protocol stacks. For WLAN, a TCP/IP stack with IEEE 802.11 driver for theATWILC3000 is used, while Bluetooth uses a Bluetooth stack.

    This document describes the use of “BTstack”, a third party Bluetooth Stack provided by BlueKitchenGmbH. BTstack is free for evaluation and non-commercial use. For license information, contactBlueKitchen GmbH.

    This document also provides a quick overview on the use of the ATWILC3000 as a BLE Peripheral.BTstack is not limited to this usage and more information can be found in the API documentation and inthe BTstack manual, available at: https://bluekitchen-gmbh.com/btstack/.

    Note: 1. The BlueKitchen BLE stack is supported in ATWILC RTOS Driver Release 4.03 and available from

    Advanced Software Framework (ASF) 3.42 and later.2. For more information on BlueKitchen GmbH contact:

    BlueKitchen GmbH

    Engelstrasse 9

    8004 Zurich

    Switzerland

    Web: https://bluekitchen-gmbh.com

    E-mail: [email protected]

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 1

    https://bluekitchen-gmbh.com/btstack/https://bluekitchen-gmbh.com

  • Table of Contents

    Introduction......................................................................................................................1

    1. BLE Application Related API..................................................................................... 31.1. Advertisement.............................................................................................................................. 31.2. Scanning...................................................................................................................................... 31.3. HCI Event Handling......................................................................................................................3

    2. GATT Server Setup................................................................................................... 4

    3. BLE Reference Example........................................................................................... 53.1. LE Counter Application.................................................................................................................53.2. LE Transparent Application.......................................................................................................... 93.3. LE Wi-Fi Provisioning Application...............................................................................................113.4. Wi-Fi and BLE Coexistence Application.....................................................................................15

    4. Revision History.......................................................................................................18

    The Microchip Web Site................................................................................................ 19

    Customer Change Notification Service..........................................................................19

    Customer Support......................................................................................................... 19

    Microchip Devices Code Protection Feature................................................................. 19

    Legal Notice...................................................................................................................20

    Trademarks................................................................................................................... 20

    Quality Management System Certified by DNV.............................................................21

    Worldwide Sales and Service........................................................................................22

    ATWILC3000

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 2

  • 1. BLE Application Related APIThis chapter describes the BTstack API used for simple Bluetooth Low Energy (BLE) applicationdevelopment.

    1.1 AdvertisementThe following API is used for BLE advertisement operation:

    • gap_advertisements_set_params• gap_advertisements_set_data• gap_scan_response_set_data• gap_advertisements_enable

    1.2 ScanningThe following API is used for BLE scanning operation:

    • gap_set_scan_parameters• gap_start_scan• gap_stop_scan

    1.3 HCI Event HandlingThe user needs to register the HCI Event handler for all HCI events and add it to the handler list.

    For example, assume a packet handler and a global variable such as:

    static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);static btstack_packet_callback_registration_t hci_event_callback_registration;

    The packet handler can be added by the following snippet:

    hci_event_callback_registration.callback = &packet_handler;hci_add_event_handler(&hci_event_callback_registration);

    ATWILC3000BLE Application Related API

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 3

  • 2. GATT Server SetupTo implement a LE Peripheral and to exchange data, a GATT profile containing all GATT services withtheir characteristics has to be defined. BTstack uses a compact read-only representation of the GATTprofile that can be stored in Flash to minimize the RAM requirements. As all the GATT requests areimplemented via the ATT protocol in Bluetooth, the GATT services and characteristics are also stored asa list of equivalent ATT Attributes.

    For this, the tool compile_gatt.py is available at:https://github.com/bluekitchen/btstack/blob/master/tool/compile_gatt.py

    The following is the format of compile_gatt.py:$ compile_gatt.py input.gatt output.h

    A few examples can be found in the ASF directory path at:

    thirdparty\wireless\bt_wilc_sdk\bt_src\ble\gatt-service.For more details about the GATT Server, refer to the manual available at:

    http://bluekitchen-gmbh.com/btstack/develop/Profiles/GATT Server

    Alternatively, the ATT Database can be created at runtime in RAM using the att_db_util helperfunctions.

    Here is a snippet for the GATT definition of the GATT GAP Service that contains the device name:

    PRIMARY_SERVICE, GAP_SERVICE

    CHARACTERISTIC, GAP_DEVICE_NAME, READ, “LE Counter”

    The binary representation of ATT attribute is structured as follows:

    Attribute size in byte Flags Handle UUID Value

    (16 bit) (16 bit) (16 bit) (16/128 bit) (….)

    The compile_gatt.py tool then creates the following representation:

    // 0x0001 PRIMARY_SERVICE-GAP_SERVICE0x0a, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x28, 0x00, 0x18,

    // 0x0002 CHARACTERISTIC-GAP_DEVICE_NAME-READ0x0d, 0x00, 0x02, 0x00, 0x02, 0x00, 0x03, 0x28, 0x02, 0x03, 0x00, 0x00, 0x2a,

    // 0x0003 VALUE-GAP_DEVICE_NAME-READ-'LE Counter'// READ_ANYBODY0x12, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x2a, 0x4c, 0x45, 0x20, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72,

    With this, the ATT server can be set up using:* att_server_init* att_server_register_packet_handler

    ATWILC3000GATT Server Setup

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 4

    https://github.com/bluekitchen/btstack/blob/master/tool/compile_gatt.pyhttp://bluekitchen-gmbh.com/btstack/develop/profiles/#gatt-generic-attribute-profile

  • 3. BLE Reference ExampleThis chapter describes the functional overview of all the applications that are pre-defined in the AtmelStudio. For information about commercial licensing options contact: [email protected].

    3.1 LE Counter ApplicationThe LE Counter examples demonstrate how to specify a minimal GATT database with a custom GATTservice and custom characteristic that sends periodic notifications.

    3.1.1 Database DetailsThe following table provides the database details for LE Counter application.

    Table 3-1. Database Details for LE Counter Application

    Service UUID

    Battery 180F

    Custom 0000FF10-0000-1000-8000-00805F9B34FB

    3.1.2 Running the DemoPerform the following steps to run the demo.

    1. Open any Terminal Application (TeraTerm, for example). Select the COM Port enumerated on thePC and set the following parameters:

    – Baudrate 115200– Parity None– One Stop bit– One Start bit– No Hardware Handshake

    2. Press the Reset button on the ATSAMV71 Xplained Ultra board.3. The device is in Advertising mode.4. Open the Microchip Bluetooth Data application in the iTunes® or Google Play™ Store and click

    Bluetooth Smart on the application dashboard to scan for the peripheral devices, as illustrated inthe following figure.

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 5

  • Figure 3-1. Dashboard of Microchip Bluetooth Data Application

    5. The scanning page is displayed. Click START SCAN to display the list of discoverable devices. Thedevice name LE Counter is displayed among the list of scanned devices.Figure 3-2. Scanning for Devices

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 6

  • 6. Select the LE Counter application name for connection.7. Once the device is connected, a list of supported services for the device is displayed in the service

    list page.Figure 3-3. Display of Services Supported by the Application

    8. From the service list page, click Battery Service to display the Battery simulation page.

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 7

  • Figure 3-4. Battery Simulation Page

    9. From the service list page, click Unknown Service or Generic Information to access the CustomService related information.Figure 3-5. Generic Information Page

    10. Click Characteristics under Unknown Service to display the characteristic information.

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 8

  • Figure 3-6. Characteristic Information Page

    11. Click Read to read the characteristic information.12. Click Notify to trigger continuous notification incremental counter value display on the console log.

    Figure 3-7. Incremental Counter Value Console Log

    3.2 LE Transparent ApplicationThe LE Transparent application demonstrates how to perform data exchange between the client and theserver.

    3.2.1 Database DetailsThe following table provides the database details for LE Transparent application.

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 9

  • Table 3-2. Database Details for LE Transparent Application

    Service UUID

    Transparent 49535343-FE7D-4AE5-8FA9-9FAFD205E455

    3.2.2 Running the DemoPerform the following steps to run the demo.

    1. Open any Terminal Application (TeraTerm, for example). Select the COM Port enumerated on thePC and set the following parameters:

    – Baudrate 115200– Parity None– One Stop bit– One Start bit– No Hardware Handshake

    2. Press the Reset button on ATSAMV71 Xplained Ultra board.3. The device is in Advertising mode.4. Open the Microchip Bluetooth Data application and click Bluetooth Smart on the application

    dashboard to scan for the peripheral devices, as illustrated in Figure 3-1.5. The scanning page is displayed. Click Scan (To scan devices around you) and it opens another

    scan page with the SCAN tab. Click SCAN to display the list of discoverable devices. The devicename “LE-TRANSPARENT” is displayed among the list of scanned devices.Figure 3-8. Scanning for Devices

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 10

  • 6. Select the LE-Transparent application name for connection.7. Once the device is connected, LE-TRANSPARENT page is displayed and the user needs to click

    the Transparent (Transfer data to device) tab for Transparent service functionality.Figure 3-9. Display of Services Supported by the Application

    8. In the Transparent service functionality, enter any text message in the text box and click SEND tosend the data to another device. By default, the RAW tab is enabled for sending the data. The usercan select the Timer tab to send the data in an interval.Figure 3-10. LE-Transparent Page

    3.3 LE Wi-Fi Provisioning ApplicationThe LE Wi-Fi Provisioning application demonstrates how to provision Wi-Fi via BLE usingtheATWILC3000 Wi-Fi BLE module.

    3.3.1 Database DetailsThe following table provides the database details for LE Provisioning application.

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 11

  • Table 3-3. Database Details for LE Provisioning Application

    Service UUID

    Provisioning service 77880001-D229-11E4-8689-0002A5D5C51B

    Scanning service FB8C0001-D224-11E4-85A1-0002A5D5C51B

    3.3.2 Running the DemoPerform the following steps to run the demo.

    1. Open any Terminal Application (TeraTerm, for example). Select the COM Port enumerated on thePC and set the following parameters:

    – Baudrate 115200– Parity None– One Stop bit– One Start bit– No Hardware Handshake

    2. Press the Reset button on ATSAMV71 Xplained Ultra board.3. The device is in Advertising mode.4. Open the Microchip Bluetooth Data application and click BLE Provisioner on the application

    dashboard to scan for the peripheral devices, as illustrated in the following figure.Figure 3-11. Dashboard of Microchip Bluetooth Data Application

    5. The device name MCHP_WIFI is displayed among the list of scanned devices.

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 12

  • Figure 3-12. Scan Page

    6. Select MCHP_WIFI for BLE connection.Figure 3-13. Provisioning Connection Page

    7. Select Scan to scan for the AP list. When scanning for the AP list, the Scan button is disabled andit will be enabled again once the application receives the AP list.

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 13

  • Figure 3-14. Scanning in Process for Provisioning

    8. Once the AP list is displayed, select the AP from the scanned list. Based on security type used,enter the information in the “Enter Network Key” section.Figure 3-15. Scan AP List

    9. Once the user selects the AP and provides the information (Network Key), the Provision tab isdisplayed to start the connection procedure. Click Provision for starting the connection.

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 14

  • Figure 3-16. Provision Page

    10. A notification “Provisioning Complete” pop-up is displayed once the Wi-Fi connection is established.Click OK, and the BLE connection is disconnected and Wi-Fi connection remains active.Figure 3-17. Provision Complete Page

    3.4 Wi-Fi and BLE Coexistence ApplicationThe coexistence application demonstrates concurrent operation of Wi-Fi in Station (STA) and AP modealong with an active BLE connection. The BLE connection advertises an LE Counter service. The LECounter examples demonstrate how to specify a minimal GATT database with a custom GATT service

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 15

  • and custom characteristic that sends periodic notifications. The value in the notification is updated in theAP web server as well as the Microchip Bluetooth Data application.

    3.4.1 Running the DemoPerform the following steps to run the demo.

    1. Load the Coexistence application on the ATWILC3000 after entering the details of AP with internetconnection in sta.h.

    2. Open any Terminal Application (TeraTerm, for example). Select the COM Port enumerated on thePC and set the following parameters:

    – Baudrate 115200– Parity None– One Stop bit– One Start bit– No Hardware Handshake

    3. Press the Reset button on ATSAMV71 Xplained Ultra board.4. Enter http://192.168.5.1 in the web browser to connect to the web server hosted on the

    ATWILC3000. The battery counter is updated as shown in the following figure.Figure 3-18. Web server

    5. The device is in Advertising mode.6. Open the Microchip Bluetooth Data application and click BLE Smart on the application dashboard

    to scan for the peripheral devices, as illustrated in Figure 3-1.

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 16

    http://192.168.5.1

  • 7. The scanning page is displayed. Click START SCAN to display the list of discoverable devices. Thedevice name LE Counter is displayed among the list of scanned devices, as illustrated in Figure3-2.

    8. Select LE Counter application name for connection.9. Once the device connected, list of supported services for the device is displayed in service list

    page, see Figure 3-3.10. From the service list page, click Battery Service to display the battery simulation page, see Figure

    3-4.11. The two counters in the web page and the Microchip Bluetooth application are in sync

    demonstrating the coexistence functionality.

    ATWILC3000BLE Reference Example

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 17

  • 4. Revision HistoryRevision Date Section Description

    A 09/2018 Document Initial Release

    ATWILC3000Revision History

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 18

  • The Microchip Web Site

    Microchip provides online support via our web site at http://www.microchip.com/. This web site is used asa means to make files and information easily available to customers. Accessible by using your favoriteInternet browser, the web site contains the following information:

    • Product Support – Data sheets and errata, application notes and sample programs, designresources, user’s guides and hardware support documents, latest software releases and archivedsoftware

    • General Technical Support – Frequently Asked Questions (FAQ), technical support requests,online discussion groups, Microchip consultant program member listing

    • Business of Microchip – Product selector and ordering guides, latest Microchip press releases,listing of seminars and events, listings of Microchip sales offices, distributors and factoryrepresentatives

    Customer Change Notification Service

    Microchip’s customer notification service helps keep customers current on Microchip products.Subscribers will receive e-mail notification whenever there are changes, updates, revisions or erratarelated to a specified product family or development tool of interest.

    To register, access the Microchip web site at http://www.microchip.com/. Under “Support”, click on“Customer Change Notification” and follow the registration instructions.

    Customer Support

    Users of Microchip products can receive assistance through several channels:

    • Distributor or Representative• Local Sales Office• Field Application Engineer (FAE)• Technical Support

    Customers should contact their distributor, representative or Field Application Engineer (FAE) for support.Local sales offices are also available to help customers. A listing of sales offices and locations is includedin the back of this document.

    Technical support is available through the web site at: http://www.microchip.com/support

    Microchip Devices Code Protection Feature

    Note the following details of the code protection feature on Microchip devices:

    • Microchip products meet the specification contained in their particular Microchip Data Sheet.• Microchip believes that its family of products is one of the most secure families of its kind on the

    market today, when used in the intended manner and under normal conditions.• There are dishonest and possibly illegal methods used to breach the code protection feature. All of

    these methods, to our knowledge, require using the Microchip products in a manner outside theoperating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so isengaged in theft of intellectual property.

    • Microchip is willing to work with the customer who is concerned about the integrity of their code.

    ATWILC3000

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 19

    http://www.microchip.com/http://www.microchip.com/http://www.microchip.com/support

  • • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of theircode. Code protection does not mean that we are guaranteeing the product as “unbreakable.”

    Code protection is constantly evolving. We at Microchip are committed to continuously improving thecode protection features of our products. Attempts to break Microchip’s code protection feature may be aviolation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your softwareor other copyrighted work, you may have a right to sue for relief under that Act.

    Legal Notice

    Information contained in this publication regarding device applications and the like is provided only foryour convenience and may be superseded by updates. It is your responsibility to ensure that yourapplication meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS ORWARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORYOR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITSCONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE.Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in lifesupport and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend,indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resultingfrom such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectualproperty rights unless otherwise stated.

    Trademarks

    The Microchip name and logo, the Microchip logo, AnyRate, AVR, AVR logo, AVR Freaks, BitCloud,chipKIT, chipKIT logo, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, Heldo, JukeBlox, KeeLoq,Kleer, LANCheck, LINK MD, maXStylus, maXTouch, MediaLB, megaAVR, MOST, MOST logo, MPLAB,OptoLyzer, PIC, picoPower, PICSTART, PIC32 logo, Prochip Designer, QTouch, SAM-BA, SpyNIC, SST,SST Logo, SuperFlash, tinyAVR, UNI/O, and XMEGA are registered trademarks of Microchip TechnologyIncorporated in the U.S.A. and other countries.

    ClockWorks, The Embedded Control Solutions Company, EtherSynch, Hyper Speed Control, HyperLightLoad, IntelliMOS, mTouch, Precision Edge, and Quiet-Wire are registered trademarks of MicrochipTechnology Incorporated in the U.S.A.

    Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BodyCom,CodeGuard, CryptoAuthentication, CryptoAutomotive, CryptoCompanion, CryptoController, dsPICDEM,dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial Programming,ICSP, INICnet, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, memBrain, Mindi, MiWi,motorBench, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, OmniscientCode Generation, PICDEM, PICDEM.net, PICkit, PICtail, PowerSmart, PureSilicon, QMatrix, REAL ICE,Ripple Blocker, SAM-ICE, Serial Quad I/O, SMART-I.S., SQI, SuperSwitcher, SuperSwitcher II, TotalEndurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA aretrademarks of Microchip Technology Incorporated in the U.S.A. and other countries.

    SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.

    Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries.

    GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary ofMicrochip Technology Inc., in other countries.

    All other trademarks mentioned herein are property of their respective companies.

    ATWILC3000

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 20

  • © 2018, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.

    ISBN: 978-1-5224-3554-9

    Quality Management System Certified by DNV

    ISO/TS 16949Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and waferfabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in Californiaand India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC®

    DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory andanalog products. In addition, Microchip’s quality system for the design and manufacture of developmentsystems is ISO 9001:2000 certified.

    ATWILC3000

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 21

  • AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPECorporate Office2355 West Chandler Blvd.Chandler, AZ 85224-6199Tel: 480-792-7200Fax: 480-792-7277Technical Support:http://www.microchip.com/supportWeb Address:www.microchip.comAtlantaDuluth, GATel: 678-957-9614Fax: 678-957-1455Austin, TXTel: 512-257-3370BostonWestborough, MATel: 774-760-0087Fax: 774-760-0088ChicagoItasca, ILTel: 630-285-0071Fax: 630-285-0075DallasAddison, TXTel: 972-818-7423Fax: 972-818-2924DetroitNovi, MITel: 248-848-4000Houston, TXTel: 281-894-5983IndianapolisNoblesville, INTel: 317-773-8323Fax: 317-773-5453Tel: 317-536-2380Los AngelesMission Viejo, CATel: 949-462-9523Fax: 949-462-9608Tel: 951-273-7800Raleigh, NCTel: 919-844-7510New York, NYTel: 631-435-6000San Jose, CATel: 408-735-9110Tel: 408-436-4270Canada - TorontoTel: 905-695-1980Fax: 905-695-2078

    Australia - SydneyTel: 61-2-9868-6733China - BeijingTel: 86-10-8569-7000China - ChengduTel: 86-28-8665-5511China - ChongqingTel: 86-23-8980-9588China - DongguanTel: 86-769-8702-9880China - GuangzhouTel: 86-20-8755-8029China - HangzhouTel: 86-571-8792-8115China - Hong Kong SARTel: 852-2943-5100China - NanjingTel: 86-25-8473-2460China - QingdaoTel: 86-532-8502-7355China - ShanghaiTel: 86-21-3326-8000China - ShenyangTel: 86-24-2334-2829China - ShenzhenTel: 86-755-8864-2200China - SuzhouTel: 86-186-6233-1526China - WuhanTel: 86-27-5980-5300China - XianTel: 86-29-8833-7252China - XiamenTel: 86-592-2388138China - ZhuhaiTel: 86-756-3210040

    India - BangaloreTel: 91-80-3090-4444India - New DelhiTel: 91-11-4160-8631India - PuneTel: 91-20-4121-0141Japan - OsakaTel: 81-6-6152-7160Japan - TokyoTel: 81-3-6880- 3770Korea - DaeguTel: 82-53-744-4301Korea - SeoulTel: 82-2-554-7200Malaysia - Kuala LumpurTel: 60-3-7651-7906Malaysia - PenangTel: 60-4-227-8870Philippines - ManilaTel: 63-2-634-9065SingaporeTel: 65-6334-8870Taiwan - Hsin ChuTel: 886-3-577-8366Taiwan - KaohsiungTel: 886-7-213-7830Taiwan - TaipeiTel: 886-2-2508-8600Thailand - BangkokTel: 66-2-694-1351Vietnam - Ho Chi MinhTel: 84-28-5448-2100

    Austria - WelsTel: 43-7242-2244-39Fax: 43-7242-2244-393Denmark - CopenhagenTel: 45-4450-2828Fax: 45-4485-2829Finland - EspooTel: 358-9-4520-820France - ParisTel: 33-1-69-53-63-20Fax: 33-1-69-30-90-79Germany - GarchingTel: 49-8931-9700Germany - HaanTel: 49-2129-3766400Germany - HeilbronnTel: 49-7131-67-3636Germany - KarlsruheTel: 49-721-625370Germany - MunichTel: 49-89-627-144-0Fax: 49-89-627-144-44Germany - RosenheimTel: 49-8031-354-560Israel - Ra’ananaTel: 972-9-744-7705Italy - MilanTel: 39-0331-742611Fax: 39-0331-466781Italy - PadovaTel: 39-049-7625286Netherlands - DrunenTel: 31-416-690399Fax: 31-416-690340Norway - TrondheimTel: 47-72884388Poland - WarsawTel: 48-22-3325737Romania - BucharestTel: 40-21-407-87-50Spain - MadridTel: 34-91-708-08-90Fax: 34-91-708-08-91Sweden - GothenbergTel: 46-31-704-60-40Sweden - StockholmTel: 46-8-5090-4654UK - WokinghamTel: 44-118-921-5800Fax: 44-118-921-5820

    Worldwide Sales and Service

    © 2018 Microchip Technology Inc. User Guide DS50002795A-page 22

    IntroductionTable of Contents1. BLE Application Related API1.1. Advertisement1.2. Scanning1.3. HCI Event Handling

    2. GATT Server Setup3. BLE Reference Example3.1. LE Counter Application3.1.1. Database Details3.1.2. Running the Demo

    3.2. LE Transparent Application3.2.1. Database Details3.2.2. Running the Demo

    3.3. LE Wi-Fi Provisioning Application3.3.1. Database Details3.3.2. Running the Demo

    3.4. Wi-Fi and BLE Coexistence Application3.4.1. Running the Demo

    4. Revision HistoryThe Microchip Web SiteCustomer Change Notification ServiceCustomer SupportMicrochip Devices Code Protection FeatureLegal NoticeTrademarksQuality Management System Certified by DNVWorldwide Sales and Service