Skip to content

Conversation

@danielbotros
Copy link
Member

@danielbotros danielbotros commented Jan 14, 2026

Description

RSDK-13175

  • Adds apiKeyCredsKey BT characteristic ViamBluetoothUUIDs
  • Adds apiKey param to writeRobotPartConfig for it to be written to apiKeyCredsKey char
  • Updates example app and README to incorporate this apiKey
  • Relevant agent PR

Testing

  1. Ran agent binary with relevant changes on my pi in bluetooth provisioning mode
  2. Loaded app on my Phone, connected to and paired to pi
  3. Wrote machine config with API key, without API key, and with both API key and secret
  4. Validated agent was able to startup viam-server with a healthy app connection

Comment on lines +203 to +211

if (apiKey != null) {
final encodedApiKey = encoder.process(utf8.encode('$psk:${apiKey.toJson()}'));
final apiKeyCharacteristic = bleService.characteristics.firstWhere(
(char) => char.uuid.str == ViamBluetoothUUIDs.apiKeyCredsUUID,
orElse: () => throw Exception('apiKeyCharacteristic not found'),
);
await apiKeyCharacteristic.write(encodedApiKey);
}
Copy link
Member Author

@danielbotros danielbotros Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking to make this optional since everything else was written to be backwards compatible with secrets, and if an apiKey is included then it will be used over secret so I don't want to force api key usage before these changes have been fully validated

@danielbotros danielbotros changed the title Add API key BT characteristic and update examples / readme [RSDK-13175] Add API key BT characteristic Jan 15, 2026
@danielbotros danielbotros marked this pull request as ready for review January 15, 2026 16:37
Copy link
Member

@kevin49999 kevin49999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few small comments but looks great! ty for the contribution

Copy link
Member

@kevin49999 kevin49999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants