Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e0652c2
docs: add AGENTS.md, make CLAUDE.md a symlink to it
jplexer Mar 9, 2026
eedf039
bluetooth/pairability: reset cached discoverable state on BT init
jplexer Mar 9, 2026
19a9734
services/voice: add mutex protection to transfer stopped handler
jplexer Mar 9, 2026
8aae49f
compositor/display: remove obelix corner code
jplexer Mar 9, 2026
d9458ba
ci: conditionally run S3 upload only in upstream repository
Mearman Mar 9, 2026
dc8119c
fw/drivers/hrm/gh3x2x: fix quality levels and split callbacks
gmarull Mar 9, 2026
2b43a57
fw/drivers/hrm/gh3x2x: disable SpO2 by default
gmarull Mar 9, 2026
f2651b2
fw/drivers/hrm/gh3x2x: enable wear detection
gmarull Mar 9, 2026
0f0aaab
fw/services/normal/activity: tweak HRM turn on/off times and criteria
gmarull Mar 9, 2026
e3e93fe
fw/drivers/hrm/gh3x2x: tweak quality thresholds
gmarull Mar 9, 2026
f505fbd
fw/services/common/hrm: add on time tracking
gmarull Mar 9, 2026
aaa4e9a
fw/drivers/hrm/gh3x2x: do not build buggy timer on main firmware
gmarull Mar 9, 2026
e11911d
gitlint: enforce area format instead of conventional commits
Mearman Mar 9, 2026
ae6892b
tests/graphics: add macOS-specific fixture support
Mearman Mar 9, 2026
5646913
tests/fakes: fix HCI whitelist address handling
Mearman Mar 9, 2026
6616c55
tests: add Docker testing scripts for CI-matched environment
Mearman Mar 9, 2026
a1e42b5
tests: add documentation for cross-platform testing
Mearman Mar 9, 2026
4358b72
tests/fw/graphics/util: fix platform suffix for Linux CI
Mearman Mar 9, 2026
cad7617
fw/comm/ble: fix null check and improve error handling
Mearman Mar 9, 2026
36abc19
tests/stubs: update BLE stubs for driver layer testing
Mearman Mar 9, 2026
3a256f2
tests/fakes: add conditional compilation for BLE fakes
Mearman Mar 9, 2026
8208065
tests/wscript: enable BLE tests and fix build issues
Mearman Mar 9, 2026
08721a1
tests/fakes: fix duplicate function definition in fake_HCIAPI
Mearman Mar 10, 2026
aa0f2e5
tests/fw/comm: fix gap_le_connection_add argument count
Mearman Mar 10, 2026
955a9db
tests/fw/comm: add BLE driver stubs to wscript
Mearman Mar 10, 2026
e340a75
tools: use subprocess instead of sh for pip freeze
Mearman Mar 10, 2026
05698ef
tests: fix BLE subscription tests build errors
Mearman Mar 10, 2026
4da4fc1
tests: fix stub function signatures for BLE tests
Mearman Mar 10, 2026
811bba4
tests: include stubs_gap_le_advert.h in test_gap_le_advert.c
Mearman Mar 10, 2026
bef0bc6
tests: fix stub functions to be linkable
Mearman Mar 10, 2026
a81e584
tests: simplify bt_driver_advert_set_advertising_data stub
Mearman Mar 10, 2026
f5ee5f6
tests: add implementations for GATT driver stubs
Mearman Mar 10, 2026
53195d1
tests: add stub for prv_contains_service_changed_characteristic
Mearman Mar 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions .claude/CLAUDE.md

This file was deleted.

1 change: 1 addition & 0 deletions .claude/CLAUDE.md
2 changes: 1 addition & 1 deletion .github/workflows/build-firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:

- name: Upload log hash dictionary
uses: Noelware/s3-action@2.3.1
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' && github.repository == 'coredevices/PebbleOS' }}
with:
access-key-id: ${{ secrets.LOG_HASH_BUCKET_KEY_ID }}
secret-key: ${{ secrets.LOG_HASH_BUCKET_SECRET }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-prf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:

- name: Upload log hash dictionary
uses: Noelware/s3-action@2.3.1
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' && github.repository == 'coredevices/PebbleOS' }}
with:
access-key-id: ${{ secrets.LOG_HASH_BUCKET_KEY_ID }}
secret-key: ${{ secrets.LOG_HASH_BUCKET_SECRET }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ jobs:

- name: Upload log hash dictionary
uses: Noelware/s3-action@2.3.1
if: ${{ github.repository == 'coredevices/PebbleOS' }}
with:
access-key-id: ${{ secrets.LOG_HASH_BUCKET_KEY_ID }}
secret-key: ${{ secrets.LOG_HASH_BUCKET_SECRET }}
Expand Down
9 changes: 8 additions & 1 deletion .gitlint
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ ignore-merge-commits=false
ignore-fixup-commits=false
ignore-fixup-amend-commits=false
ignore-squash-commits=false
regex-style-search=true

[title-match-regex]
regex=[a-z0-9/]+: .*
# Format: "area: description" where area is either:
# - A path with at least one / (e.g., fw/drivers/hrm, third_party/nonfree)
# - One of the known short areas: ci, treewide, platform, sdk, tools, resources,
# docs, waftools, settings, libc, tests, notifications, build, wscript, fw,
# third_party, ancs, compositor, console, kernel, health
# Conventional commit types like feat:, fix:, chore: are NOT allowed.
regex=^([a-z0-9_]+/[a-z0-9_/]*|ci|treewide|platform|sdk|tools|resources|docs|waftools|settings|libc|tests|notifications|build|wscript|fw|third_party|ancs|compositor|console|kernel|health|gitlint|readme|requirements|python_libs|pbl-tool|pbl|moddable|libutil|iconography|gitignore|capabilities|asterix|activity|accel): .*

[title-max-length]
line-length=100
49 changes: 49 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# PebbleOS

PebbleOS is the operating system running on Pebble smartwatches.

## Organization

- `docs`: project documentation
- `python_libs`: tools used in multiple areas, e.g. log dehashing, console, etc.
- `resources`: firmware resources (icons, fonts, etc.)
- `sdk`: application SDK generation files
- `src`: firmware source
- `tests`: tests
- `third_party`: third-party code in git submodules, also includes glue code
- `tools`: a variety of tools or scripts used in multiple areas, from build
system, tests, etc.
- `waftools`: scripts used by the build system

## Code style

- clang-format for C code

## Firmware development

- Configure: `./waf configure --board BOARD_NAME`

- Board names can be obtained from `./waf --help`
- `--release` enables release mode
- `--mfg` enables manufacturing mode
- `--qemu` enables QEMU mode

- Build main firmware: `./waf build`
- Build recovery firmware (PRF): `./waf build_prf`
- Run tests: `./waf test`

## Git rules

Main rules:

- Commit using `-s` git option, so commits have `Signed-Off-By`
- Always indicate commit is co-authored by Claude
- Commit in small chunks, trying to preserve bisectability
- Commit format is `area: short description`, with longer description in the
body if necessary
- Run `gitlint` on every commit to verify rules are followed

Others:

- If fixing Linear or GitHub issues, include in the commit body a line with
`Fixes XXX`, where XXX is the issue number.
3 changes: 2 additions & 1 deletion src/fw/comm/ble/gatt_client_subscriptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,8 @@ static BTErrno prv_subscribe(BLECharacteristic characteristic_ref,
.att_handle = att_handle,
};
// Prepend to the list of subscriptions of the connection:
ListNode *head = &connection->gatt_subscriptions->node;
ListNode *head = connection->gatt_subscriptions ?
&connection->gatt_subscriptions->node : NULL;
connection->gatt_subscriptions =
(GATTClientSubscriptionNode *) list_prepend(head, &subscription->node);

Expand Down
23 changes: 21 additions & 2 deletions src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,8 +758,23 @@ static void prv_handle_meta_read(PPoGATTClient *client, const uint8_t *value,
size_t value_length, BLEGATTError error) {
PBL_ASSERTN(client->state == StateDisconnectedReadingMeta);
if (error != BLEGATTErrorSuccess) {
// GATT read failed - this is retriable since the mobile app may not be ready yet
goto handle_retriable_error;
// Check if this is a permanent error that should not be retried
// Permanent errors include: InvalidHandle, ReadNotPermitted, InvalidPDU,
// InsufficientAuthentication/Authorization/Encryption, AttributeNotFound, etc.
// These errors indicate that the operation cannot succeed through retrying.
// Timeout and resource errors are retriable since the remote might recover.
switch (error) {
case BLEGATTErrorSuccess:
break;
// Retriable errors - remote might recover:
case BLEGATTErrorPrepareQueueFull:
case BLEGATTErrorInsufficientResources:
case BLEGATTErrorRequestTimeOut:
goto handle_retriable_error;
// Permanent errors - delete client immediately:
default:
goto handle_error;
}
}
if (value_length < sizeof(PPoGATTMetaV0)) {
goto handle_error;
Expand Down Expand Up @@ -844,6 +859,10 @@ static void prv_handle_meta_read(PPoGATTClient *client, const uint8_t *value,
return;
}

// Subscribe failed - this is a permanent error, delete the client
PBL_LOG_ERR("Failed to subscribe to PPoGATT data characteristic: err=%x", e);
goto handle_error;

handle_retriable_error:
// GATT read failed - schedule a retry if we haven't exceeded the max retry count
if (++client->meta_read_retries < PPOGATT_META_READ_RETRY_COUNT_MAX) {
Expand Down
2 changes: 0 additions & 2 deletions src/fw/drivers/hrm/as7000/as7000.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,6 @@ static void prv_disable(HRMDevice *dev) {
WTF;
}
led_disable(LEDEnablerHRM);
analytics_stopwatch_stop(ANALYTICS_DEVICE_METRIC_HRM_ON_TIME);
}

// NOTE: the caller must hold the device's state lock
Expand All @@ -525,7 +524,6 @@ static void prv_enable(HRMDevice *dev) {

} else if (dev->state->enabled_state == HRMEnabledState_Disabled) {
led_enable(LEDEnablerHRM);
analytics_stopwatch_start(ANALYTICS_DEVICE_METRIC_HRM_ON_TIME, AnalyticsClient_System);

// Enable the device and schedule a timer callback for when we can start communicating with it.
gpio_output_set(&dev->en_gpio, true);
Expand Down
Loading
Loading