aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ble/NimbleController.cpp
Commit message (Collapse)AuthorAgeFilesLines
* DateTimeController: Remove SetTime tick parameterRiku Isokoski2023-02-251-1/+0
| | | | | | The systick doesn't need to be updated when setting time. Also removed unused nrf_rtc.h includes.
* src: Enable unused parameter warningRiku Isokoski2023-01-241-6/+6
| | | | | | Fix warnings. Some clang-formatting was necessary. DebugPins is unused and was removed.
* Apply clang-format to all C++ filesFinlay Davidson2022-06-051-1/+1
|
* Merge branch 'develop' into remove-nm-referenceMax Friedrich2022-04-191-10/+33
|\
| * New changes according to the review : Priority 0 for display, 1 for system, ↵Jean-François Milants2022-03-211-0/+1
| | | | | | | | timer and ble host, and 2 for ble LL
| * Add missing nrf_log.h includes shadowed by SystemMonitor.hReinhold Gschweicher2022-03-081-0/+1
| | | | | | | | | | | | Some components were missing a `nrf_log.h` include. This missing include was accidentally provided by the SystemMonitor.h header, which was included by Systemtask.h
| * Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime ↵Jean-François Milants2022-02-201-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | into evergreen22-airplane-mode Apply a few changes that were requested in the PR during the review. # Conflicts: # src/CMakeLists.txt # src/displayapp/Apps.h # src/displayapp/DisplayApp.cpp # src/displayapp/Messages.h # src/displayapp/screens/settings/Settings.cpp
| * Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime ↵Jean-François Milants2022-02-201-12/+32
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into evergreen22-airplane-mode # Conflicts: # src/CMakeLists.txt # src/displayapp/Apps.h # src/displayapp/DisplayApp.cpp # src/displayapp/Messages.h # src/displayapp/screens/settings/Settings.cpp
| | * Add airplane mode featureJames A. Jerkins2021-12-231-12/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements 'Airplane mode' feature to disable and enable bluetooth/ble Adds airplaneMode as a non-persisted setting Adds a setting menu for switching airplane mode on and off Displays an airplane symbol on the Digital watch face and the PineTimeStyle watch face when airplane mode is enabled Always enables bluetooth/ble on boot (disable airplane mode) Alphabetizes the settings menu options Style cleanups Closes #632
* | | remove unused referenceminacode2022-02-161-1/+0
|/ /
* / Fix biased BLE pass key generationZorvalt2022-02-121-1/+22
|/
* Optional secure pairing with a passkeyJames A. Jerkins2021-12-211-4/+2
| | | | | Support passkey pairing when requested by the central Fix a comment and reorder warning
* Fix Failed rebase.Tim Keller2021-12-101-4/+3
|
* List Dir works?Tim Keller2021-12-101-1/+1
|
* Added Blank FSService that exposes only version infoTim Keller2021-12-101-3/+6
|
* Merge branch 'develop' into patch-weatherAvamander2021-12-091-38/+198
|\
| * Adjust BLE/LL stacks, style, comments, refactoringJames A. Jerkins2021-12-091-8/+21
| | | | | | | | | | Increase BLE task stack +200 and decrease LL task stack -200 more braces!
| * Persist bond between rebootsJames A. Jerkins2021-12-091-7/+106
| | | | | | | | | | | | | | | | | | Save bond information in the FS after a disconnect or encryption change if the bond is not already stored. The bond is restored on boot enabling automatic reconnection to a previously bonded central. Two consecutive watch reboots with the central out of range (or BLE off) will remove the stored bond from the watch.
| * Connect and bond with a passkeyJames A. Jerkins2021-12-091-29/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the following: Passkey pairing - passkey is displayed on watch Swipe down to clear passkey screen Connection encryption Connection bonding Automatic reconnects to a bonded peripheral Trusted device on Android Note that persisting the bond between reboots is NOT included in this commit. Therefore, rebooting the watch will cause reconnect failures. You must delete the bond from the phone to reconnect/pair.
* | Initial Weather service skeletonAvamander2021-12-041-0/+2
|/
* Update includes to to be relative to src directoryReinhold Gschweicher2021-11-151-1/+1
| | | | | | | Don't use relative imports like `../foo.h` as those depend on the relative position of both files. Rather than that use imports relative to the `src` directory, which explicitly is part of the include directories.
* Enable/disable notifications for motion service.Jean-François Milants2021-10-171-0/+3
|
* Add MotionService : expose step count and RAW X/Y/Z values to the host.Jean-François Milants2021-10-171-1/+4
|
* MotionService : fix typo and characteristic array size + send notification ↵Jean-François Milants2021-10-171-0/+10
| | | | only if the host subscribed to them.
* Merge branch 'refactor_adv' of https://github.com/evergreen22/InfiniTime ↵Jean-François Milants2021-09-131-45/+80
|\ | | | | | | | | | | | | into evergreen22-refactor_adv # Conflicts: # src/components/ble/NimbleController.cpp
| * Advertise fast for at least 30 secs then slow downJames A. Jerkins2021-09-051-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On power up, advertise aggressively for at least 30 seconds then switch to a longer interval to conserve battery life. This fast/slow pattern is designed to balance connection response time and battery life. When a disconnect event is received restart the fast/slow pattern. When a failed connect event is received, restart the fast/slow pattern. When the screen is activated and ble is not connected, restart the fast/slow pattern. This pattern is consistent with Apple's BLE developer standards (QA 1931).
| * Revert "Linear decrease of advert rate to conserve battery"James A. Jerkins2021-09-051-5/+0
| | | | | | | | This reverts commit c32ba844e04017a3fd31444c384deb3542bd76be.
| * Linear decrease of advert rate to conserve batteryJames A. Jerkins2021-09-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start advertising aggressively when powered on then slow down linearly over 75 seconds. This will conserve battery by not advertising rapidly the whole time we are seeking a connection. The slowest rate is approximately once every 4.5 seconds to balance responsiveness and battery life. We use a fixed advertising duration of 5 seconds and start with a 62.5 ms advertising interval. Every 5 seconds (the advertising duration) we step up to a larger advertising interval (slower advertising). We continue to increase the advertising interval linearly for 75 seconds from the start of advertising. At 75 seconds we have an advertising interval of 4.44 seconds which we keep until connected. A reboot will restart the sequence. When we receive a disconnect event we restart the sequence with fast advertising and then slow down as described above. Note that we are not using the BLE high duty cycle setting to change the advertising rate. The rate is managed by repeatedly setting the minimum and maximum intervals. The linear rate of decrease and the slowest interval size were determined experimentally by the author. The 5.3 Core spec suggests that you not advertise slower than once every 1.2 seconds to preserve responsiveness but we ignored that suggestion.
| * Fix styles issues - no change to functionalityJames A. Jerkins2021-09-011-6/+6
| |
| * Fix race condition, connect->disconnect->discoveryJames A. Jerkins2021-09-011-1/+3
| |
| * Completely reset connection state on failJames A. Jerkins2021-08-301-0/+3
| |
| * WIP Refactor ble advertisingJames A. Jerkins2021-08-291-40/+58
| | | | | | | | | | Refactor ble advertising based on ble standards and conventions. Changes are based on the bleprph example code, bluetooth docs, and nimble docs.
* | docs: Fix a few typos (#606)Tim Gates2021-09-131-1/+1
|/ | | | | | | | | | | | | | | | | | | | | * docs: Fix a few typos There are small typos in: - doc/versioning.md - src/components/ble/NimbleController.cpp - src/libs/mynewt-nimble/CODING_STANDARDS.md - src/libs/mynewt-nimble/docs/btshell/btshell_GAP.rst - src/systemtask/SystemTask.cpp Fixes: - Should read `milliseconds` rather than `miliseconds`. - Should read `unnecessary` rather than `uncesseray`. - Should read `target` rather than `tharget`. - Should read `project` rather than `projct`. - Should read `preferred` rather than `prefered`. - Should read `functioning` rather than `functionning`. - Should read `forever` rather than `forver`. - Should read `existing` rather than `exisiting`.
* Notify battery level every 10 minutes when connected to a BLE host.Jean-François Milants2021-07-111-0/+6
| | | | Refactor battery percent : only use uint8_t to store the battery % remaining.
* Initialize SystemTask, DisplayApp and HeartRateTask as global static ↵Jean-François Milants2021-06-061-1/+1
| | | | variable instead of variables on the heap. We don't need them on the heap as we know their size at build time, it'll reduce memory fragmentation and it'll make memory analysis easier.
* Reformatted all the files according to clang-format styleAvamander2021-04-241-58/+49
|
* fix build warnings in HR implementationpetter2021-01-251-2/+2
|
* Merge branch piggz/nav into develop:Jean-François Milants2021-01-201-0/+2
| | | | | - fix conflict - add a icon for the navigation app.
* Add heart rate BLE service.Jean-François Milants2021-01-171-2/+5
|
* Include cleanup: componentsokaestne2020-11-161-10/+14
|
* Refactoring of BLE service discovery : it is now implemented into the ↵JF2020-10-291-105/+3
| | | | classes of the services.
* Reset BLE services on disconnect, do not start advertising if a connection ↵JF2020-10-281-4/+6
| | | | is already established.
* Fixed all the includes that were broken due to the renamesAvamander2020-10-021-0/+337