summaryrefslogtreecommitdiff
path: root/src/components/ble
AgeCommit message (Collapse)AuthorFilesLines
2021-10-26Motion service : fix step notifications that were sent as a single byte ↵Jean-François Milants2-2/+2
instead of 4 (uint32_t).
2021-10-20Add mention to Call characteristic (which was missing in the doc) and change ↵Jean-François Milants1-1/+1
the UUID of the new Motion service from 00020000-* to 00030000-*.
2021-10-17Enable/disable notifications for motion service.Jean-François Milants1-0/+3
2021-10-17Add MotionService : expose step count and RAW X/Y/Z values to the host.Jean-François Milants4-2/+171
2021-10-17MotionService : fix typo and characteristic array size + send notification ↵Jean-François Milants3-3/+30
only if the host subscribed to them.
2021-10-09Merge pull request #522 from jonvmey/fix-nav-uuid-docsJF2-41/+21
Fix Navigation Service UUID docs
2021-10-09Merge pull request #524 from jonvmey/ble-uuid-c-castsJF10-64/+55
Remove unnecessary C-style casts with BLE UUIDs
2021-10-02Remove static declartion on batteryValue preventing read attribute from ↵Tim Keller1-1/+1
updating.
2021-09-14Merge branch 'develop' into disable_notif_onlyRiku Isokoski2-45/+87
2021-09-13Merge branch 'develop' into disable_notif_onlyRiku Isokoski1-1/+1
2021-09-13Merge branch 'refactor_adv' of https://github.com/evergreen22/InfiniTime ↵Jean-François Milants2-45/+87
into evergreen22-refactor_adv # Conflicts: # src/components/ble/NimbleController.cpp
2021-09-13docs: Fix a few typos (#606)Tim Gates1-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`.
2021-09-12Toggle notifications only, keep vibrations.Riku Isokoski2-12/+1
2021-09-05Advertise fast for at least 30 secs then slow downJames A. Jerkins2-1/+17
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).
2021-09-05Revert "Linear decrease of advert rate to conserve battery"James A. Jerkins2-6/+0
This reverts commit c32ba844e04017a3fd31444c384deb3542bd76be.
2021-09-04Linear decrease of advert rate to conserve batteryJames A. Jerkins2-0/+6
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.
2021-09-01Fix styles issues - no change to functionalityJames A. Jerkins1-6/+6
2021-09-01Fix race condition, connect->disconnect->discoveryJames A. Jerkins1-1/+3
2021-08-30Completely reset connection state on failJames A. Jerkins1-0/+3
2021-08-29WIP Refactor ble advertisingJames A. Jerkins2-40/+60
Refactor ble advertising based on ble standards and conventions. Changes are based on the bleprph example code, bluetooth docs, and nimble docs.
2021-07-24Move callback function into anonymous namespaceJonathan Vander Mey1-5/+5
2021-07-24Remove unnecessary C-style casts with BLE UUIDsJonathan Vander Mey10-64/+55
Instead of casting the UUID object to the ble_uuid_t* used throughout the NimBLE API just pass the address of the ble_uuid_t member that's at the start of each of the UUID structs.
2021-07-24Update nav service UUID macro to constexpr functionsJonathan Vander Mey2-28/+20
2021-07-24Set navigation service id is base UUID macroJonathan Vander Mey2-13/+1
Avoids the need to copy the same ID into every characteristic UUID genereated from it.
2021-07-24Update Navigation UUID documentationJonathan Vander Mey1-1/+1
Fixed mismatch between the service and characteristic IDs in the navigation service comments and documentation. They had old values not reflecting the current code and changes in doc/ble.md
2021-07-22Make firmware updating more foolproof (#469)Riku Isokoski1-5/+4
* Make firmware updating more foolproof and fix bugs * No need to manually handle overflow * Make startTime TickType_t * Don't process TouchEvents::None * Fix sleep getting re-enabled issue more directly
2021-07-11Notify battery level every 10 minutes when connected to a BLE host.Jean-François Milants4-4/+15
Refactor battery percent : only use uint8_t to store the battery % remaining.
2021-07-02Inititialize members in class declarationJonathan Vander Mey2-22/+12
Also added initializers for previously unintialized members.
2021-07-02Move local-only function into anonymous namespaceJonathan Vander Mey1-4/+3
2021-07-02Make MusicService UUID objects static constexprJonathan Vander Mey2-22/+31
2021-07-02Eliminate reinterpret_castingJonathan Vander Mey1-26/+26
2021-06-26SPI flash sleep if bootloader >= 1.0.0 (#322)Neil O'Fix1-0/+5
* Retrieve and display bootloader version - Display bootloader version on System Info screen - Enable SPI flash sleep mode if bootloader version >= 1.0.0 * Wait for SPI flash to wakeup before starting OTA DFU
2021-06-12Merge pull request #359 from Avamander/patch-2JF0022-157/+95
Used a macro for UUID generation, switched from C-style casts to reinterpret_cast, renamed callback
2021-06-06Initialize SystemTask, DisplayApp and HeartRateTask as global static ↵Jean-François Milants5-7/+7
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.
2021-05-17Updated license header yearAvamander2-2/+2
2021-05-17Used a macro for UUID generation, switched from C-style casts to ↵Avamander2-155/+93
reinterpret_cast, renamed callback
2021-04-24Changed access modified indentationAvamander16-36/+36
2021-04-24Reformatted all the files according to clang-format styleAvamander31-1359/+1095
2021-04-09Merge branch 'develop' into notification-titleJean-François Milants1-1/+1
# Conflicts: # src/displayapp/screens/Notifications.cpp
2021-04-04Fix music app :Jean-François Milants1-1/+1
- Enable LVGL animation (and disable groups, which were not used), and set the speed. - Fix disc animation and progress display by initializing lastIncrement at 0 (a random value will be used otherwise, in release build)
2021-04-04Ignore notification with empty message.Jean-François Milants2-4/+10
2021-04-04Add support for notification title. The notification buffer must contain the ↵Jean-François Milants6-2/+22
title and the message separated by a '\0' character. If the buffer does not contain any \0, the whole buffer is considered to be the message of the notification. A default title will be displayed in the notification app.
2021-02-14Merge pull request #182 from petterhs/warningsJF0022-5/+3
Fix build warnings coming from HR implementation
2021-02-14Fix merge conflict.Jean-François Milants2-0/+11
2021-02-14Merge pull request #161 from petterhs/callsJF0024-5/+98
Call functionality with changed UUID for notification event characteristic
2021-02-07add vibration togglepetter2-0/+11
2021-02-02Update to nimble 1.3 master branch commit ↵Jean-François Milants3-0/+3
82153e744833821e20e9a8b0d61c38b2b0dbcfe1 WARNING : heartbeat task is disabled!
2021-01-27add mute button and functionality for call notification + new button iconspetter2-1/+16
2021-01-25fix build warnings in HR implementationpetter2-5/+3
2021-01-24Handle call notification the same way than other notifications.Jean-François Milants2-26/+46
Display the call notifications in the Notification app, with buttons to accept/reject the call.