background image

Figure 5-3. Scanning for Devices

3.

Select the device name in the scan results, which initiates the pairing procedure. Enter the pass-
key “123456” on the Bluetooth Pairing Request window and click 

Pair

. The mobile app displays

“Successful connection” upon successful completion of pairing.

Figure 5-4. Pairing Request

4.

On the device side, the console displays the successful completion of the pairing procedure.

5.

On the Microchip SmartConnect app, the supported services are displayed for the device.

 ATSAMB11

©

 2017 Microchip Technology Inc.

 User Guide

DS70005335A-page 30

Содержание ATSAMB11

Страница 1: ...ber of the ATSAMB11 ZR Xplained Pro board is ATSAMB11ZR XPRO Note All example applications are included in the BluSDK SMART software package Figure 1 ATSAMB11 Xplained Pro Boards Features Observer App...

Страница 2: ...ing bonding Send and receive messages Heart Rate Profile Application Advertisement Pairing bonding Heart rate sensor measurements Console display Blood Pressure Profile Application Advertisement Pairi...

Страница 3: ...con demo app for iOS Android AltBeacon Application AltBeacon advertising AltBeacon demo app for iOS Android Eddystone Beacon Application Eddystone UID URL and TLM frame types URL configuration service...

Страница 4: ...14 Find Me Profile Application 11 1 15 Phone Alert Status Profile Application 11 1 16 Alert Notification Profile Application 11 1 17 Multi Role Peripheral Multi Connect Application 12 1 18 L2CAP Thro...

Страница 5: ...93 9 2 Sample GCC Linker File 94 9 3 Sample Keil Scatter File 96 10 BluSDK SMART Software Architecture 97 11 Document Revision History 98 The Microchip Web Site 99 Customer Change Notification Servic...

Страница 6: ...ation includes setting the alert level which triggers on the Link Loss or based on a different threshold of the Path Loss The Path Loss determines the quality of the connection and it is derived out o...

Страница 7: ...g from the peer device 1 4 ANCS Profile Application The Apple Notification Center Service ANCS is used to enable a device to access notifications from an iOS device that exposes ANCS The ANCS profile...

Страница 8: ...use keyboard Boot mouse input report mouse only Boot keyboard input report keyboard only Boot keyboard output report keyboard only This example application simulates a function of a mouse or keyboard...

Страница 9: ...the Microchip SmartConnect mobile application This is a custom profile example application implemented over GATT The user can send the information to the mobile phone using the console terminal that...

Страница 10: ...device Blood Pressure Measurements The blood pressure measurement characteristic can be used to send blood pressure measurements containing the following information Flags field containing units of b...

Страница 11: ...R ZR see Table 2 1 The example application utilizes the SW0 button on the supported hardware platform to demonstrate the notification use cases A BLE compatible Android device that contains the Microc...

Страница 12: ...and if any device sends a connection request application gets connected to the remote device and exchanges the data on the established link If the connection request from the device is not sent withi...

Страница 13: ...ddystone beacon application supports UID URL and TLM frame types The application can be configured as follows using the APP_TYPE define Set APP_TYPE to EDDYSTONE_UID_APP to send UID and TLM beacon fra...

Страница 14: ...tax Reset Reset the link layer AT RESET Configuration Set device configuration AT CFG_DEF Start Scan Start scan operation AT SCAN Stop Scan Stop an ongoing scan operation AT STOP ATSAMB11 2017 Microch...

Страница 15: ...atforms and IDEs for the ATSAMB11 MR ZR Table 2 1 BluSDK Supported Hardware and IDEs Platform MCU Supported IDEs SAMB11MR XPRO ATSAMB11G18A Atmel Studio v7 0 and Keil SAMB11ZR XPRO ATSAMB11 ZR210CA At...

Страница 16: ...The following figure illustrates the connection of the ATSAMB11 MR ZR XPro board to the host PC using a micro USB cable Figure 3 1 EDBG USB Port ATSAMB11 2017 Microchip Technology Inc User Guide DS70...

Страница 17: ...he Microchip SmartConnect App on the mobile phone available in the Apple Store for iPhone and in the Google Play Store for Android Note Atmel Studio offers predefined example projects for the SAM B11...

Страница 18: ...e supported examples for SAMB11 MR and SAMB11 ZR 2 2 Select the respective example application of the SAMB11 MR ZR by expanding the Atmel Atmel Corp in the All Projects tab This selection automaticall...

Страница 19: ...application example that can be used in the SAMB11 MR ZR Xplained Pro board 5 For the Time Information Profile application the user must select the compiler symbol based on the following For Android d...

Страница 20: ...y supports Time Server and does not require a specific mobile application To enable the devices that are displayed in the iOS BLE devices page the service solicitation advertisement data type configur...

Страница 21: ...o read the Device Signature 8 3 After reading the Device click Program to program the device Figure 4 6 Embedded Debugger Device Programming Window 9 After flashing the example application into the SA...

Страница 22: ...mple application Keil project uvprojx from Keil IDE 2 After opening the project the following files are available in the Project tab xxxx_app c xxxx is replaced with the specific application name app_...

Страница 23: ...e project Figure 4 9 Compiling the Project 6 Go to Flash Download to download the application via the USB onto the SAMB11 MR ZR XPro board 7 After flashing the following messages are displayed in the...

Страница 24: ...ormation Service by modifying the following macros in device_info h as shown in the following figure Figure 4 10 Device Information Service Header File for Atmel Studio Figure 4 11 Device Information...

Страница 25: ...t event Broadcasts data in advertisement data packets only Broadcasts the following advertisement data types Complete list of 16 bit service class UUIDs Complete local name Appearance The configuratio...

Страница 26: ...11 MR ZR XPro board to acts as a Proximity Reporter ANCS Profile Application Supported by the Microchip SmartConnect application for iPhone devices only to act as a Notification Provider Supported by...

Страница 27: ...rted by the Microchip SmartConnect application for iPhone Android devices to act as a Heart Rate Data Collector Supported by the ATSAMB11 MR ZR XPro board to act as Heart Rate Sensor Blood Pressure Pr...

Страница 28: ...pplication Direct Test Mode DTM Application Supported by the ATSAMB11 MR ZR XPro board to act as a Transmitter Tx Test Board BLE performance analyzer tool connected with target board using COM port Su...

Страница 29: ...indow Initializing Application Initializing SAMB11 BD Address 0xF8F005F23FFF Address Type 0 BLE Started Advertisement Pairing Procedure Perform the following steps to pair the device with the mobile p...

Страница 30: ...w and click Pair The mobile app displays Successful connection upon successful completion of pairing Figure 5 4 Pairing Request 4 On the device side the console displays the successful completion of t...

Страница 31: ...Initializing the Device Note Observer Application Console Baudrate must be set to 921600 2 Press the Reset button on the ATSAMB11 MR ZR XPro board 3 The device is now ready to be used as an Observer...

Страница 32: ...Establish the connection between the device and mobile phone using the procedure listed in Running the Demo 2 Select the desired service Link Loss or Immediate Alert for alert level characteristics c...

Страница 33: ...Loss is plotted on the zone radar using RSSI values received from the Proximity Reporter Based on the zone the Proximity Monitor sends the corresponding alert level The console log on the Proximity R...

Страница 34: ...moving until the Link Loss pop up appears The console log on the Proximity Reporter displays the corresponding alerts and when Link Loss occurs it reports disconnection and the on board status LED be...

Страница 35: ...porter Console Log for Link Loss 5 After Link Loss the mobile application attempts to reconnect to the Proximity Reporter The connection is re established by moving the mobile phone closer to the repo...

Страница 36: ...ded with Proximity Monitor example application code Follow the steps 1 and 2 from Initializing the Device 2 Setup another ATSAMB11 MR ZR device with Proximity Reporter application Follow all the steps...

Страница 37: ...ices The default alert settings are as follows For HIGH ALERT set high alert RSSI to 91dBm and above Alert status is indicated by LED which must be ON For MILD ALERT set RSSI to 70dBm to 90dBm Alert s...

Страница 38: ...o connect to the device Figure 5 15 ANCS Device Discovery in iPhone 3 When connected the client side initiates the pairing request with the iPhone The console log provides guidance for the user to ent...

Страница 39: ...ion between the device and mobile phone using the procedure listed in Running the Demo 2 When paired the application displays the Scan Parameters and the Generic Information service 3 Click the Scan P...

Страница 40: ...e Demo for Android devices Perform the following steps to run the Time Information Profile application demo for Android devices 1 Establish the connection between the device and mobile phone using the...

