feat(vehicle): add connectivity/diagnostics signed commands#94
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 642b70ed6f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| async def bandwidth_test(self, requested_size: int) -> dict[str, Any]: | ||
| """Runs a diagnostic bandwidth test of the given size in bytes.""" | ||
| return await self._sendInfotainment( |
There was a problem hiding this comment.
Mark bandwidth_test as non-mutating
Because this diagnostic uses the default mutating=True, VehicleBluetooth(confirmation="optimistic") short-circuits _sendInfotainment() after the write and never waits for the BandwidthTestResponse, so the method reports success without transferring the requested response bytes; in ack/verify modes the response is still discarded because _command() has no bandwidthTestResponse branch. Pass mutating=False and return the parsed response so the method actually measures the requested size.
Useful? React with 👍 / 👎.
|
|
||
| async def fetch_keys_info(self) -> dict[str, Any]: | ||
| """Gets information about keys paired with the vehicle.""" | ||
| return await self._sendInfotainment( |
There was a problem hiding this comment.
Parse fetch_keys_info responses
FetchKeysInfoAction is a response-bearing request: the current tesla-protocol Response oneof includes keysInfoResponse, but _command() only returns ping, vehicleData, or actionStatus before falling through to a generic success. As added here, a successful vehicle reply containing paired-key records is silently dropped, so callers never receive the information promised by fetch_keys_info(); add a parser branch and a reply-decoding test for keysInfoResponse.
Useful? React with 👍 / 👎.
Wraps three previously-unimplemented VehicleAction fields: bluetooth_classic_pairing_request, bandwidth_test, and fetch_keys_info. Follows the existing Commands wrapper pattern, so both Fleet-signed and BLE transports get these for free.
642b70e to
a186d26
Compare
|
Folded into #91 to avoid serial merge conflicts across the same commands.py regions - closing this in favor of the consolidated PR. |
Intent
CarServer.VehicleActionproto field - this slice covers connectivity/diagnostics.Commands:bluetooth_classic_pairing_request(Bluetooth Classic, not BLE - phone pairing for calls/audio),bandwidth_test,fetch_keys_info.tests/test_ble_connectivity_diagnostics_commands.pycover each command's built signed message over the mocked BLE transport.