diff --git a/.github/workflows/build-cordio-platform-docs.yml b/.github/workflows/build-cordio-platform-docs.yml new file mode 100644 index 0000000000..eaa21184cb --- /dev/null +++ b/.github/workflows/build-cordio-platform-docs.yml @@ -0,0 +1,60 @@ +name: Build & Deploy Cordio Platform Docs + +on: + workflow_dispatch: + + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v3 + id: get-pr + with: + script: | + const request = { + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + } + core.info(`Getting PR #${request.pull_number} from ${request.owner}/${request.repo}`) + try { + const result = await github.pulls.get(request) + return result.data + } catch (err) { + core.setFailed(`Request failed with error ${err}`) + } + - uses: actions/checkout@v3 + with: + repository: ${{ fromJSON(steps.get-pr.outputs.result).head.repo.full_name }} + ref: ${{ fromJSON(steps.get-pr.outputs.result).head.ref }} + fetch-depth: 0 + + - name: Generate Docs (MAX32655) + uses: mattnotmitt/doxygen-action@v1.9.5 + with: + working-directory: Libraries/Cordio/docs + doxyfile-path: cordio_platform_doxyfile + enable-latex: true + + - name: Build PDF + run: | + echo "Building PDF..." + sudo apt-get install texlive-full + sudo make -C Libraries/Cordio/docs/latex + + echo "Copying PDF to Cordio/platform/Documentation" + sudo mv Libraries/Cordio/docs/latex/refman.pdf Libraries/Cordio/docs/latex/Cordio-Platform-Documentation.pdf + sudo mkdir -p Libraries/Cordio/platform/Documentation && sudo cp -r Libraries/Cordio/docs/latex/Cordio-Platform-Documentation.pdf Libraries/Cordio/platform/Documentation/ + + + - name: Push Documentation Files + uses: EndBug/add-and-commit@v9.0.1 + with: + add: 'Libraries/Cordio/platform/Documentation/Platform_ref.pdf' + message: 'Update documentation.' + push: true + + + + diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index e3aa3770ab..fc3ed0d400 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -131,9 +131,19 @@ jobs: mkdir -p $DEST/MAX78000 && cp -r $SOURCE/MAX78000 $DEST/ mkdir -p $DEST/MAX78002 && cp -r $SOURCE/MAX78002 $DEST/ + SOURCE=Libraries/Cordio + DEST=Documentation/$SOURCE + + echo "Copying Cordio documentation..." + mkdir -p $DEST/docs && cp -r $SOURCE/docs/*.md $DEST/docs + mkdir -p $DEST/docs/res && cp -r $SOURCE/docs/res/* $DEST/docs/res + mkdir -p $DEST/platform/Documentation && cp -r $SOURCE/platform/Documentation/*.pdf $DEST/platform/Documentation + echo "Copying any root markdown files into Documentation..." cp -r *.md Documentation/ + python3 Documentation/updateUSERGUIDE-Cordio.py + mkdocs build - name: Publish diff --git a/.github/workflows/scripts/updateUSERGUIDE-Cordio.py b/.github/workflows/scripts/updateUSERGUIDE-Cordio.py new file mode 100644 index 0000000000..5ac1cc1318 --- /dev/null +++ b/.github/workflows/scripts/updateUSERGUIDE-Cordio.py @@ -0,0 +1,72 @@ +from pathlib import Path +from os import listdir + + +TEMPLATE = "- [%s](%s/%s)\n" +repo = Path.cwd().parent.parent +cordio_docs_dir = repo / "Libraries" / "Cordio" / "docs" +platform_docs_dir = repo / "Libraries" / "Cordio" / "platform" / "Documentation" + +cordio_doc_files = [f for f in listdir(cordio_docs_dir) if f.endswith('.md')] +platform_doc_files = [f for f in listdir(platform_docs_dir) if f.endswith('.pdf')] + +with open(repo / "USERGUIDE.md", 'r') as f: + lines = f.readlines() + +idx = 0 +foundStart = False + +for line in lines: + if foundStart: + if line[0] == '#': + end_idx = idx + break + + if '#### Cordio Documentation' in line: + start_idx = idx + foundStart = True + + idx += 1 + +comp_lines = lines[start_idx+1:end_idx] + +for cfile in cordio_doc_files: + for line in lines: + if cfile in line: + cordio_doc_files.remove(cfile) + +for pfile in platform_doc_files: + for line in lines: + if pfile in line: + platform_doc_files.remove(pfile) + +if len(cordio_doc_files) > 0: + entries = [] + for f in cordio_doc_files: + if 'LICENSE' in f: + continue + nav_name = f.split('.')[0].replace("_", " ").title() + entries.append(TEMPLATE % (nav_name, cordio_docs_dir, f)) + +if len(platform_doc_files) > 0: + for f in platform_doc_files: + if 'LICENSE' in f: + continue + nav_name = f.split('.')[0].replace("-", " ").title() + entries.append(TEMPLATE % (nav_name, platform_docs_dir, f)) + + while True: + if lines[end_idx][0] == '-': + end_idx -= 1 + break + end_idx -= 1 + + idx = 0 + for entry in entries: + lines.insert(end_idx, entry) + end_idx += 1 + + content = "".join(lines) + + with open(repo / "USERGUIDE.md", 'w') as f: + f.write(content) diff --git a/Examples/MAX32655/BLE_datc/README.md b/Examples/MAX32655/BLE_datc/README.md index ce8d85db9c..fc6ecb52f4 100644 --- a/Examples/MAX32655/BLE_datc/README.md +++ b/Examples/MAX32655/BLE_datc/README.md @@ -1,578 +1,2 @@ -# Description - -Bluetooth data client that scans for and connects to advertisers with the name of "DATS". - -# Usage - -## LEDs - -The red LED will indicate that an error assertion has occurred. - -The green LED indicates CPU activity. When the LED is on, the CPU is active, when the LED -is off, the CPU is in sleep mode. - -## Setup - -### Board Selection - -Before building firmware you must select the correct value for BOARD in project.mk, e.g. "EvKit_V1". - -### Required Connections -- Connect a USB cable between the PC and the (USB/PWR - UART) connector. - -## Trace Serial Port -When TRACE is enabled in the project.mk, the on-board USB-to-UART adapter can -be used to view the trace messages and interact with the application. Open a serial port terminal with -the following settings. - -Baud : 115200 -Char size : 8 -Parity : None -Stop bits : 1 -HW Flow Control : No -SW Flow Control : No - -## Passkey input -Upon server dsicovery the user will be prompted to enter a passkey. -An arbitrary pin can be entered in the following format -``` -pin (connId) passkey -Eg: -pin 1 123456 - -``` -Next the server is expected to enter the same connId and passkey -to establish a secure connection and share bonding information -which for demonstration purposes,is echoed via the trace mechanism - -Note that either the client or server can enter the passkey first. -The peer device must then match. - - -### Expected Output - -On startup: -``` -terminal: init -32kHz trimmed to 0xF -DatcHandlerInit -Calculating database hash -Datc got evt 32 ->>> Reset complete <<< -Datc got evt 58 -Database hash calculation complete -Datc got evt 21 -Database hash updated -dmDevPassEvtToDevPriv: event: 13, param: 1, advHandle: 0 -Datc got evt 63 -Datc got evt 153 -dmDevPassEvtToDevPriv: event: 12, param: 36, advHandle: 0 -Datc got evt 36 ->>> Scanning started <<< -``` - -When a scan report has been received: -``` -Scan Report: - 55:CF:67:1F:6F:27 -Scan Report: - 00:05:8B:44:12:02 - Name: Fit -``` - -When server has been found: -``` -Scan Report: - 00:18:80:04:52:1F - Name: DATS -dmDevPassEvtToDevPriv: event: 13, param: 37, advHandle: 0 -Datc got evt 37 -Scan results: 4 -dmConnIdByBdAddr not found -dmConnCcbAlloc 1 ->>> Scanning stopped <<< -dmConnSmExecute event=24 state=0 -dmDevPassEvtToDevPriv: event: 14, param: 0, advHandle: 0 -dmConnSmExecute event=28 state=1 -dmDevPassEvtToDevPriv: event: 14, param: 1, advHandle: 0 -dmDevPassEvtToDevPriv: event: 12, param: 39, advHandle: 0 -smpDbGetRecord: connId: 1 type: 0 -smpDbAddDevice -SmpDbGetFailureCount: connId: 1 count: 0 -smpDbGetRecord: connId: 1 type: 0 -smpDbAddDevice -SmpDbGetPairingDisabledTime: connId: 1 period: 0 attemptMult: 0 -Datc got evt 39 ->>> Connection opened <<< -smpSmExecute event=1 state=0 -connId=1 idleMask=0x0001 -Datc got evt 65 -Datc got evt 22 -smpSmExecute event=6 state=1 -smpSmExecute event=17 state=2 -smpSmExecute event=4 state=3 -connId=1 idleMask=0x0001 -Datc got evt 87 -Datc got evt 4 -connId=1 idleMask=0x0009 -smpSmExecute event=6 state=4 -smpSmExecute event=20 state=5 -Datc got evt 46 ->>> Prompt user to enter passkey <<< -Datc got evt 3 -AttcDiscServiceCmpl status 0x00 -Datc got evt 4 -AttcDiscCharCmpl status 0x79 -Datc got evt 4 -AttcDiscCharCmpl status 0x79 -Datc got evt 2 -AttcDiscCharCmpl status 0x00 -connId=1 idleMask=0x0009 -Datc got evt 3 -AttcDiscServiceCmpl status 0x00 -Datc got evt 4 -AttcDiscCharCmpl status 0x79 -Datc got evt 4 -AttcDiscCharCmpl status 0x00 -connId=1 idleMask=0x0009 -Datc got evt 3 -AttcDiscServiceCmpl status 0x00 -Datc got evt 4 -AttcDiscCharCmpl status 0x79 -Datc got evt 4 -AttcDiscCharCmpl status 0x79 -Datc got evt 2 -AttcDiscCharCmpl status 0x00 -connId=1 idleMask=0x0009 -Datc got evt 3 -AttcDiscServiceCmpl status 0x00 -Datc got evt 4 -AttcDiscCharCmpl status 0x79 -Datc got evt 4 -AttcDiscCharCmpl status 0x79 -Datc got evt 2 -AttcDiscCharCmpl status 0x79 -Datc got evt 2 -AttcDiscCharCmpl status 0x00 -connId=1 idleMask=0x0001 -AppDiscComplete connId:1 status:0x04 -connId=1 idleMask=0x0009 -Datc got evt 9 -AttcDiscConfigCmpl status 0x79 -Datc got evt 9 -AttcDiscConfigCmpl status 0x79 -Datc got evt 9 -AttcDiscConfigCmpl status 0x79 -Datc got evt 9 -AttcDiscConfigCmpl status 0x00 -connId=1 idleMask=0x0001 -AppDiscComplete connId:1 status:0x08 -``` -After entering a pin -``` -pin 1 12345 -> smpSmExecute event=4 state=11 -Rand Na -[5fa96af9 f434b4de 3e452813 fef4f5eb] -smpSmExecute event=28 state=12 -Cai -[57964640 e18b1aa1 8ea7d8b2 2eb274c3] -connId=1 idleMask=0x0001 - -``` - -Once server enters a matching pin and encrypted connection is established -``` -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[7e2523a4 be6a8923 8ef900bf d4eaa458] -smpSmExecute event=26 state=16 -Rand Na -[efb856be 61bd11a8 2dff39c0 1f5d4d91] -smpSmExecute event=28 state=12 -Cai -[65f7c942 8c216010 cc73fdc9 bd21120e] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[db4858f8 33a964c1 e35ba27c 1f07e7db] -smpSmExecute event=26 state=16 -Rand Na -[9904fded 40ea2bb1 dfabe4be b9bcba45] -smpSmExecute event=28 state=12 -Cai -[1362d0db 074d32ea 32d0e79c 1155a20b] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[efd27c04 96ff72e0 c893bf54 9c524f0a] -smpSmExecute event=26 state=16 -Rand Na -[5ba16640 fd3af1ae afc6d035 d8eb1fa5] -smpSmExecute event=28 state=12 -Cai -[79603efa ad87d2cd bdc4c83b 17dcffe6] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[c1221276 73df3bf7 90e8df64 741909c1] -smpSmExecute event=26 state=16 -Rand Na -[59ea06d0 760407f7 87415144 fe234a1e] -smpSmExecute event=28 state=12 -Cai -[40b9915c af4a8712 c81e98f9 f197953a] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[325fe15b 5a6862e1 f4de459d 6c91c220] -smpSmExecute event=26 state=16 -Rand Na -[4c56f9f9 b1d91236 8dfb81f8 b0629bb7] -smpSmExecute event=28 state=12 -Cai -[c2fb6b18 63cb9311 d53c3333 0a2924cf] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[7725d42d 35f8e465 b3b6cfed 9bfe125a] -smpSmExecute event=26 state=16 -Rand Na -[3909e384 45979c24 c85d36d3 fc2bd4bf] -smpSmExecute event=28 state=12 -Cai -[9e570480 195412a0 07c84616 36cd6a06] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[1bce9472 21f7d6c4 4f8fe62b 91ac2271] -smpSmExecute event=26 state=16 -Rand Na -[fe57e223 78ca04e3 cd13bd82 ad43289c] -smpSmExecute event=28 state=12 -Cai -[42ba2b2e bd35ebe6 56c59b28 957639d2] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[a35acba5 00eba332 31442e10 aea9dacf] -smpSmExecute event=26 state=16 -Rand Na -[71aa44ad abe2d668 07b79f02 d2a974dc] -smpSmExecute event=28 state=12 -Cai -[5b02fce8 f92549ca 54bea290 c9fdfd1b] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[4a52c87c a504c8cf 49d9e8f0 1a69aca2] -smpSmExecute event=26 state=16 -Rand Na -[0f87eb54 83f4f78b 754d2f74 1b406c0d] -smpSmExecute event=28 state=12 -Cai -[16a9ba43 8c8b39d2 912f1f85 3f738170] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[b2aa1f53 802fa4ad 3e415844 4953c931] -smpSmExecute event=26 state=16 -Rand Na -[466db705 9fd2d031 35759a3f 45869950] -smpSmExecute event=28 state=12 -Cai -[004c8d5f 4413efb9 f60c10c2 8af82058] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[6b93dfa8 91d6bc27 fbb7142a 778d6eab] -smpSmExecute event=26 state=16 -Rand Na -[4d0cfaee 277f0959 ee9ad6b5 bf89e129] -smpSmExecute event=28 state=12 -Cai -[b977b373 4fdeb62d 4b9fc6dd 0cd58ccb] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[7d734f74 37d7575f 9a2176fe 9e0d7793] -smpSmExecute event=26 state=16 -Rand Na -[aa704717 22c5a505 922ea504 c8f32c21] -smpSmExecute event=28 state=12 -Cai -[b8db800a c2cfb643 0ad2127e 154b27e3] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[fb8bfb47 1db075d6 c10dfe20 275580a6] -smpSmExecute event=26 state=16 -Rand Na -[6715c20d 284d6526 c826990b c0266d4d] -smpSmExecute event=28 state=12 -Cai -[9a07bded 4652b3b3 04e58dd3 ddc41f5b] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[9b11572d 6ac46706 2a42ddf7 fa3f7eb6] -smpSmExecute event=26 state=16 -Rand Na -[276b1950 0160195c 2ca2749e 04cc0bba] -smpSmExecute event=28 state=12 -Cai -[7811b835 1ee6cd01 b35e0068 b0e995a2] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[febf4094 ccf93969 adc4d7e3 c3f26246] -smpSmExecute event=26 state=16 -Rand Na -[31c8d021 62bd5eb6 470c008d 0f9a8f69] -smpSmExecute event=28 state=12 -Cai -[6cc99436 0835e6bf b7ccd2a8 81eb7c2d] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[314f5edd e73e8b9e 865c3924 c438e032] -smpSmExecute event=26 state=16 -Rand Na -[4f46b9ce 57474f8d 8d00a000 74bdea15] -smpSmExecute event=28 state=12 -Cai -[baea7468 fabb299a 837bbbfb c47572e2] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[f8a46358 201aab0a ae9aae2c 0c32fb92] -smpSmExecute event=26 state=16 -Rand Na -[b80a6511 3c82e7e6 055243e6 a45202a6] -smpSmExecute event=28 state=12 -Cai -[24c084e8 e92b8e03 1a37f096 f4d5c31f] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[04aa43e8 dac7aa2a 490e6154 11b81966] -smpSmExecute event=26 state=16 -Rand Na -[16bc0b9f a93b2745 729a08b9 85682b0d] -smpSmExecute event=28 state=12 -Cai -[a5caa3a1 b7b66eaa f113972c 88645db6] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[831b8daf 7ae674d8 e2c5fbc3 9fc27be3] -smpSmExecute event=26 state=16 -Rand Na -[3a8e02cf 001e84b3 08d9a24e 19ff9b18] -smpSmExecute event=28 state=12 -Cai -[bf5345f1 299bca3f 0c99eac6 3ea96052] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=13 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=14 -smpSmExecute event=28 state=15 -Cbi -[0a4dec2e 6aebc804 7bb1a21b aadc18c1] -smpSmExecute event=27 state=16 -smpSmExecute event=25 state=19 -DHKey (Shared Secret) -[7cf8b651 6c0f5bff 7d66bbf6 d8d85abd] -[0ef6bf2d 85a594d2 f55dccc3 6f98dd1d] -smpSmExecute event=28 state=20 -T -[a02f2c9d 9a153f28 0bde8cb2 ab2a7b84] -smpSmExecute event=28 state=21 -MAC -[66ebd01a c4818e8b 1cec71bf f0644ed9] -smpSmExecute event=28 state=22 -LTK -[b4cad222 8324e2fb 71bbca0f 04bfc828] -smpSmExecute event=28 state=23 -DHKey Ea -[a2925a68 0b71e9c3 065a959d 39079b01] -smpSmExecute event=28 state=24 -DHKey Eb -[3ed3c373 5b99fc5e 16577603 7a1ba181] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=25 -connId=1 idleMask=0x0001 -smpSmExecute event=8 state=34 -Datc got evt 44 ->>> Connection encrypted <<< -smpSmExecute event=6 state=35 -smpSmExecute event=6 state=35 -smpSmExecute event=12 state=35 -Datc got evt 47 -Datc got evt 47 -smpSmExecute event=12 state=35 -smpSmExecute event=12 state=35 -smpSmExecute event=14 state=35 -connId=1 idleMask=0x0000 -Datc got evt 42 ->>> Pairing completed successfully <<< -dmDevPassEvtToDevPriv: event: 13, param: 1, advHandle: 0 -Datc got evt 58 -Datc got evt 63 -``` -Simple message passing to peer: -``` -btn 2 l -Long Button 2 Press -> Datc got evt 10 -Datc got evt 13 -hello back -``` -Secure message passing to peer: -``` -btn 2 m -Medium Button 2 Press -> Datc got evt 10 -Datc got evt 13 ->> Notification from secure data service <<< -Secure data received! - -``` - -On PHY change request: -``` -btn 1 x -XL Button 1 Press -2 MBit TX and RX PHY Requested -> Datc got evt 70 -DM_PHY_UPDATE_IND - RX: 2, TX: 2 -Datc got evt 65 -btn 1 x -XL Button 1 Press -LE Coded S2 TX and RX PHY Requested -> Datc got evt 70 -DM_PHY_UPDATE_IND - RX: 3, TX: 3 -Datc got evt 65 -btn 1 x -XL Button 1 Press -LE Coded S8 TX and RX PHY Requested -> Datc got evt 70 -DM_PHY_UPDATE_IND - RX: 3, TX: 3 -btn 1 x -XL Button 1 Press -1 MBit TX and RX PHY Requested -> Datc got evt 70 -DM_PHY_UPDATE_IND - RX: 1, TX: 1 -Datc got evt 65 -``` - -Data Transfer Speed test (1M PHY): -``` -btn 2 x -XL Button 2 Press -Starting speed test -... -flowDisabled=1 handle=0 -flowDisabled=0 handle=0 -9520000 bits transferred in 18823249 us -505757 bps -``` - -Data Transfer Speed test (2M PHY): -``` -btn 2 x -XL Button 2 Press -Starting speed test -... -flowDisabled=1 handle=0 -flowDisabled=0 handle=0 -9520000 bits transferred in 9413977 us -1011262 bps -``` - -### Commands -Type the desired command and parameter (if applicable) and press enter to execute the command. - -__help__ Displays the available commands. -__echo (on|off)__ Enables or disables the input echo. On by default. -__btn (ID) (s|m|l|x)__ Simulates button presses. Example: "btn 1 s" for a short button press on button 1. -__pin (ConnID) (Pin Code)__ Used to input the pairing pin code. - -## Push buttons -Push buttons can be used to interact with the application. - -__short__ : press is less than 200 ms -__medium__ : press is between 200 and 500 ms -__long__ : press is between 500 and 1000 ms -__extra long__ : press is greater than 1000 ms - -### When disconnected -1. Button 1 short: Start/Stop scanning -2. Button 1 medium: Cycle through the connection index (select connection) -3. Button 1 long: Clear all bonding info -4. Button 1 extra long: Add RPAO characteristic to GAP service -- needed only when DM Privacy enabled -5. Button 2 extra long: Enable device privacy -- start generating local RPAs every 15 minutes - -### When connected -1. Button 1 short: Start/Stop scanning -2. Button 1 medium: Cycle through connection index (select connection) -3. Button 1 long: Close selected connection -4. Button 2 short: Request PHY change (1M-2M-S2-S8) Only for BLE5 version. -5. Button 2 medium : Send secure message to peer -6. Button 2 long: Send short message to peer -7. Button 2 extra long: Start data transfer speed test +# BLE_datc +Refer to the [BLE_datc_dats](../../../Libraries/Cordio/docs/Applications/BLE_datc_dats.md) documentation in the Cordio Library. \ No newline at end of file diff --git a/Examples/MAX32655/BLE_dats/README.md b/Examples/MAX32655/BLE_dats/README.md index 110bbbce0e..21e710f844 100644 --- a/Examples/MAX32655/BLE_dats/README.md +++ b/Examples/MAX32655/BLE_dats/README.md @@ -1,513 +1,2 @@ -# Description - -Bluetooth data server that advertises as "DATS" and accepts connection requests. - -# Usage - -## LEDs - -The red LED will indicate that an error assertion has occurred. - -The green LED indicates CPU activity. When the LED is on, the CPU is active, when the LED -is off, the CPU is in sleep mode. - -## Setup - -### Board Selection - -Before building firmware you must select the correct value for BOARD in project.mk, e.g. "EvKit_V1". - -### Required Connections -- Connect a USB cable between the PC and the (USB/PWR - UART) connector. - -## Trace Serial Port -When TRACE is enabled in the project.mk, the on-board USB-to-UART adapter can -be used to view the trace messages and interact with the application. Open a serial port terminal with -the following settings. - -Baud : 115200 -Char size : 8 -Parity : None -Stop bits : 1 -HW Flow Control : No -SW Flow Control : No - -### Expected Output - -On startup: -``` -terminal: init -32kHz trimmed to 0x16 -DatsHandlerInit -Dats got evt 32 ->>> Reset complete <<< -dmAdvActConfig: state: 0 -dmAdvActSetData: state: 0 -dmAdvActSetData: state: 0 -dmAdvActStart: state: 0 -HCI_LE_ADV_ENABLE_CMD_CMPL_CBACK_EVT: state: 3 -dmDevPassEvtToDevPriv: event: 12, param: 33, advHandle: 0 -Dats got evt 33 ->>> Advertising started <<< -Dats got evt 21 -Database hash updated - -``` - -When a connection attempting to connect to the client. -``` -Dats got evt 21 -Database hash updated -Dats got evt 153 -dmConnIdByBdAddr not found -dmConnCcbAlloc 1 -dmConnSmExecute event=28 state=0 -dmAdvConnected: state: 1 -dmDevPassEvtToDevPriv: event: 13, param: 34, advHandle: 0 -smpDbGetRecord: connId: 1 type: 0 -smpDbAddDevice -SmpDbGetFailureCount: connId: 1 count: 0 -smpDbGetRecord: connId: 1 type: 0 -smpDbAddDevice -SmpDbGetPairingDisabledTime: connId: 1 period: 0 attemptMult: 0 -Dats got evt 39 ->>> Connection opened <<< -Dats got evt 65 -Dats got evt 22 -smpSmExecute event=6 state=0 -connId=1 idleMask=0x0001 -Dats got evt 49 -smpSmExecute event=2 state=2 -smpSmExecute event=17 state=3 -smpSmExecute event=4 state=5 -smpSmExecute event=6 state=4 -smpSmExecute event=20 state=6 -connId=1 idleMask=0x0001 -Dats got evt 46 ->>> Prompt user to enter passkey <<< -Dats got evt 87 -connId=1 idleMask=0x0005 -connId=1 idleMask=0x0005 -connId=1 idleMask=0x0005 -connId=1 idleMask=0x0005 -connId=1 idleMask=0x0005 -connId=1 idleMask=0x0005 -connId=1 idleMask=0x0005 -connId=1 idleMask=0x0005 - -``` -When matching pins have been entered -``` -> smpSmExecute event=4 state=13 -Rand Nb -[52730a1e 080e2b3f 6d010f4b 0d29b8ac] -smpSmExecute event=28 state=15 -Cbi -[520aab85 e23b56d5 70598231 64553242] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[634082f9 ae97841d 408a0609 d3149a0f] -Ca Peer -[634082f9 ae97841d 408a0609 d3149a0f] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[2b4f65e1 41465986 1732c49b 0779c049] -smpSmExecute event=28 state=15 -Cbi -[34b63e15 0a0b1d8a fbaac17d ae94c891] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[e7b74ec3 7bb660e0 fd3ffb69 a70fc1b5] -Ca Peer -[e7b74ec3 7bb660e0 fd3ffb69 a70fc1b5] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[cb42c521 d4edb9cd fe2a5777 526d153d] -smpSmExecute event=28 state=15 -Cbi -[58d9a8c4 c4710a1a bd41ed81 2e666953] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[d100648f ae87b3e0 850e96ef 3c2c9a47] -Ca Peer -[d100648f ae87b3e0 850e96ef 3c2c9a47] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[21a3cd36 613f1834 c6e3d6fa 337e3f6c] -smpSmExecute event=28 state=15 -Cbi -[314e5afe c5799362 0c3c7e01 54a62b7d] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[bc03c14d cf73fbab c64c8de8 65c9bd3f] -Ca Peer -[bc03c14d cf73fbab c64c8de8 65c9bd3f] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[3e0cb037 9edea6c2 dfdd238f eee47a18] -smpSmExecute event=28 state=15 -Cbi -[223876ac 32cfa06e 5764766f e655cfda] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[3a1dceac 4ed11dc5 60384042 5f625042] -Ca Peer -[3a1dceac 4ed11dc5 60384042 5f625042] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[23ca1caf 70a3ba5b fd40e6ca db907405] -smpSmExecute event=28 state=15 -Cbi -[0f969efc f159e4c6 588c68ae 5d1f9851] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[c34f8c33 3e16ee08 3cac6f79 1eea831f] -Ca Peer -[c34f8c33 3e16ee08 3cac6f79 1eea831f] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[840f704c 59845fc2 47d5463a 9c68159b] -smpSmExecute event=28 state=15 -Cbi -[f5a84dfe 36bdfc2d 410e133d 0c474039] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[e27af695 a9227a18 74c2ba3d 57ed5254] -Ca Peer -[e27af695 a9227a18 74c2ba3d 57ed5254] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[5558d557 ba639669 226f7665 98ba1755] -smpSmExecute event=28 state=15 -Cbi -[c8158453 c50a9448 236c7bd5 fe249a0d] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[530da1cb 834ec9fa 6076fd05 037dce54] -Ca Peer -[530da1cb 834ec9fa 6076fd05 037dce54] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[9f57fda8 897aac72 810475a4 eda95e4c] -smpSmExecute event=28 state=15 -Cbi -[12494fdf 83718797 5efa3ff7 4e230a9d] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[b9c97dbe 7a725ab4 20c59148 10821669] -Ca Peer -[b9c97dbe 7a725ab4 20c59148 10821669] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[564e5d0e 2605341f 4d5b6913 0c89c1aa] -smpSmExecute event=28 state=15 -Cbi -[a8b37963 eafdcaee ecbf62ab a23f686a] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[b1387cd1 054a3616 3a73b06d 085e74b7] -Ca Peer -[b1387cd1 054a3616 3a73b06d 085e74b7] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[fc4d0a4e 2e6ca8f1 65f242a8 88876d0e] -smpSmExecute event=28 state=15 -Cbi -[623c1256 7e20dba1 f5257b86 11b54ece] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[4540e3cd 77e8ac57 8024607c 0de42ce2] -Ca Peer -[4540e3cd 77e8ac57 8024607c 0de42ce2] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[144e1412 64996fa0 d686011f 7913327d] -smpSmExecute event=28 state=15 -Cbi -[b354740a 3d097abc e33af952 cffc0e8a] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[ba1e5505 2e488dda b984bd08 2d07fdeb] -Ca Peer -[ba1e5505 2e488dda b984bd08 2d07fdeb] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[2596e6cd 44929e11 9791ba02 62e3feef] -smpSmExecute event=28 state=15 -Cbi -[3790e2f7 96ca63b6 826bbf5c 077c3f31] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[fe05bd6a 1f277dee 124de8b0 02c03343] -Ca Peer -[fe05bd6a 1f277dee 124de8b0 02c03343] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[06175016 3aabb9f3 f3aa5925 c9b8a43d] -smpSmExecute event=28 state=15 -Cbi -[57d2399c 89fbc8f0 3ee71020 f66b45d5] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[c2dff69b 7ae8eba8 e92f3b57 ff3978c7] -Ca Peer -[c2dff69b 7ae8eba8 e92f3b57 ff3978c7] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[5c70daab 66fe0495 07d0e27d 824d9865] -smpSmExecute event=28 state=15 -Cbi -[f03928aa 2324a2ca 8c3c1fd8 9d589afe] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[9f8dec26 018dcea5 0cc56156 32b9107b] -Ca Peer -[9f8dec26 018dcea5 0cc56156 32b9107b] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[fd89b81d e2b3fdaf f22cf4c4 b39da763] -smpSmExecute event=28 state=15 -Cbi -[c005af08 39334b4a ac68cf0a ca5acc00] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[94681382 aa6a4d27 1b8eb879 a5ed8043] -Ca Peer -[94681382 aa6a4d27 1b8eb879 a5ed8043] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[5b0789ba 4bd1a9f8 10e15f9d 0dbd4ac2] -smpSmExecute event=28 state=15 -Cbi -[b719fe1d 02e6cc10 8776a1b4 0bc0fa6b] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[3f8a85da fad78d81 0c8e0733 876df6fb] -Ca Peer -[3f8a85da fad78d81 0c8e0733 876df6fb] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[c0c90b30 03659e86 a143abe4 ec289e73] -smpSmExecute event=28 state=15 -Cbi -[d02d6808 35888e79 55e04238 f0930c07] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[4efc0b02 bcd8bc6a ac93b70c effeaee1] -Ca Peer -[4efc0b02 bcd8bc6a ac93b70c effeaee1] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[96aab51d 5e627668 ba927ed6 d1192554] -smpSmExecute event=28 state=15 -Cbi -[49660e21 5b3e82cd 32e3ac9a d839ad2d] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[2db916d0 32b02469 1711edf5 812ae090] -Ca Peer -[2db916d0 32b02469 1711edf5 812ae090] -connId=1 idleMask=0x0001 -smpSmExecute event=26 state=18 -smpSmExecute event=6 state=14 -Rand Nb -[d9e874e4 9b02cb3f 9aac021d 7ad59561] -smpSmExecute event=28 state=15 -Cbi -[837b81cf 6c409caa c29a550b 649b2c46] -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=16 -smpSmExecute event=28 state=17 -Ca -[f3d0b1b5 76097bfb 14418e57 6d3c11ba] -Ca Peer -[f3d0b1b5 76097bfb 14418e57 6d3c11ba] -smpSmExecute event=27 state=18 -connId=1 idleMask=0x0001 -smpSmExecute event=6 state=21 -smpSmExecute event=25 state=22 -DHKey (Shared Secret) -[bf891259 97f62954 0f8d8934 5bcd585f] -[48fc2eb4 4c6f5c19 b8f817a9 907571b3] -smpSmExecute event=28 state=23 -T -[72c2ed8a fe1ae569 8237053f b5af654c] -smpSmExecute event=28 state=24 -MAC -[273eaeb4 163166a1 362c8773 888811aa] -smpSmExecute event=28 state=25 -LTK -[7eacbbfe 776de847 1b78effc 32e84ba5] -smpSmExecute event=28 state=26 -DHKey Ea -[e619e7cf 7d654f17 f621cb5c f6dd720b] -smpSmExecute event=28 state=27 -DHKey Eb -[1e72f16f dcab7a66 2787c1ce ee93d5ec] -connId=1 idleMask=0x0001 -connId=1 idleMask=0x0001 -smpSmExecute event=8 state=36 -Dats got evt 44 ->>> Connection encrypted <<< -Dats got evt 47 -smpSmExecute event=12 state=37 -smpSmExecute event=12 state=37 -smpSmExecute event=6 state=37 -smpSmExecute event=6 state=37 -smpSmExecute event=14 state=37 -connId=1 idleMask=0x0000 -Dats got evt 47 -Dats got evt 42 ->>> Pairing completed successfully <<< -dmDevPassEvtToDevPriv: event: 13, param: 1, advHandle: 0 -Dats got evt 58 -Dats got evt 63 -Dats got evt 153 - -``` -When PHY change performed -``` -> btn 2 s -Short Button 2 Press -2 MBit TX and RX PHY Requested -Dats got evt 70 -DM_PHY_UPDATE_IND - RX: 2, TX: 2 -Dats got evt 65 -App got evt 16 -App got evt 16 -connId=1 idleMask=0x0000 -> btn 2 s -Short Button 2 Press -LE Coded S2 TX and RX PHY Requested -Dats got evt 70 -DM_PHY_UPDATE_IND - RX: 3, TX: 3 -Dats got evt 65 -App got evt 16 -App got evt 16 -dmConnUpdExecute event=113 state=3 -dmConnSmExecute event=30 state=3 -Dats got evt 41 -> btn 2 s -Short Button 2 Press -LE Coded S8 TX and RX PHY Requested -Dats got evt 70 -DM_PHY_UPDATE_IND - RX: 3, TX: 3 -> btn 2 s -Short Button 2 Press -1 MBit TX and RX PHY Requested -Dats got evt 70 -DM_PHY_UPDATE_IND - RX: 1, TX: 1 -Dats got evt 65 -``` -When message received from peer -``` -hello world -hciCoreTxAclStart len=18 -Dats got evt 18 -``` -When secure message recevied from peer -``` ->> Received secure data << -Secret number is 0x42 -Dats got evt 18 - -``` -### Commands -Type the desired command and parameter (if applicable) and press enter to execute the command. - -__help__ Displays the available commands. -__echo (on|off)__ Enables or disables the input echo. On by default. -__btn (ID) (s|m|l|x)__ Simulates button presses. Example: "btn 1 s" for a short button press on button 1. -__pin (ConnID) (Pin Code)__ Used to input the pairing pin code. - -## Push buttons -Push buttons can be used to interact with the application. - -__short__ press is less than 200 ms -__medium__ press is between 200 and 500 ms -__long__ press is between 500 and 1000 ms -__extra long__ press is greater than 1000 ms - -### When disconnected -1. Button 1 short press: Start advertising -2. Button 1 medium press: Enter bondable mode -3. Button 1 long press: Clear all bonding info -4. Button 1 extra long press: Show version info -5. Button 2 short press: Stop advertising - -### When connected -1. Button 2 short press: Change PHY (1M-2M-Coded_S2-Coded_S8) +# BLE_dats +Refer to the [BLE_datc_dats](../../../Libraries/Cordio/docs/Applications/BLE_datc_dats.md) documentation in the Cordio Library. \ No newline at end of file diff --git a/Libraries/Cordio/CONTRIBUTING.md b/Libraries/Cordio/CONTRIBUTING.md deleted file mode 100644 index 6281ea6e43..0000000000 --- a/Libraries/Cordio/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -This repository does not support contribution. diff --git a/Libraries/Cordio/README.md b/Libraries/Cordio/README.md index 4006dd01ab..4ed13fd01b 100644 --- a/Libraries/Cordio/README.md +++ b/Libraries/Cordio/README.md @@ -1,84 +1,25 @@ -Packetcraft Protocol Software -============================= +# Cordio +This library implements the Bluetooth Low Energy stack , forked from [Packetcraft](https://github.com/packetcraft-inc/stacks). It depends on additional libraries within the msdk repository. All of the applications utilizing this library can be found in the [Examples](../../Examples) directory. -Packetcraft protocol software is a collection of embedded stacks implementing the Bluetooth Low Energy Link Layer, Host, Profile and Mesh specification (www.bluetooth.org). +## Getting Started +The best application to get started with is the [BLE_periph](docs/Applications/BLE_periph.md) application. It is a simple periphal application that will allow you to advertise and connect with a central device such as a smart phone. -This repository contains open source release of Packetcraft's software. This is a qualified release and may be used in products. Please consult the [Bluetooth Qualification Process](https://www.bluetooth.com/develop-with-bluetooth/qualification-listing) for further details regarding additional certification requirements. +Follow the MSDK [README](../../README.md) instructions to install the necessary tools and create a new project. Build and run the BLE_periph application for the appropriate target. +## ADI Attach +ADI Attach is a smart phone applicaiton that can be used for Bluetooth debugging and development. +* Scan for advertising peripherals. +* Connect to devices and discover profiles, services. +* Read and write charcteristics. +* Subscribe to noficiations. +* Perform over-the-air firmware updates with supporing devices. -Release notes -------------- +## BLE-PyDex +BLE-PyDex is a hardware agnostic Bluetooth device explorer designed to aid in the development and debugging of Bluetooth applications. -This latest release of the Packetcraft Host and Packetcraft Controller is Bluetooth 5.2 qualified and implements the following new Bluetooth 5.2 features: LE Isochronous Channels, Enhanced Attribute Protocol, and LE Power Control. +https://github.com/EdwinFairchild/BLE-PyDex -This release includes the following completed requirements for r20.05: - - FW-3340 Isochronous Demo: single BIS data stream - FW-3354 TCRL.2019-1 compliant - FW-3359 Core v5.2: LE Isochronous Channels (ISO) - FW-3360 Core v5.2: LE Power Control - FW-3361 Core v5.2: Enhanced ATT (EATT) - FW-3617 Core v5.2: Isochronous Abstraction Layer (ISOAL) - FW-3726 Core v5.2: Host Support for LE Isochronous Channels (ISO) - FW-3727 Nordic nRF5 SDK 16.0.0 - FW-3730 Compile BLE host for 64-bit platform - FW-3736 Light CTL Model - FW-3738 Mesh v1.0.1 compliant - FW-3739 TCRL.2019-2 qualification - FW-3750 Laird BL654 platform - FW-3767 SBC codec - FW-3803 GCC compiler support for gcc-arm-none-eabi-9-2019-q4-major - FW-3820 Protect against SweynTooth vulnerability - - -Getting Started ---------------- - -**1. Toolchain** - -If using a system with package manager such as Ubuntu, use the following command line to install dependent tools: - -``` -sudo apt-get install build-essential binutils-arm-none-eabi -``` - -Alternatively download and install the GNU Arm Embedded Toolchain from here and add the path to the `bin` folder to your PATH environment. - -* [GNU Arm Embedded Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm) - - -**2. Build** - -Select a project to build. The following folders contains buildable projects: - -* Packetcraft Profile sample application: [ble-apps/build](ble-apps/build) -* Packetcraft Mesh sample application: [ble-mesh-apps/build](ble-mesh-apps/build) -* Packetcraft Controller sample application: [controller/build](controller/build) - -Consult the Sample App Developer's Guide (below) for more information about the application usage. - -For example, to build Packetcraft's sample Bluetooth Low Energy Tag device use the following make command from the root repo folder: - -``` -make -C ble-apps/build/tag/gcc -``` - -This command will build a complete device image including the Tag sample application, Profiles, Host, Link Layer and platform drivers for the Nordic nRF52840 / PCA10056 development board. The resulting image is located at `ble-apps/build/tag/gcc/bin/tag.bin`. - - -**3. Program** - -To install the firmware image on a Nordic PCA10056 developmnent board, plug a USB cable into your PCA10056. Drag-n-Drop the resulting image from the previous step onto the mass storage drive called "JLINK". - - -Documentation -------------- - -See the docs directory. - - -Certification -------------- +## Certification Bluetooth LE Mesh solution implementing of the Bluetooth Mesh Profile 1.0 and the Bluetooth Mesh Model 1.0 wireless technical specifications @@ -92,36 +33,111 @@ Bluetooth LE Link Layer protocol stack implementing Bluetooth 5.2 specification * [QDID 146281](https://launchstudio.bluetooth.com/ListingDetails/103599) +MAX32655 controller subsystem + +* [QDID 159701](https://launchstudio.bluetooth.com/ListingDetails/119468) + +MAX32665 controller subsystem + +* [QDID 142345](https://launchstudio.bluetooth.com/ListingDetails/98880) + +Consult the [Bluetooth Qualification Process](https://www.bluetooth.com/develop-with-bluetooth/qualification-listing) for further details regarding certification. -Verification ------------- +## Supported Features -Packetcraft Mesh is verified with the TCRL.2019-2 compliance tester using the following: +* **LE Dual Mode Topology:** Advertise/Scan while maintaining multiple adjacent connections. +* **2M PHY:** High speed PHY with 2 Mbps symbol rate. +* **Coded PHY:** Forward error correction, 125 kbps or 500 kbps symbol rate. +* **Extended Advertising:** Enhanced advertising and scanning. +* **Periodic Advertising:** Broadcasting and receiving periodic advertisements. +* **EATT:** Enhanced Attribute protocol. +* **LE Secure Connections:** LE Secure Connections is an enhanced security feature introduced in Bluetooth v4.2. It uses a Federal Information Processing Standards (FIPS) compliant algorithm called Elliptic Curve Diffie Hellman (ECDH) for key generation. +* **Data Length Extension:** Extend the maximum data length supported in a connection. +* **LE Power Control:** Dynamic TX power control. +* **\*OTA firmware update:** Over-the-air firmware update is not a standard Bluetooth feature. We have a wireless data exchange service that can be used for OTA firmware updates. See the BLE_otac_otas examples, the ADI Attach smart phone app, and [BLE-PyDex](https://github.com/EdwinFairchild/BLE-PyDex) for details. -* Bluetooth Profile Tuning Suites 7.6.1 +## Features in development +* **Direction finding:** Detect the direction of the incoming signal. Also known as Angle of Arrival (AoA) and Angle of Departure (AoD). Hardware support on MAX32655 and MAX32690, unavailable on MAX32665, software in development. +* **LE Audio:** Isochronous audio with Bluetooth LE. Hardare support on all platforms, software in development. -Packetcraft Host is verified with the TCRL.2019-2 compliance tester using the following: +## Frequently asked questions -* Bluetooth Profile Tuning Suites 7.6.1 +### How do I change the advertising parameters? +Peripheral applications will have a static structure that contains all of the advertising parameters. If run-time changes are desired, you must call ```AppAdvStop()``` before changing the parameters and ```AppAdvStart()``` to resume. -Packetcraft Profiles is verified with the TCRL.2018-2 compliance tester using the following: -* Bluetooth Profile Tuning Suites 7.3.0 +With this configuration, the device will advertise at a fast interval (300 * 0.625 = 187.5 ms) for 5 seconds. It will then advertise slowly (1600 * 0.625 = 1000 ms) indefinetly. +``` c +/*! configurable parameters for advertising */ +static const appAdvCfg_t datsAdvCfg = { + { 5000, 0}, /*! Advertising durations in ms, 0 is infinite */ + { 300, 1600} /*! Advertising intervals in 0.625 ms units */ +}; +``` + +### How do I change the connection parameters? +Only the master of the connection can change the connection parameters. Peripheral devices can request a change, but only the master can accept and set the connection parameters. Cell phones and mobile operatings systems have different restrictions on the connection parameters. + +Peripheral applications have the following structure that is used to request connection parameter updates. + +```c +/* iOS connection parameter update requirements + + The connection parameter request may be rejected if it does not meet the following guidelines: + * Peripheral Latency of up to 30 connection intervals. + * Supervision Timeout from 2 seconds to 6 seconds. + * Interval Min of at least 15 ms. + * Interval Min is a multiple of 15 ms. + * One of the following: + * Interval Max at least 15 ms greater than Interval Min. + * Interval Max and Interval Min both set to 15 ms. + * Interval Max * (Peripheral Latency + 1) of 2 seconds or less. + * Supervision Timeout greater than Interval Max * (Peripheral Latency + 1) * 3. +*/ + +/*! configurable parameters for connection parameter update */ +static const appUpdateCfg_t datsUpdateCfg = { + 0, + /*! ^ Connection idle period in ms before attempting + connection parameter update. set to zero to disable */ + (15 * 8 / 1.25), /*! Minimum connection interval in 1.25ms units */ + (15 * 12 / 1.25), /*! Maximum connection interval in 1.25ms units */ + 0, /*! Connection latency */ + 600, /*! Supervision timeout in 10ms units */ + 5 /*! Number of update attempts before giving up */ +}; +``` +The DmConnUpdate() function can also be used to request a connection parameter update from the peripheral or initiate one from the master. + +```c +/*************************************************************************************************/ +/*! + * \brief Update the connection parameters of an open connection + * + * \param connId Connection identifier. + * \param pConnSpec Connection specification. + * + * \return None. + */ +/*************************************************************************************************/ +void DmConnUpdate(dmConnId_t connId, hciConnSpec_t *pConnSpec); +``` -Packetcraft Link Layer conforms to the Bluetooth TCRL.2019-2 requirements verified with the following: +### How do I use the low power modes? +All of the applications will enter sleep mode in idle when build with ```DEBUG=0```. The Wireless Stack Framework (WSF) operating system will call PalSysSleep() mode when idle. With ```DEBUG=1```, the CPU will stay in active mode to leave the debugger enabled. -* Teledyne Harmony LE Tester version 19.12.16916.21195 +To enter the lowest power states, refer to the BLE_FreeRTOS application. This will create FreeRTOS tasks for the Cordio stack and allow users to add additional tasks. Enable ```configUSE_TICKLESS_IDLE``` and the device will enter standby mode and deep sleep between events. -This product was compiled and tested with the following version of GNU GCC +**WARNING:** The CPU debugger is disabled in sleep modes. If your application enters sleep mode directly after reset, it will be difficult to debug and reporgram. -* gcc-arm-none-eabi-9-2019-q4-major +### How do I send unformatted data like a UART? +Unfortunatly there is not a Bluetooth SIG defined standard for this protocol. This stack has a proprietary data transfer service that is used to transmit unformatted data between devices. Refer to the BLE_dats (BLE Data Server) for the peripheral application. You can connect to this device with the BLE_datc (BLE data client) application to see simple data transmission. Refer to the BLE_dats and BLE_dats [README](docs/Applications/BLE_datc_dats.md) for more information. +### How do I additional tasks and handlers to the WSF RTOS? -Platforms ---------- +## Additional Documentation +The Cordio architecture is described [here](docs/ARCHITECTURE.md). -This release was tested on the following platforms. Note: platforms listed may not be available in this repository. +Documentation for each of the supporting applications can be found [here](docs/Applications). -* Nordic nRF52840 / PCA10056 development kit / Nordic nRF5 SDK 16.0.0 (make configuration: "PLATFORM=nordic BOARD=PCA10056") -* Nordic nRF52832 / PCA10040 development kit / Nordic nRF5 SDK 16.0.0 (make configuration: "PLATFORM=nordic BOARD=PCA10040") -* Laird BL654 / 451-00004 USB adapter / Nordic nRF5 SDK 16.0.0 (make configuration: "PLATFORM=laird") +Documentation for Python tools used for Bluetooth development and debugging can be found [here](../../Tools/Bluetooth/README.md). diff --git a/Libraries/Cordio/docs/ARCHITECTURE.md b/Libraries/Cordio/docs/ARCHITECTURE.md new file mode 100644 index 0000000000..4a80896ae2 --- /dev/null +++ b/Libraries/Cordio/docs/ARCHITECTURE.md @@ -0,0 +1,80 @@ +# Architecture + +This document describes the Cordio software architecture. Refer to the Bluetooth specificaion Volume 1, Part A for additional information regarding the Bluetooth architecture. + +![Software Stack](res/Software_Stack.jpg) + +## Application + +The App Framework performs many operations common to Bluetooth LE embedded applications, such as: +* Application-level device, connection, and security management. +* Simple user interface abstractions for button press handling, sounds, display, and other user feedback. +* An abstracted device database for storing bonding data and other device parameters. + +## Profiles and Services + +The GATT Profile specifies the structure in which profile data is exchanged. This structure defines basic elements such as services and characteristics, used in a profile. The top level of the hierarchy is a profile. A profile is composed of one or more services necessary to fulfill a use case. A service is composed of characteristics or references to other services. Each characteristic contains a value and may contain optional information about the value. The service and characteristic and the components of the characteristic (i.e., value and descriptors) contain the profile data and are all stored in Attributes on the server. + +![Profiles](res/Profiles.PNG) + +## Wireless Stack Framework + +The Wireless Software Foundation (WSF) is a simple OS wrapper, porting layer, and general-purpose software service used by the software system. The goal of WSF is to stay small and lean, supporting only the basic services required by the stack. It consists of the following: +* Event handler service with event and message passing. +* Timer service. +* Queue and buffer management service. +* Portable data types. +* Critical sections and task locking. +* Trace and assert diagnostic services. +* Security interfaces for encryption and random number generation. + +### Platform Adaption Layer + +The Platform Adaption Layer is the abstraction between the software stack and the hardware. It includes APIs for timers, UART, RTC, and various system level functions such as sleep and memory management. + +## Attribute Protocol +The ATT subsystem implements the attribute protocol and generic attribute profile (GATT). It contains two independent subsystems: The attribute protocol client (ATTC) and attribute protocol server (ATTS). + +ATTC implements all attribute protocol client features and is designed to meet the client requirements of the generic attribute profile. ATTC can support multiple simultaneous connections to different servers. + +ATTS implements all attribute protocol server features and has support for multiple simultaneous client connections. ATTS also implements the server features defined by the generic attribute profile. + +## Device Manager + +The DM subsystem implements device management procedures required by the stack. These procedures are partitioned by procedure category and device role (master or slave). The following procedures are implemented in DM: + +* Advertising and device visibility: Enable/disable advertising, set advertising parameters and data, set connectability and discoverability. +* Scanning and device discovery: Start/stop scanning, set scan parameters, advertising reports, name discovery. +* Connection management: Create/accept/remove connections, set/update connection parameters, read RSSI. +* Security management: Bonding, storage of security parameters, authentication, encryption, authorization, random address management. +* Local device management: Initialization and reset, set local parameters, vendor-specific commands. +DM procedures support the Generic Access Profile (GAP) when applicable. + +## Security Manager Protocol +The Security Manager Protocol (SMP) is the peer-to-peer protocol used to generate encryption keys and identity keys. The protocol operates over a dedicated fixed L2CAP channel. The SMP block also manages storage of the encryption keys and identity keys and is responsible for generating random addresses and resolving random addresses to known device identities. The SMP block interfaces directly with the Controller to provide stored keys used for encryption and authentication during the encryption or pairing procedures. + +The SMP subsystem implements the security manager protocol. It contains two independent subsystems: +* The initiator (SMPI). SMPI implements the initiator features of the security manager protocol and has support for multiple simultaneous connections. +* The responder (SMPR). SMPR implements the responder features of the security manager protocol and has support for only one connection (by Bluetooth specification design). + +SMP also implements the cryptographic toolbox, which uses AES. The interface to AES is asynchronous and abstracted through WSF. SMP also implements functions to support data signing. + +## Logical Link Control Adaptation Protocol + +The L2CAP (Logical Link Control Adaptation Protocol) resource manager block is responsible for managing the ordering of submission of PDU fragments to the baseband and some relative scheduling between channels to ensure that L2CAP channels with QoS commitments are not denied access to the physical channel due to Controller resource exhaustion. This is required because the architectural model does not assume that a Controller has limitless buffering, or that the HCI is a pipe of infinite bandwidth. + +L2CAP Resource Managers may also carry out traffic conformance policing to ensure that applications are submitting L2CAP SDUs within the bounds of their negotiated QoS settings. The general Bluetooth data transport model assumes well-behaved applications, and does not define how an implementation is expected to deal with this problem. + +## Host Controller Interface + +The HCI subsystem implements the host-controller interface specification. This specification defines commands, events, and data packets sent between a Bluetooth LE protocol stack on a host and a link layer on a controller. +The HCI API is optimized to be a thin interface layer for a single chip system. It is configurable for either a single chip system or traditional system with wired HCI. +This configurability is accomplished through a layered implementation. A core layer can be configured for either a single chip system or wired HCI. A transport and driver layer below the core layer can be configured for different wired transports such as UART. + +## Link Layer + +The link layer is responsible for the creation, modification and release of logical links (and, if required, their associated logical transports), as well as the update of parameters related to physical links between devices. The link layer achieves this by communicating with the link layer in remote Bluetooth devices using the Link Layer Protocol (LL) in LE. The LL protocol allows the creation of new logical links and logical transports between devices when required, as well as the general control of link and transport attributes such as the enabling of encryption on the logical transport, and the adapting of transmit power on the physical link. + +## Physical Layer + +The PHY block is responsible for transmitting and receiving packets of information on the physical channel. A control path between the baseband and the PHY block allows the baseband block to control the timing and frequency carrier of the PHY block. The PHY block transforms a stream of data to and from the physical channel and the baseband into required formats. diff --git a/Libraries/Cordio/docs/Applications/BLE_datc_dats.md b/Libraries/Cordio/docs/Applications/BLE_datc_dats.md new file mode 100644 index 0000000000..2de62ffdd6 --- /dev/null +++ b/Libraries/Cordio/docs/Applications/BLE_datc_dats.md @@ -0,0 +1,1088 @@ +# BLE_datc_dats +BLE Data Client and Data Server. These examples demonstrate a simple data client and server. The intent here is to show simple unformatted data exchange between two devices. + +The Bluetooth specification does not define a simple data exchange protocol, similar to UART. We use a proprietary GATT service to offer this feature. + +The data server will advertise with a devices name of "DATS". The data client will scan for this device and create a connection. Once the conneciton has been created and the client completes the discovery, it will enable notificaitons and indiciations on the proprietary data serivce. This will allow the server to transmit data to the client with notifications to the proprietary data characteristic. The client can transmit data to the server by writing to the proprietary data characteristic. + +
+ +
+ ++ADI Attach connected to DATS +
+ +## ARM Proprietary data service + +**UUID:** E0262760-08C2-11E1-9073-0E8AC72E1001 + +This is a proprietary serivce is used for simple unformatted data exchange between the server and the client. + +## Secure data service + +**UUID:** 42FC367E-32D9-4285-87C6-339924D135BE + +This is another proprietary service used for secure data exchange that requires elevated levels of encryption and authentication. Devices must be paired with LE Secure Connections to enable data transfer with this service. + +## Passkey input +Upon server discovery the user will be prompted to enter a passkey. +An arbitrary pin can be entered in the following format +``` +pin (connId) passkey +Eg: +pin 1 123456 + +``` +Next the server is expected to enter the same connId and passkey +to establish a secure connection and share bonding information +which for demonstration purposes,is echoed via the trace mechanism + +Note that either the client or server can enter the passkey first. +The peer device must then match. + +## LEDs + +The red LED will indicate that an error assertion has occurred. + +The green LED indicates CPU activity. When the LED is on, the CPU is active, when the LED +is off, the CPU is in sleep mode. + +## Board Setup + +### Board Selection + +Before building firmware you must select the correct value for BOARD in project.mk, e.g. "EvKit_V1". + +### Required Connections +- Connect a USB cable between the PC and the (USB/PWR - UART) connector. + +### Trace Serial Port +When TRACE is enabled in the project.mk, the on-board USB-to-UART adapter can +be used to view the trace messages and interact with the application. Open a serial port terminal with +the following settings. + +Baud : 115200 +Char size : 8 +Parity : None +Stop bits : 1 +HW Flow Control : No +SW Flow Control : No + + +# BLE_Dats + +Bluetooth data server that advertises as "DATS" and accepts connection requests. This exmaples contains two proprietary services that are used to show simple message passing to and from the data client. + +### Expected Output + +On startup: +``` +terminal: init +32kHz trimmed to 0x16 +DatsHandlerInit +Dats got evt 32 +>>> Reset complete <<< +dmAdvActConfig: state: 0 +dmAdvActSetData: state: 0 +dmAdvActSetData: state: 0 +dmAdvActStart: state: 0 +HCI_LE_ADV_ENABLE_CMD_CMPL_CBACK_EVT: state: 3 +dmDevPassEvtToDevPriv: event: 12, param: 33, advHandle: 0 +Dats got evt 33 +>>> Advertising started <<< +Dats got evt 21 +Database hash updated + +``` + +When a connection attempting to connect to the client. +``` +Dats got evt 21 +Database hash updated +Dats got evt 153 +dmConnIdByBdAddr not found +dmConnCcbAlloc 1 +dmConnSmExecute event=28 state=0 +dmAdvConnected: state: 1 +dmDevPassEvtToDevPriv: event: 13, param: 34, advHandle: 0 +smpDbGetRecord: connId: 1 type: 0 +smpDbAddDevice +SmpDbGetFailureCount: connId: 1 count: 0 +smpDbGetRecord: connId: 1 type: 0 +smpDbAddDevice +SmpDbGetPairingDisabledTime: connId: 1 period: 0 attemptMult: 0 +Dats got evt 39 +>>> Connection opened <<< +Dats got evt 65 +Dats got evt 22 +smpSmExecute event=6 state=0 +connId=1 idleMask=0x0001 +Dats got evt 49 +smpSmExecute event=2 state=2 +smpSmExecute event=17 state=3 +smpSmExecute event=4 state=5 +smpSmExecute event=6 state=4 +smpSmExecute event=20 state=6 +connId=1 idleMask=0x0001 +Dats got evt 46 +>>> Prompt user to enter passkey <<< +Dats got evt 87 +connId=1 idleMask=0x0005 +connId=1 idleMask=0x0005 +connId=1 idleMask=0x0005 +connId=1 idleMask=0x0005 +connId=1 idleMask=0x0005 +connId=1 idleMask=0x0005 +connId=1 idleMask=0x0005 +connId=1 idleMask=0x0005 + +``` +When matching pins have been entered +``` +> smpSmExecute event=4 state=13 +Rand Nb +[52730a1e 080e2b3f 6d010f4b 0d29b8ac] +smpSmExecute event=28 state=15 +Cbi +[520aab85 e23b56d5 70598231 64553242] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[634082f9 ae97841d 408a0609 d3149a0f] +Ca Peer +[634082f9 ae97841d 408a0609 d3149a0f] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[2b4f65e1 41465986 1732c49b 0779c049] +smpSmExecute event=28 state=15 +Cbi +[34b63e15 0a0b1d8a fbaac17d ae94c891] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[e7b74ec3 7bb660e0 fd3ffb69 a70fc1b5] +Ca Peer +[e7b74ec3 7bb660e0 fd3ffb69 a70fc1b5] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[cb42c521 d4edb9cd fe2a5777 526d153d] +smpSmExecute event=28 state=15 +Cbi +[58d9a8c4 c4710a1a bd41ed81 2e666953] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[d100648f ae87b3e0 850e96ef 3c2c9a47] +Ca Peer +[d100648f ae87b3e0 850e96ef 3c2c9a47] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[21a3cd36 613f1834 c6e3d6fa 337e3f6c] +smpSmExecute event=28 state=15 +Cbi +[314e5afe c5799362 0c3c7e01 54a62b7d] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[bc03c14d cf73fbab c64c8de8 65c9bd3f] +Ca Peer +[bc03c14d cf73fbab c64c8de8 65c9bd3f] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[3e0cb037 9edea6c2 dfdd238f eee47a18] +smpSmExecute event=28 state=15 +Cbi +[223876ac 32cfa06e 5764766f e655cfda] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[3a1dceac 4ed11dc5 60384042 5f625042] +Ca Peer +[3a1dceac 4ed11dc5 60384042 5f625042] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[23ca1caf 70a3ba5b fd40e6ca db907405] +smpSmExecute event=28 state=15 +Cbi +[0f969efc f159e4c6 588c68ae 5d1f9851] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[c34f8c33 3e16ee08 3cac6f79 1eea831f] +Ca Peer +[c34f8c33 3e16ee08 3cac6f79 1eea831f] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[840f704c 59845fc2 47d5463a 9c68159b] +smpSmExecute event=28 state=15 +Cbi +[f5a84dfe 36bdfc2d 410e133d 0c474039] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[e27af695 a9227a18 74c2ba3d 57ed5254] +Ca Peer +[e27af695 a9227a18 74c2ba3d 57ed5254] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[5558d557 ba639669 226f7665 98ba1755] +smpSmExecute event=28 state=15 +Cbi +[c8158453 c50a9448 236c7bd5 fe249a0d] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[530da1cb 834ec9fa 6076fd05 037dce54] +Ca Peer +[530da1cb 834ec9fa 6076fd05 037dce54] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[9f57fda8 897aac72 810475a4 eda95e4c] +smpSmExecute event=28 state=15 +Cbi +[12494fdf 83718797 5efa3ff7 4e230a9d] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[b9c97dbe 7a725ab4 20c59148 10821669] +Ca Peer +[b9c97dbe 7a725ab4 20c59148 10821669] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[564e5d0e 2605341f 4d5b6913 0c89c1aa] +smpSmExecute event=28 state=15 +Cbi +[a8b37963 eafdcaee ecbf62ab a23f686a] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[b1387cd1 054a3616 3a73b06d 085e74b7] +Ca Peer +[b1387cd1 054a3616 3a73b06d 085e74b7] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[fc4d0a4e 2e6ca8f1 65f242a8 88876d0e] +smpSmExecute event=28 state=15 +Cbi +[623c1256 7e20dba1 f5257b86 11b54ece] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[4540e3cd 77e8ac57 8024607c 0de42ce2] +Ca Peer +[4540e3cd 77e8ac57 8024607c 0de42ce2] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[144e1412 64996fa0 d686011f 7913327d] +smpSmExecute event=28 state=15 +Cbi +[b354740a 3d097abc e33af952 cffc0e8a] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[ba1e5505 2e488dda b984bd08 2d07fdeb] +Ca Peer +[ba1e5505 2e488dda b984bd08 2d07fdeb] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[2596e6cd 44929e11 9791ba02 62e3feef] +smpSmExecute event=28 state=15 +Cbi +[3790e2f7 96ca63b6 826bbf5c 077c3f31] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[fe05bd6a 1f277dee 124de8b0 02c03343] +Ca Peer +[fe05bd6a 1f277dee 124de8b0 02c03343] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[06175016 3aabb9f3 f3aa5925 c9b8a43d] +smpSmExecute event=28 state=15 +Cbi +[57d2399c 89fbc8f0 3ee71020 f66b45d5] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[c2dff69b 7ae8eba8 e92f3b57 ff3978c7] +Ca Peer +[c2dff69b 7ae8eba8 e92f3b57 ff3978c7] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[5c70daab 66fe0495 07d0e27d 824d9865] +smpSmExecute event=28 state=15 +Cbi +[f03928aa 2324a2ca 8c3c1fd8 9d589afe] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[9f8dec26 018dcea5 0cc56156 32b9107b] +Ca Peer +[9f8dec26 018dcea5 0cc56156 32b9107b] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[fd89b81d e2b3fdaf f22cf4c4 b39da763] +smpSmExecute event=28 state=15 +Cbi +[c005af08 39334b4a ac68cf0a ca5acc00] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[94681382 aa6a4d27 1b8eb879 a5ed8043] +Ca Peer +[94681382 aa6a4d27 1b8eb879 a5ed8043] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[5b0789ba 4bd1a9f8 10e15f9d 0dbd4ac2] +smpSmExecute event=28 state=15 +Cbi +[b719fe1d 02e6cc10 8776a1b4 0bc0fa6b] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[3f8a85da fad78d81 0c8e0733 876df6fb] +Ca Peer +[3f8a85da fad78d81 0c8e0733 876df6fb] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[c0c90b30 03659e86 a143abe4 ec289e73] +smpSmExecute event=28 state=15 +Cbi +[d02d6808 35888e79 55e04238 f0930c07] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[4efc0b02 bcd8bc6a ac93b70c effeaee1] +Ca Peer +[4efc0b02 bcd8bc6a ac93b70c effeaee1] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[96aab51d 5e627668 ba927ed6 d1192554] +smpSmExecute event=28 state=15 +Cbi +[49660e21 5b3e82cd 32e3ac9a d839ad2d] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[2db916d0 32b02469 1711edf5 812ae090] +Ca Peer +[2db916d0 32b02469 1711edf5 812ae090] +connId=1 idleMask=0x0001 +smpSmExecute event=26 state=18 +smpSmExecute event=6 state=14 +Rand Nb +[d9e874e4 9b02cb3f 9aac021d 7ad59561] +smpSmExecute event=28 state=15 +Cbi +[837b81cf 6c409caa c29a550b 649b2c46] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=16 +smpSmExecute event=28 state=17 +Ca +[f3d0b1b5 76097bfb 14418e57 6d3c11ba] +Ca Peer +[f3d0b1b5 76097bfb 14418e57 6d3c11ba] +smpSmExecute event=27 state=18 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=21 +smpSmExecute event=25 state=22 +DHKey (Shared Secret) +[bf891259 97f62954 0f8d8934 5bcd585f] +[48fc2eb4 4c6f5c19 b8f817a9 907571b3] +smpSmExecute event=28 state=23 +T +[72c2ed8a fe1ae569 8237053f b5af654c] +smpSmExecute event=28 state=24 +MAC +[273eaeb4 163166a1 362c8773 888811aa] +smpSmExecute event=28 state=25 +LTK +[7eacbbfe 776de847 1b78effc 32e84ba5] +smpSmExecute event=28 state=26 +DHKey Ea +[e619e7cf 7d654f17 f621cb5c f6dd720b] +smpSmExecute event=28 state=27 +DHKey Eb +[1e72f16f dcab7a66 2787c1ce ee93d5ec] +connId=1 idleMask=0x0001 +connId=1 idleMask=0x0001 +smpSmExecute event=8 state=36 +Dats got evt 44 +>>> Connection encrypted <<< +Dats got evt 47 +smpSmExecute event=12 state=37 +smpSmExecute event=12 state=37 +smpSmExecute event=6 state=37 +smpSmExecute event=6 state=37 +smpSmExecute event=14 state=37 +connId=1 idleMask=0x0000 +Dats got evt 47 +Dats got evt 42 +>>> Pairing completed successfully <<< +dmDevPassEvtToDevPriv: event: 13, param: 1, advHandle: 0 +Dats got evt 58 +Dats got evt 63 +Dats got evt 153 + +``` +When PHY change performed +``` +> btn 2 s +Short Button 2 Press +2 MBit TX and RX PHY Requested +Dats got evt 70 +DM_PHY_UPDATE_IND - RX: 2, TX: 2 +Dats got evt 65 +App got evt 16 +App got evt 16 +connId=1 idleMask=0x0000 +> btn 2 s +Short Button 2 Press +LE Coded S2 TX and RX PHY Requested +Dats got evt 70 +DM_PHY_UPDATE_IND - RX: 3, TX: 3 +Dats got evt 65 +App got evt 16 +App got evt 16 +dmConnUpdExecute event=113 state=3 +dmConnSmExecute event=30 state=3 +Dats got evt 41 +> btn 2 s +Short Button 2 Press +LE Coded S8 TX and RX PHY Requested +Dats got evt 70 +DM_PHY_UPDATE_IND - RX: 3, TX: 3 +> btn 2 s +Short Button 2 Press +1 MBit TX and RX PHY Requested +Dats got evt 70 +DM_PHY_UPDATE_IND - RX: 1, TX: 1 +Dats got evt 65 +``` +When message received from peer +``` +hello world +hciCoreTxAclStart len=18 +Dats got evt 18 +``` +When secure message recevied from peer +``` +>> Received secure data << +Secret number is 0x42 +Dats got evt 18 + +``` +### Commands +Type the desired command and parameter (if applicable) and press enter to execute the command. + +__help__ Displays the available commands. +__echo (on|off)__ Enables or disables the input echo. On by default. +__btn (ID) (s|m|l|x)__ Simulates button presses. Example: "btn 1 s" for a short button press on button 1. +__pin (ConnID) (Pin Code)__ Used to input the pairing pin code. + +## Push buttons +Push buttons can be used to interact with the application. + +__short__ press is less than 200 ms +__medium__ press is between 200 and 500 ms +__long__ press is between 500 and 1000 ms +__extra long__ press is greater than 1000 ms + +### When disconnected +1. Button 1 short press: Start advertising +2. Button 1 medium press: Enter bondable mode +3. Button 1 long press: Clear all bonding info +4. Button 1 extra long press: Show version info +5. Button 2 short press: Stop advertising + +### When connected +1. Button 2 short press: Change PHY (1M-2M-Coded_S2-Coded_S8) + +# BLE_Datc + +Bluetooth data client that scans and connections to devices advertising with the device name "DATS". The client will automatically discover the profiles and services on the device, subscribing to notifications and indications to enable the unformatted data exchange with the proprietary data service. + +### Expected Output + +On startup: +``` +terminal: init +32kHz trimmed to 0xF +DatcHandlerInit +Calculating database hash +Datc got evt 32 +>>> Reset complete <<< +Datc got evt 58 +Database hash calculation complete +Datc got evt 21 +Database hash updated +dmDevPassEvtToDevPriv: event: 13, param: 1, advHandle: 0 +Datc got evt 63 +Datc got evt 153 +dmDevPassEvtToDevPriv: event: 12, param: 36, advHandle: 0 +Datc got evt 36 +>>> Scanning started <<< +``` + +When a scan report has been received: +``` +Scan Report: + 55:CF:67:1F:6F:27 +Scan Report: + 00:05:8B:44:12:02 + Name: Fit +``` + +When server has been found: +``` +Scan Report: + 00:18:80:04:52:1F + Name: DATS +dmDevPassEvtToDevPriv: event: 13, param: 37, advHandle: 0 +Datc got evt 37 +Scan results: 4 +dmConnIdByBdAddr not found +dmConnCcbAlloc 1 +>>> Scanning stopped <<< +dmConnSmExecute event=24 state=0 +dmDevPassEvtToDevPriv: event: 14, param: 0, advHandle: 0 +dmConnSmExecute event=28 state=1 +dmDevPassEvtToDevPriv: event: 14, param: 1, advHandle: 0 +dmDevPassEvtToDevPriv: event: 12, param: 39, advHandle: 0 +smpDbGetRecord: connId: 1 type: 0 +smpDbAddDevice +SmpDbGetFailureCount: connId: 1 count: 0 +smpDbGetRecord: connId: 1 type: 0 +smpDbAddDevice +SmpDbGetPairingDisabledTime: connId: 1 period: 0 attemptMult: 0 +Datc got evt 39 +>>> Connection opened <<< +smpSmExecute event=1 state=0 +connId=1 idleMask=0x0001 +Datc got evt 65 +Datc got evt 22 +smpSmExecute event=6 state=1 +smpSmExecute event=17 state=2 +smpSmExecute event=4 state=3 +connId=1 idleMask=0x0001 +Datc got evt 87 +Datc got evt 4 +connId=1 idleMask=0x0009 +smpSmExecute event=6 state=4 +smpSmExecute event=20 state=5 +Datc got evt 46 +>>> Prompt user to enter passkey <<< +Datc got evt 3 +AttcDiscServiceCmpl status 0x00 +Datc got evt 4 +AttcDiscCharCmpl status 0x79 +Datc got evt 4 +AttcDiscCharCmpl status 0x79 +Datc got evt 2 +AttcDiscCharCmpl status 0x00 +connId=1 idleMask=0x0009 +Datc got evt 3 +AttcDiscServiceCmpl status 0x00 +Datc got evt 4 +AttcDiscCharCmpl status 0x79 +Datc got evt 4 +AttcDiscCharCmpl status 0x00 +connId=1 idleMask=0x0009 +Datc got evt 3 +AttcDiscServiceCmpl status 0x00 +Datc got evt 4 +AttcDiscCharCmpl status 0x79 +Datc got evt 4 +AttcDiscCharCmpl status 0x79 +Datc got evt 2 +AttcDiscCharCmpl status 0x00 +connId=1 idleMask=0x0009 +Datc got evt 3 +AttcDiscServiceCmpl status 0x00 +Datc got evt 4 +AttcDiscCharCmpl status 0x79 +Datc got evt 4 +AttcDiscCharCmpl status 0x79 +Datc got evt 2 +AttcDiscCharCmpl status 0x79 +Datc got evt 2 +AttcDiscCharCmpl status 0x00 +connId=1 idleMask=0x0001 +AppDiscComplete connId:1 status:0x04 +connId=1 idleMask=0x0009 +Datc got evt 9 +AttcDiscConfigCmpl status 0x79 +Datc got evt 9 +AttcDiscConfigCmpl status 0x79 +Datc got evt 9 +AttcDiscConfigCmpl status 0x79 +Datc got evt 9 +AttcDiscConfigCmpl status 0x00 +connId=1 idleMask=0x0001 +AppDiscComplete connId:1 status:0x08 +``` +After entering a pin +``` +pin 1 12345 +> smpSmExecute event=4 state=11 +Rand Na +[5fa96af9 f434b4de 3e452813 fef4f5eb] +smpSmExecute event=28 state=12 +Cai +[57964640 e18b1aa1 8ea7d8b2 2eb274c3] +connId=1 idleMask=0x0001 + +``` + +Once server enters a matching pin and encrypted connection is established +``` +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[7e2523a4 be6a8923 8ef900bf d4eaa458] +smpSmExecute event=26 state=16 +Rand Na +[efb856be 61bd11a8 2dff39c0 1f5d4d91] +smpSmExecute event=28 state=12 +Cai +[65f7c942 8c216010 cc73fdc9 bd21120e] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[db4858f8 33a964c1 e35ba27c 1f07e7db] +smpSmExecute event=26 state=16 +Rand Na +[9904fded 40ea2bb1 dfabe4be b9bcba45] +smpSmExecute event=28 state=12 +Cai +[1362d0db 074d32ea 32d0e79c 1155a20b] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[efd27c04 96ff72e0 c893bf54 9c524f0a] +smpSmExecute event=26 state=16 +Rand Na +[5ba16640 fd3af1ae afc6d035 d8eb1fa5] +smpSmExecute event=28 state=12 +Cai +[79603efa ad87d2cd bdc4c83b 17dcffe6] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[c1221276 73df3bf7 90e8df64 741909c1] +smpSmExecute event=26 state=16 +Rand Na +[59ea06d0 760407f7 87415144 fe234a1e] +smpSmExecute event=28 state=12 +Cai +[40b9915c af4a8712 c81e98f9 f197953a] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[325fe15b 5a6862e1 f4de459d 6c91c220] +smpSmExecute event=26 state=16 +Rand Na +[4c56f9f9 b1d91236 8dfb81f8 b0629bb7] +smpSmExecute event=28 state=12 +Cai +[c2fb6b18 63cb9311 d53c3333 0a2924cf] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[7725d42d 35f8e465 b3b6cfed 9bfe125a] +smpSmExecute event=26 state=16 +Rand Na +[3909e384 45979c24 c85d36d3 fc2bd4bf] +smpSmExecute event=28 state=12 +Cai +[9e570480 195412a0 07c84616 36cd6a06] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[1bce9472 21f7d6c4 4f8fe62b 91ac2271] +smpSmExecute event=26 state=16 +Rand Na +[fe57e223 78ca04e3 cd13bd82 ad43289c] +smpSmExecute event=28 state=12 +Cai +[42ba2b2e bd35ebe6 56c59b28 957639d2] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[a35acba5 00eba332 31442e10 aea9dacf] +smpSmExecute event=26 state=16 +Rand Na +[71aa44ad abe2d668 07b79f02 d2a974dc] +smpSmExecute event=28 state=12 +Cai +[5b02fce8 f92549ca 54bea290 c9fdfd1b] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[4a52c87c a504c8cf 49d9e8f0 1a69aca2] +smpSmExecute event=26 state=16 +Rand Na +[0f87eb54 83f4f78b 754d2f74 1b406c0d] +smpSmExecute event=28 state=12 +Cai +[16a9ba43 8c8b39d2 912f1f85 3f738170] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[b2aa1f53 802fa4ad 3e415844 4953c931] +smpSmExecute event=26 state=16 +Rand Na +[466db705 9fd2d031 35759a3f 45869950] +smpSmExecute event=28 state=12 +Cai +[004c8d5f 4413efb9 f60c10c2 8af82058] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[6b93dfa8 91d6bc27 fbb7142a 778d6eab] +smpSmExecute event=26 state=16 +Rand Na +[4d0cfaee 277f0959 ee9ad6b5 bf89e129] +smpSmExecute event=28 state=12 +Cai +[b977b373 4fdeb62d 4b9fc6dd 0cd58ccb] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[7d734f74 37d7575f 9a2176fe 9e0d7793] +smpSmExecute event=26 state=16 +Rand Na +[aa704717 22c5a505 922ea504 c8f32c21] +smpSmExecute event=28 state=12 +Cai +[b8db800a c2cfb643 0ad2127e 154b27e3] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[fb8bfb47 1db075d6 c10dfe20 275580a6] +smpSmExecute event=26 state=16 +Rand Na +[6715c20d 284d6526 c826990b c0266d4d] +smpSmExecute event=28 state=12 +Cai +[9a07bded 4652b3b3 04e58dd3 ddc41f5b] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[9b11572d 6ac46706 2a42ddf7 fa3f7eb6] +smpSmExecute event=26 state=16 +Rand Na +[276b1950 0160195c 2ca2749e 04cc0bba] +smpSmExecute event=28 state=12 +Cai +[7811b835 1ee6cd01 b35e0068 b0e995a2] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[febf4094 ccf93969 adc4d7e3 c3f26246] +smpSmExecute event=26 state=16 +Rand Na +[31c8d021 62bd5eb6 470c008d 0f9a8f69] +smpSmExecute event=28 state=12 +Cai +[6cc99436 0835e6bf b7ccd2a8 81eb7c2d] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[314f5edd e73e8b9e 865c3924 c438e032] +smpSmExecute event=26 state=16 +Rand Na +[4f46b9ce 57474f8d 8d00a000 74bdea15] +smpSmExecute event=28 state=12 +Cai +[baea7468 fabb299a 837bbbfb c47572e2] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[f8a46358 201aab0a ae9aae2c 0c32fb92] +smpSmExecute event=26 state=16 +Rand Na +[b80a6511 3c82e7e6 055243e6 a45202a6] +smpSmExecute event=28 state=12 +Cai +[24c084e8 e92b8e03 1a37f096 f4d5c31f] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[04aa43e8 dac7aa2a 490e6154 11b81966] +smpSmExecute event=26 state=16 +Rand Na +[16bc0b9f a93b2745 729a08b9 85682b0d] +smpSmExecute event=28 state=12 +Cai +[a5caa3a1 b7b66eaa f113972c 88645db6] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[831b8daf 7ae674d8 e2c5fbc3 9fc27be3] +smpSmExecute event=26 state=16 +Rand Na +[3a8e02cf 001e84b3 08d9a24e 19ff9b18] +smpSmExecute event=28 state=12 +Cai +[bf5345f1 299bca3f 0c99eac6 3ea96052] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=13 +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=14 +smpSmExecute event=28 state=15 +Cbi +[0a4dec2e 6aebc804 7bb1a21b aadc18c1] +smpSmExecute event=27 state=16 +smpSmExecute event=25 state=19 +DHKey (Shared Secret) +[7cf8b651 6c0f5bff 7d66bbf6 d8d85abd] +[0ef6bf2d 85a594d2 f55dccc3 6f98dd1d] +smpSmExecute event=28 state=20 +T +[a02f2c9d 9a153f28 0bde8cb2 ab2a7b84] +smpSmExecute event=28 state=21 +MAC +[66ebd01a c4818e8b 1cec71bf f0644ed9] +smpSmExecute event=28 state=22 +LTK +[b4cad222 8324e2fb 71bbca0f 04bfc828] +smpSmExecute event=28 state=23 +DHKey Ea +[a2925a68 0b71e9c3 065a959d 39079b01] +smpSmExecute event=28 state=24 +DHKey Eb +[3ed3c373 5b99fc5e 16577603 7a1ba181] +connId=1 idleMask=0x0001 +smpSmExecute event=6 state=25 +connId=1 idleMask=0x0001 +smpSmExecute event=8 state=34 +Datc got evt 44 +>>> Connection encrypted <<< +smpSmExecute event=6 state=35 +smpSmExecute event=6 state=35 +smpSmExecute event=12 state=35 +Datc got evt 47 +Datc got evt 47 +smpSmExecute event=12 state=35 +smpSmExecute event=12 state=35 +smpSmExecute event=14 state=35 +connId=1 idleMask=0x0000 +Datc got evt 42 +>>> Pairing completed successfully <<< +dmDevPassEvtToDevPriv: event: 13, param: 1, advHandle: 0 +Datc got evt 58 +Datc got evt 63 +``` +Simple message passing to peer: +``` +btn 2 l +Long Button 2 Press +> Datc got evt 10 +Datc got evt 13 +hello back +``` +Secure message passing to peer: +``` +btn 2 m +Medium Button 2 Press +> Datc got evt 10 +Datc got evt 13 +>> Notification from secure data service <<< +Secure data received! + +``` + +On PHY change request: +``` +btn 1 x +XL Button 1 Press +2 MBit TX and RX PHY Requested +> Datc got evt 70 +DM_PHY_UPDATE_IND - RX: 2, TX: 2 +Datc got evt 65 +btn 1 x +XL Button 1 Press +LE Coded S2 TX and RX PHY Requested +> Datc got evt 70 +DM_PHY_UPDATE_IND - RX: 3, TX: 3 +Datc got evt 65 +btn 1 x +XL Button 1 Press +LE Coded S8 TX and RX PHY Requested +> Datc got evt 70 +DM_PHY_UPDATE_IND - RX: 3, TX: 3 +btn 1 x +XL Button 1 Press +1 MBit TX and RX PHY Requested +> Datc got evt 70 +DM_PHY_UPDATE_IND - RX: 1, TX: 1 +Datc got evt 65 +``` + +Data Transfer Speed test (1M PHY): +``` +btn 2 x +XL Button 2 Press +Starting speed test +... +flowDisabled=1 handle=0 +flowDisabled=0 handle=0 +9520000 bits transferred in 18823249 us +505757 bps +``` + +Data Transfer Speed test (2M PHY): +``` +btn 2 x +XL Button 2 Press +Starting speed test +... +flowDisabled=1 handle=0 +flowDisabled=0 handle=0 +9520000 bits transferred in 9413977 us +1011262 bps +``` + +### Commands +Type the desired command and parameter (if applicable) and press enter to execute the command. + +__help__ Displays the available commands. +__echo (on|off)__ Enables or disables the input echo. On by default. +__btn (ID) (s|m|l|x)__ Simulates button presses. Example: "btn 1 s" for a short button press on button 1. +__pin (ConnID) (Pin Code)__ Used to input the pairing pin code. + +## Push buttons +Push buttons can be used to interact with the application. + +__short__ : press is less than 200 ms +__medium__ : press is between 200 and 500 ms +__long__ : press is between 500 and 1000 ms +__extra long__ : press is greater than 1000 ms + +### When disconnected +1. Button 1 short: Start/Stop scanning +2. Button 1 medium: Cycle through the connection index (select connection) +3. Button 1 long: Clear all bonding info +4. Button 1 extra long: Add RPAO characteristic to GAP service -- needed only when DM Privacy enabled +5. Button 2 extra long: Enable device privacy -- start generating local RPAs every 15 minutes + +### When connected +1. Button 1 short: Start/Stop scanning +2. Button 1 medium: Cycle through connection index (select connection) +3. Button 1 long: Close selected connection +4. Button 2 short: Request PHY change (1M-2M-S2-S8) Only for BLE5 version. +5. Button 2 medium : Send secure message to peer +6. Button 2 long: Send short message to peer +7. Button 2 extra long: Start data transfer speed test + diff --git a/Libraries/Cordio/docs/Applications/BLE_otac_otas.md b/Libraries/Cordio/docs/Applications/BLE_otac_otas.md new file mode 100644 index 0000000000..5bcfcc07bb --- /dev/null +++ b/Libraries/Cordio/docs/Applications/BLE_otac_otas.md @@ -0,0 +1 @@ +# BLE_otac_otas \ No newline at end of file diff --git a/Libraries/Cordio/docs/Applications/BLE_periph.md b/Libraries/Cordio/docs/Applications/BLE_periph.md new file mode 100644 index 0000000000..28c966c42b --- /dev/null +++ b/Libraries/Cordio/docs/Applications/BLE_periph.md @@ -0,0 +1,185 @@ +# BLE_periph + +This is the simplest application that should be used when getting started. It will advertise as "Periph" and accepts connection requests. + +## Board Setup + +Before building firmware you must select the correct value for BOARD in project.mk, e.g. "EvKit_V1". + +### LEDs + +The red LED will indicate that an error assertion has occurred. + +The green LED indicates CPU activity. When the LED is on, the CPU is active, when the LED +is off, the CPU is in sleep mode. + +### Required Connections +Connect a USB cable between the PC and the (USB/PWR - UART) connector. An anteanna or wired connection can be used if SMA is available on the board. + +### Trace Serial Port +When TRACE is enabled in the project.mk, the on-board USB-to-UART adapter can +be used to view the trace messages and interact with the application. Open a serial port terminal with +the following settings. + +Baud : 115200 +Char size : 8 +Parity : None +Stop bits : 1 +HW Flow Control : No +SW Flow Control : No + +### Expected Output + +On startup: +``` +terminal: init +PeriphHandlerInit +Calculating database hash +Periph got evt 119 +Periph got evt 32 +>>> Reset complete <<< +dmAdvActConfig: state: 0 +dmAdvActSetData: state: 0 +dmAdvActStart: state: 0 +HCI_LE_ADV_ENABLE_CMD_CMPL_CBACK_EVT: state: 3 +dmDevPassEvtToDevPriv: event: 12, param: 33, advHandle: 0 +Periph got evt 33 +>>> Advertising started <<< + +``` + +When a connection has been made. +``` +dmConnIdByBdAddr not found +dmConnCcbAlloc 1 +dmConnSmExecute event=28 state=0 +dmAdvConnected: state: 1 +dmDevPassEvtToDevPriv: event: 13, param: 34, advHandle: 0 +AttsCccInitTable connId=1 +smpDbGetRecord: connId: 1 type: 1 +smpDbAddDevice +SmpDbGetFailureCount: connId: 1 count: 0 +smpDbGetRecord: connId: 1 type: 1 +smpDbAddDevice +SmpDbGetPairingDisabledTime: connId: 1 period: 0 attemptMult: 0 +Periph got evt 39 +>>> Connection opened <<< +Periph got evt 65 +Periph got evt 87 +attsProcMtuReq features 0x00 +hciCoreTxAclStart len=7 +Periph got evt 22 +connId=1 idleMask=0x0004 +hciCoreTxAclStart len=18 +connId=1 idleMask=0x0004 +hciCoreTxAclStart len=26 +hciCoreTxAclStart len=34 +connId=1 idleMask=0x0004 +hciCoreTxAclStart len=34 +attsCccMainCback connId=1 handle=19 +hciCoreTxAclStart len=5 +hciCoreTxAclStart len=27 +hciCoreTxAclStart len=9 +connId=1 idleMask=0x0004 +hciCoreTxAclStart len=10 +connId=1 idleMask=0x0004 +hciCoreTxAclStart len=9 +attsCccMainCback connId=1 handle=515 +hciCoreTxAclStart len=7 +hciCoreTxAclStart len=14 +``` + +### Commands +Type the desired command and parameter (if applicable) and press enter to execute the command. + +__help__ Displays the available commands. +__echo (on|off)__ Enables or disables the input echo. On by default. +__btn (ID) (s|m|l|x)__ Simulates button presses. Example: "btn 1 s" for a short button press on button 1. +__pin (ConnID) (Pin Code)__ Used to input the pairing pin code. + +### Push buttons +Push buttons are not implemented in this example. + +## Stack Initialization + +## GAP Peripheral / Slave Role + +### Advertising interval +The advertising interval is configurable in this structure. We can define multiple interverals, each with their own duration. In this case we will advertise at a short interval (96\*0.625ms = 60ms) for 30 seconds. We will then transition to a long interval (1600\*0.625 ms = 1000 ms) indefinetly. Longer advertising intervals will conserve power, but increase the latency when communicating with scanning devices or creating connections. + +```c +/*! configurable parameters for advertising */ +static const appAdvCfg_t periphAdvCfg = { + { 30000, 0, 0 }, /*! Advertising durations in ms, 0 corresponds to infinite */ + { 96, 1600, 0 } /*! Advertising intervals in 0.625 ms units */ +}; +``` + +Applications can also set a definite advertising duration with will cause the device to stop advertising at the end of the duation. The application can restart advertising by calling AppAdvStart(). + +### Advertising data + +Applications can define the advertising data with this structure. This information will be broadcast in every advertising event. Each portion of the advertising data is defined by a length byte, a type byte, and the data. In this case we're advertising the flags that the device is discoverable and BR/EDR (Bluetooth Classic) is not supported. We're also advertising the device name "Periph". + +```c +/*! advertising data, discoverable mode */ +static const uint8_t periphAdvDataDisc[] = { + /*! flags */ + 2, /*! length */ + DM_ADV_TYPE_FLAGS, /*! AD type */ + DM_FLAG_LE_GENERAL_DISC | /*! flags */ + DM_FLAG_LE_BREDR_NOT_SUP, + /*! device name */ + 7, /*! length */ + DM_ADV_TYPE_LOCAL_NAME, /*! AD type */ + 'P', 'e', 'r', 'i', 'p', 'h' +}; +``` + +## GATT Server + +## MTU size and Throughput + +Each layer of the stack has parameters that will bottleneck the throughput of the system. The ATT layer defines a Maximum Transmission Unit (MTU) to indiate the maximum length of an ATT packet. + +``` c +/*! ATT configurable parameters (increase MTU) + * ATT_MAX_TRANS_TIMEOUT = 30 seconds + */ +static const attCfg_t periphAttCfg = { + 15, /* ATT server service discovery connection idle timeout in seconds */ + 241, /* desired ATT MTU */ + ATT_MAX_TRANS_TIMEOUT, /* transcation timeout in seconds */ + 4 /* number of queued prepare writes supported by server */ +}; +``` + +This MaxRxAclLen defines the maximum reassembled RX Asynchronous Connection-Orientated Logical(ACL) packet length. Packets received at the HCI layer must be buffered until the entire ACL packet has been received. Once the entire ACL packet has been received, the HCI layer will send the packet to the L2CAP layer. +```c +/*************************************************************************************************/ +/*! + * \brief Set the maximum reassembled RX ACL packet length. Minimum value is 27. + * + * \param len ACL packet length. + * + * \return None. + */ +/*************************************************************************************************/ +void HciSetMaxRxAclLen(uint16_t len); +``` + +The MTU must be less than or equal to the MaxRxAclLen - L2C Header Length (4 bytes). +``` c + /* if configured MTU size is larger than maximum RX PDU length */ + if (pAttCfg->mtu > (HciGetMaxRxAclLen() - L2C_HDR_LEN)) + { + /* notify app about MTU misconfiguration */ + attExecCallback(0, DM_ERROR_IND, 0, DM_ERR_ATT_RX_PDU_LEN_EXCEEDED, 0); + } +``` + +## Callbacks + +## Adding WSF events and handlers + + diff --git a/Libraries/Cordio/docs/Applications/RF_Test.md b/Libraries/Cordio/docs/Applications/RF_Test.md new file mode 100644 index 0000000000..89ab9fd495 --- /dev/null +++ b/Libraries/Cordio/docs/Applications/RF_Test.md @@ -0,0 +1 @@ +# RF_Test \ No newline at end of file diff --git a/Libraries/Cordio/docs/BLUETOOTH_LE_BASICS.md b/Libraries/Cordio/docs/BLUETOOTH_LE_BASICS.md new file mode 100644 index 0000000000..45a8319987 --- /dev/null +++ b/Libraries/Cordio/docs/BLUETOOTH_LE_BASICS.md @@ -0,0 +1,43 @@ +# Bluetooth LE Basics + +## References +The Bluetooth Special Interest Group (SIG) has documentation available on their [website](https://www.bluetooth.com/). Refer to the [documentation](https://www.bluetooth.com/specifications/specs/) page to see the latest core specification. This will be your best resource for learning the details of Bluetooth Low Energy. + +These books are also excellent references for developers. + +* *Getting Started with Bluetooth Low Energy* by O'Reilly +* *Bluetooth Low Energy: The Developer's Handbook* by Robin Heydon + +## Architecture +The Bluetooth stack closely resembles the layers of the network stack. We have the application layer at the top and the physical layer at the bottom. Each layer encapsulates the data and passes it to the appropriate section of the upper and lower layers. + +![Stack](res/Stack.PNG) + +The Host Conroller Interface (HCI) is the common point where devices are split. Typically this this interface is over an asynchronous protocol such as UART. Some devices will define proprietary interfaces between the application and host layers. Multi-core SOCs can also use the HCI or proprietay interfaces to split the stack between multiple CPUs. + + +When testing the Controller layers, test equipment will have a USB interface and act as a Host device. Devices under test will use a USB to UART adapter and act as Controller devices. + +![HCI](res/HCI.PNG) + +## States +These are the common states used in Bluetooth LE communication. Typically devices will be in only one of these states at a time, but it is possible for devices to be in all simultaneously. + +### Advertising +Devices in this state are broadcasting advertisement packets to scanning/initiating devices. This is an asychronous operation that has no synchronization with peer devices. Advertising devices are transmitting without any previous knowledge of peer devices. Advertising and scanning operations are done on channels 37, 38, and 39. The interval between advertising events is configurable between 20 ms and 10.24 s. + +![ADV Scan](res/ADV_SCN.png) + +### Scanning / Initiating +Devices in the scanning state listen for advertising devcies and can send scan optionally requests for additional information. The scanning interval and window settings are configurable. + +If a devices is scanning with the intent of connecting to a specific device, that is called the initiating state. The initiating devcies will send a connection indication to the desired advertising device to indicate it's desire to create a connection. + +### Connected +Once a initiating devices sends the connection requset and the advertising devices accepts the connection request, the two devices enter the connected state. This is a point to point connection allowing devcies to directly exchange information. + +In order to minimize interference, devices in the connected state will hop between channels 0-36 in a pseudo random order. The channel hopping information is communicated in the connection indication. + +Each connection event is separated by the connection interval. This interval is configurable from 7.5 ms to 4 s. The master will always transmit first and receive second. The Slave will always receive first and transmit second. Devices will typically always send and receive at least one packet in each interval, and they can optionally transmit and receive multiple packets in each interval. + +![Connected](res/Connected.png) \ No newline at end of file diff --git a/Libraries/Cordio/LICENSE.md b/Libraries/Cordio/docs/LICENSE.md similarity index 100% rename from Libraries/Cordio/LICENSE.md rename to Libraries/Cordio/docs/LICENSE.md diff --git a/Libraries/Cordio/docs/PACKETCRAFT.md b/Libraries/Cordio/docs/PACKETCRAFT.md new file mode 100644 index 0000000000..049a60e5b7 --- /dev/null +++ b/Libraries/Cordio/docs/PACKETCRAFT.md @@ -0,0 +1,127 @@ +Packetcraft Protocol Software +============================= + +Packetcraft protocol software is a collection of embedded stacks implementing the Bluetooth Low Energy Link Layer, Host, Profile and Mesh specification (www.bluetooth.org). + +This repository contains open source release of Packetcraft's software. This is a qualified release and may be used in products. Please consult the [Bluetooth Qualification Process](https://www.bluetooth.com/develop-with-bluetooth/qualification-listing) for further details regarding additional certification requirements. + + +Release notes +------------- + +This latest release of the Packetcraft Host and Packetcraft Controller is Bluetooth 5.2 qualified and implements the following new Bluetooth 5.2 features: LE Isochronous Channels, Enhanced Attribute Protocol, and LE Power Control. + +This release includes the following completed requirements for r20.05: + + FW-3340 Isochronous Demo: single BIS data stream + FW-3354 TCRL.2019-1 compliant + FW-3359 Core v5.2: LE Isochronous Channels (ISO) + FW-3360 Core v5.2: LE Power Control + FW-3361 Core v5.2: Enhanced ATT (EATT) + FW-3617 Core v5.2: Isochronous Abstraction Layer (ISOAL) + FW-3726 Core v5.2: Host Support for LE Isochronous Channels (ISO) + FW-3727 Nordic nRF5 SDK 16.0.0 + FW-3730 Compile BLE host for 64-bit platform + FW-3736 Light CTL Model + FW-3738 Mesh v1.0.1 compliant + FW-3739 TCRL.2019-2 qualification + FW-3750 Laird BL654 platform + FW-3767 SBC codec + FW-3803 GCC compiler support for gcc-arm-none-eabi-9-2019-q4-major + FW-3820 Protect against SweynTooth vulnerability + + +Getting Started +--------------- + +**1. Toolchain** + +If using a system with package manager such as Ubuntu, use the following command line to install dependent tools: + +``` +sudo apt-get install build-essential binutils-arm-none-eabi +``` + +Alternatively download and install the GNU Arm Embedded Toolchain from here and add the path to the `bin` folder to your PATH environment. + +* [GNU Arm Embedded Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm) + + +**2. Build** + +Select a project to build. The following folders contains buildable projects: + +* Packetcraft Profile sample application: [ble-apps/build](../ble-apps/build) +* Packetcraft Mesh sample application: [ble-mesh-apps/build](../ble-mesh-apps/build) +* Packetcraft Controller sample application: [controller/build](../controller/build) + +Consult the Sample App Developer's Guide (below) for more information about the application usage. + +For example, to build Packetcraft's sample Bluetooth Low Energy Tag device use the following make command from the root repo folder: + +``` +make -C ble-apps/build/tag/gcc +``` + +This command will build a complete device image including the Tag sample application, Profiles, Host, Link Layer and platform drivers for the Nordic nRF52840 / PCA10056 development board. The resulting image is located at `ble-apps/build/tag/gcc/bin/tag.bin`. + + +**3. Program** + +To install the firmware image on a Nordic PCA10056 developmnent board, plug a USB cable into your PCA10056. Drag-n-Drop the resulting image from the previous step onto the mass storage drive called "JLINK". + + +Documentation +------------- + +See the docs directory. + + +Certification +------------- + +Bluetooth LE Mesh solution implementing of the Bluetooth Mesh Profile 1.0 and the Bluetooth Mesh Model 1.0 wireless technical specifications + +* [QDID 116593](https://launchstudio.bluetooth.com/ListingDetails/66212) + +Bluetooth LE Host protocol stack implementing Bluetooth Core 5.2 specification + +* [QDID 146344](https://launchstudio.bluetooth.com/ListingDetails/103670) + +Bluetooth LE Link Layer protocol stack implementing Bluetooth 5.2 specification + +* [QDID 146281](https://launchstudio.bluetooth.com/ListingDetails/103599) + + +Verification +------------ + +Packetcraft Mesh is verified with the TCRL.2019-2 compliance tester using the following: + +* Bluetooth Profile Tuning Suites 7.6.1 + +Packetcraft Host is verified with the TCRL.2019-2 compliance tester using the following: + +* Bluetooth Profile Tuning Suites 7.6.1 + +Packetcraft Profiles is verified with the TCRL.2018-2 compliance tester using the following: + +* Bluetooth Profile Tuning Suites 7.3.0 + +Packetcraft Link Layer conforms to the Bluetooth TCRL.2019-2 requirements verified with the following: + +* Teledyne Harmony LE Tester version 19.12.16916.21195 + +This product was compiled and tested with the following version of GNU GCC + +* gcc-arm-none-eabi-9-2019-q4-major + + +Platforms +--------- + +This release was tested on the following platforms. Note: platforms listed may not be available in this repository. + +* Nordic nRF52840 / PCA10056 development kit / Nordic nRF5 SDK 16.0.0 (make configuration: "PLATFORM=nordic BOARD=PCA10056") +* Nordic nRF52832 / PCA10040 development kit / Nordic nRF5 SDK 16.0.0 (make configuration: "PLATFORM=nordic BOARD=PCA10040") +* Laird BL654 / 451-00004 USB adapter / Nordic nRF5 SDK 16.0.0 (make configuration: "PLATFORM=laird") diff --git a/Libraries/Cordio/docs/cordio_platform_doxyfile b/Libraries/Cordio/docs/cordio_platform_doxyfile new file mode 100644 index 0000000000..252ee6e117 --- /dev/null +++ b/Libraries/Cordio/docs/cordio_platform_doxyfile @@ -0,0 +1,2588 @@ +# Doxyfile 1.8.17 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "Cordio Platform Documentation" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "Cordio Platform Documentation (All interfaces)" + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# Possible values are: None, LTR, RTL and Context. +# The default value is: None. + +OUTPUT_TEXT_DIRECTION = None + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is +# Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See https://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 5 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# declarations. If set to NO, these declarations will be included in the +# documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# (including Cygwin) ands Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if