Страница 41: ...th 4 0 or higher On the mobile phone enable Bluetooth in the Settings page to scan for the devices ATMEL HID appears among the list of scanned devices Select ATMEL HID to connect to the supported plat...

Страница 42: ...mouse movement 7 For every button press corresponding cursor movement is shown on the HID host as described below First 5 button presses cursor moves right Next 5 button presses cursor moved down Next...

Страница 43: ...vice Application 5 3 8 1 Disabling ULP Mode Perform the following steps to disable the ULP mode for HID Keyboard device application 1 Before building the project ensure that the NENABLE_ULP symbol is...

Страница 44: ...de a Bluetooth chip set supporting Bluetooth 4 0 or higher On the mobile phone enable Bluetooth in the Settings page to scan for the devices ATMEL HID appears among the list of scanned devices Select...

Страница 45: ...tepad application on the mobile phone 8 Click SW0 button on the supported platform device 9 A letter for each press is shown in the application Fast notepad 10 The user can see a complete Hello Atmel...

Страница 46: ...ULP mode use AON_GPIO to wake up the device or use other wake up sources BLE Events AON Timer 1 Before building the project ensure that the ENABLE_ULP symbol is used as shown in the following figure...

Страница 47: ...8 To enable the ULP mode again adjust the switch to connect pin 9 AON_GPIO_0 to pin 19 GND 5 3 9 Battery Service Application Perform the following steps to run the Battery Service Application demo 1 E...

Страница 48: ...2 from Initializing the Device 2 The device is in advertising mode 3 The following figure shows example logs from the Simple Broadcaster application Figure 5 39 Simple Broadcaster Console Display 5 3...

Страница 49: ...g steps to run the Custom Serial Chat Profile application demo 1 Establish the connection between the device and mobile phone using the procedure listed in Running the Demo 2 Once pairing is complete...

Страница 50: ...so write the text on the console for the device and press the ENTER key to transmit the chat text to the mobile application Figure 5 42 Console Log for Sending Data to Remote Device ATSAMB11 2017 Micr...

Страница 51: ...onding mobile app the LED on SAMB11 MR ZR board starts blinking while sending notifications Notification Enabled Heart Rate 50 bpm RR Values 100 300 msec User Status Idle Heart Rate 51 bpm RR Values 5...

Страница 52: ...phone using the procedure listed in Running the Demo 2 When the device is connected the application displays Blood Pressure Device Information Service and Generic Information 3 Upon entering the Bloo...

Страница 53: ...Figure 5 45 Console Log for Blood Pressure Measurements Figure 5 46 Blood Pressure Service Page after Receiving BP Indications ATSAMB11 2017 Microchip Technology Inc User Guide DS70005335A page 53...

Страница 54: ...ton Press Figure 5 48 Blood Pressure Service Pages after Receiving Measurement Data on Button Press 5 3 15 Find Me Profile Application Perform the following steps to run the Find Me Profile applicatio...

Страница 55: ...the connection between the device and mobile phone using the procedure listed in Running the Demo 2 After connection the application displays the Phone Alert Status Service page 3 The notifications a...

Страница 56: ...and the corresponding console logs are displayed Figure 5 51 Phone Alert Status Console Log 5 3 17 Alert Notification Profile Application Perform the following steps to run the Alert Notification Prof...

Страница 57: ...ifications by using the SW0 button The mobile application reflects the status as shown Figure 5 53 Alert Notification Screen on Microchip SmartConnect Application 4 The user can trigger a missed call...

Страница 58: ...ion 2 The device starts scanning and displays the devices found as shown in the following figure Figure 5 55 Multi Role Peripheral Multi Connect Application Scanning Devices 3 Set up another ATSAMB11...

Страница 59: ...tisement packets Figure 5 57 GAP Peripheral ATSAMB11 Connected to GAP Central Mobile and Transferring the Data 6 The ATSAMB11 MR ZR acting as a GAP Peripheral BAS can connect to seven GAP central devi...

Страница 60: ...ce starts scanning and subsequently connects with the desired peripheral device The following log shows that both devices connected to confirm the connection status Figure 5 58 L2CAP Central Connectio...

Страница 61: ...following steps to run the Health Thermometer Profile application demo 1 Establish the connection between the device and mobile phone using the procedure listed in Running the Demo 2 When paired the...

Страница 62: ...ss the user button SW0 on the SAMB11 MR ZR The new value is updated in the application 5 Going back to the scanning screen on the Microchip SmartConnect application disconnects the device with the mob...

Страница 63: ...mity to a given beacon This mode also shows the corresponding product related information configured for this particular beacon device Distance used to indicate the distance between beacon device and...

Страница 64: ...that the user has moved away from the beacon device Optionally the message can be closed by clicking on close Figure 5 67 Beacon Radar Application in Proximity Mode 5 3 22 AltBeacon Application Perfo...

Страница 65: ...ice tap on the pop up message which shows UUID ID1 and ID2 values as shown in the following figures Figure 5 68 AltBeacon Radar Application in Distance Mode 5 In proximity mode the application opens t...

Страница 66: ...upported on iOS and not on Android devices 5 3 23 Eddystone Beacon Application Perform the following steps to run the Eddystone Beacon application demo 1 Follow the steps 1 and 2 from Initializing the...

Страница 67: ...g the identity of the frame in the case of the EDDYSTONE_URL_APP the shortened URL value is shown and in the case of the EDDYSTONE_UID_APP Namespace ID and Instance ID is shown Figure 5 72 Eddystone B...

Страница 68: ...ration mode The SW0 hardware button present on the SAM B11 Xplained Pro board has to be long pressed around 3 seconds to enter into Configuration mode 7 Connect to the beacon in Configuration mode as...

Страница 69: ...TSAMB11 MR ZR enters into Beacon mode and start sending Eddystone URL frames with the updated values The ranging console log screen shows the beacon with new URL value Figure 5 76 Eddystone Beacon Con...

Страница 70: ...con node as shown in the following figure Figure 5 77 Physical Web App Detecting Eddystone URL 4 Click the Menu button to open the Edit URL option this requests that the user to put the beacon in Conf...

Страница 71: ...B11 MR ZR devices loaded with Direct Test Mode example application code Perform the following steps to run the DTM with Performance Analyzer tool 1 Start the performance analyzer in the Atmel Studio F...

Страница 72: ...nitializing UART 3 Start the Direct Test Mode configuring one board as Tx and the other one as Rx Make sure to select the same RF Channel for both Rx and Tx during the test and start the Rx test befor...

Страница 73: ...e window with both Tx and Rx options Click Start Rx Test and ensure that the packets are transferred for a certain time period from the Tx device Figure 5 83 Starting Rx Test 5 Click Stop Test to disp...

Страница 74: ...supports the following AT commands on the console 1 Follow Step 1 from Initializing the Device 2 Open any Terminal Application for example TeraTerm Select the COM port enumerated on the PC and set the...

Страница 75: ...nd then press the Enter key Figure 5 86 CFG_DEF Command 5 SCAN command to scan the BLE device type AT SCAN and then press the Enter key After scanning for the device the scan result is shown in the fo...

Страница 76: ...gure 5 87 SCAN Command 6 STOP command to stop the command handler type AT STOP and then press the Enter key Figure 5 88 STOP Command ATSAMB11 2017 Microchip Technology Inc User Guide DS70005335A page...

Страница 77: ...Wizard as shown in the following figure Figure 6 1 Invoking ASF Wizard 2 In the ASF Wizard window enter BLE in the search box as shown in the following figure Figure 6 2 ASF BLE Services and Component...

Страница 78: ...ctionality brief Update the DIS characteristic value after defining the services using dis_primary_service_define param in dis_serv dis service instance param in info_type dis characteristic type to b...

Страница 79: ...dis service instance inside stack param in dis_primary_service dis service instance return ref AT_BLE_SUCCESS operation completed successfully return ref AT_BLE_FAILURE Generic error at_ble_status_t d...

Страница 80: ...e the ble_manager h 2 If BLE_PAIR_ENABLE is set true then the security permission of the Endpoint characteristic is readable with authentication and writable with authentication 3 If BLE_PAIR_ENABLE i...

Страница 81: ...cteristic configuration descriptor is included in the Endpoint characteristic 7 5 Sequence Flow Diagram The following figure illustrates the sequence flow diagram of the Custom Serial Chat profile Fig...

Страница 82: ...ple iBeacon_SAMB11 and then click Save Figure 8 1 Creating a New Keil Project 2 The Select Device for Target window is displayed as shown in the following figure 2 1 Select ARMCM0 Device for Target 2...

