
# Channel Map Reporter

---


## Example description

This example ads a couple of changes to the existing Proximity Reporter code in order to visualize the channel map usage during an active connection. Additionally some other parameters are shown over the serial interface like: peer Bluetooth address, connection parameters and disconnection including the disconnect reason.

The information is pushed out over the UART (P1_3, P2_3, 115200 baud, 8-bit, 1 stopbit, no parity, no flow control)

## HW and SW configuration


* **Hardware configuration**

	- This example runs on The DA14681 Bluetooth Smart SoC devices.
	- The Pro Development Kit (ProDK) or customer hardware is needed for this example.
	- The **ProDK mainboard** is combined with the **daughter-board**.
	- Connect the UART to a PC using the **ProDK** on-board FTDI serial-usb chip or a separate FTDI serial-usb cable.

* **Software configuration**

	-*This example requires:*
    * Smartsnippets Studio 1.6.3.
    * SDK1.0.12
	- **SEGGER’s J-Link** tools should be downloaded and installed.
	- Terminal program @ 115200 baud, 8-bit, 1-stopbit, no parity, no flow-control.


## How to run the example

### Initial Setup

Connect your board (ProDK or customer board) to your computer.

- Import the project into your workspace in the same directory as the pxp_reporter (subdirectory: demos)
- Compile the project for the development Kit (Debug- or Release version).
- Program it in the QSPI flash.

Use your favorite terminal program and connect it to the serial port (FTDI lower index port) with the following parameters

    - baudrate: 115200
    - data: 8 bits
    - stop: 1 bit
    - parity: None
    - flow  control: none

After programming the device press the Reset button (K2). You should see the
device entering a loop indicating:

    Channel Map: 0000000000000000000000000000000000000000
    Channel Map: 0000000000000000000000000000000000000000

###Connect to a master device

Take an Android- or Apple phone with a BLE application (like 'LightBlue') and scan for **Dialog PX Reporter**:

![screenshot1|width=20%](assets/LightBlue.png "test title")

<br>
Connect to the **'Dialog PX Reporter'**

Once connected the output over the UART will show the initial connection interval (about 50 mS) and the channel map info:

    Connected to 55:6d:07:90:b3:cf
    Connection parameters: Conn.Int: min=50.00, max=50.00 [mS], Slave lat: 0, Sup.Timeout: 20000 [mS]
    Channel Map: 1111111111111111111111111111111111111000

After a short while the connection interval will change to the value set in the peripheral (pxp-reporter):

    Connection parameters updated: Conn.Int: min=100.00, max=100.00 [mS], Slave lat: 0, Sup.Timeout: 20000 [mS] 
    Channel Map: 1111111111111111111111111111111111111000

A ‘1’ indicates that that particular channel is in use. A ‘0’ means not is use. (The last 3 are the advertising channels 37, 38 and 39 and they are never used in connection).
<br>
UART output can be logged using a terminal program (Teraterm..)


## Known Limitations


- There are No known limitations for this example. But you can check and refer to the following application note for
[known hardware limitations](https://support.dialog-semiconductor.com/system/files/resources/DA14680_681-01-KnownLimitations_v1%200.pdf "known hardware limitations").
- Dialog Software [Forum link](https://support.dialog-semiconductor.com/forums/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software "Forum link").
- you can Refer also for the Troubleshooting section in the DA1585x Getting Started with the Development Kit UM-B-049.


## License


***************************************************************************

Copyright (c) 2015-2018 Dialog Semiconductor. All rights reserved.

This software ("Software") is owned by Dialog Semiconductor.

By using this Software you agree that Dialog Semiconductor retains all
intellectual property and proprietary rights in and to this Software and any
use, reproduction, disclosure or distribution of the Software without express
written permission or a license agreement from Dialog Semiconductor is
strictly prohibited. This Software is solely for use on or in conjunction
with Dialog Semiconductor products.

EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIE, THE
SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. EXCEPT AS OTHERWISE
PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES, IN NO EVENT SHALL
DIALOG SEMICONDUCTOR BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THE SOFTWARE.

***************************************************************************
