-
Notifications
You must be signed in to change notification settings - Fork 1
[RSDK-13175] Add API key BT characteristic #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| 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); | ||
| } |
There was a problem hiding this comment.
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
kevin49999
left a comment
There was a problem hiding this 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
Co-authored-by: Kevin Johnson <[email protected]>
kevin49999
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Description
RSDK-13175
apiKeyCredsKeyBT characteristicViamBluetoothUUIDsapiKeyparam towriteRobotPartConfigfor it to be written toapiKeyCredsKeycharTesting
viam-serverwith a healthy app connection