Страница 83: ...following figure Figure 8 4 Options for Target 4 1 In the Options for Target window select the Target tab and set the following Select Use MicroLIB check box For this sample project a customized scatt...

Страница 84: ...pplication In this demo iBeacon_SAMB11 is used as a sample project Be sure to check the Create HEX File check box Figure 8 6 Output Settings 4 3 In the Listing tab set the parameters default options a...

Страница 85: ...7 Listing Settings 4 4 In the User tab set the user settings default selection as shown in the following figure Figure 8 8 User Settings ATSAMB11 2017 Microchip Technology Inc User Guide DS70005335A...

Страница 86: ...on level from the drop down list Select C99 Mode check box In the Include paths enter include utils and services console Note 1 These paths contain the required header files for ble_api library and AT...

Страница 87: ...alog In R O Base enter 0x00000000 In R W Base enter 0x10018000 Browse to add the manual scatter file iBeacon sct or iBeacon_samb11 sct or app_manual sct in scatter file path Note For more details on s...

Страница 88: ...ialization File edit box enter init_app ini Note 1 This is the initialization file for linking the application and patches to the bootrom code 2 This initialization file is available in the sample app...

Страница 89: ...button from CMSIS DAP Debugger In Port select SW from the drop down and then click OK Figure 8 13 SW Interface Selection for Debug Port Check the Load Application at Startup check box as shown in the...

Страница 90: ...the Argument edit box enter H H P map This is used to pass the application map file and the application hex file in to the image creator tool Tools directory has download py a Python file and other t...

Страница 91: ...c Provided sample app_startup s console_serial c located in release_dir services console b11 ble_api lib located in release_dir lib driver_lib lib located in release_dir lib Figure 8 16 Adding Files...

Страница 92: ...click the button shown in the following figure to start the debug session Figure 8 18 Starting Debug Session To start the Code execution perform the following After loading the sample code in to the...

Страница 93: ...MR ZR has 128 KB ROM and 128 KB RAM Figure 9 1 ATSAMB11 MR ZR Memory Map 9 1 RAM Partition The following figure illustrates the ATSAMB11 MR ZR RAM partition ATSAMB11 2017 Microchip Technology Inc User...

Страница 94: ...ory section The ORIGIN and LENGTH of this section is limited as per Figure 9 2 Iram This section is not applicable for SAMB11 The Iram section can be commented and the LENGTH defined in the Iram secti...

Страница 95: ...t for C code ALIGN 4 KEEP init ALIGN 4 __preinit_array_start KEEP preinit_array __preinit_array_end ALIGN 4 __init_array_start KEEP SORT init_array KEEP init_array __init_array_end ALIGN 4 KEEP crtbeg...

Страница 96: ...ined in Figure 9 2 The user application code and data resides on the same memory section The start address and size of this section is limited as per Figure 9 2 LR_IRAM2 0x10009000 0x00017000 RW_IRAM2...

Страница 97: ...he following diagram illustrates the various layers in the BluSDK SMART Architecture for implementing various applications Figure 10 1 BluSDK SMART Software Architecture ATSAMB11 2017 Microchip Techno...

Страница 98: ...11 Document Revision History Rev A 09 2017 Section Changes Document Initial Release ATSAMB11 2017 Microchip Technology Inc User Guide DS70005335A page 98...

Страница 99: ...and follow the registration instructions Customer Support Users of Microchip products can receive assistance through several channels Distributor or Representative Local Sales Office Field Applicatio...

Страница 100: ...JukeBlox KeeLoq KeeLoq logo Kleer LANCheck LINK MD maXStylus maXTouch MediaLB megaAVR MOST MOST logo MPLAB OptoLyzer PIC picoPower PICSTART PIC32 logo Prochip Designer QTouch RightTouch SAM BA SpyNIC...

Страница 101: ...sham Oregon and design centers in California and India The Company s quality system processes and procedures are for its PIC MCUs and dsPIC DSCs KEELOQ code hopping devices Serial EEPROMs microperiphe...

Страница 102: ...9 8833 7252 Fax 86 29 8833 7256 China Xiamen Tel 86 592 2388138 Fax 86 592 2388130 China Zhuhai Tel 86 756 3210040 Fax 86 756 3210049 India Bangalore Tel 91 80 3090 4444 Fax 91 80 3090 4123 India New...

Отзывы: