Skip to content

feat(vehicle): add connectivity/diagnostics signed commands#94

Closed
Bre77 wants to merge 1 commit into
mainfrom
fm/tfa-cmd-connectivity-diag
Closed

feat(vehicle): add connectivity/diagnostics signed commands#94
Bre77 wants to merge 1 commit into
mainfrom
fm/tfa-cmd-connectivity-diag

Conversation

@Bre77

@Bre77 Bre77 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Intent

  • Part of a full-coverage pass wrapping every remaining CarServer.VehicleAction proto field - this slice covers connectivity/diagnostics.
  • Add three new signed commands to Commands: bluetooth_classic_pairing_request (Bluetooth Classic, not BLE - phone pairing for calls/audio), bandwidth_test, fetch_keys_info.
  • Purely additive - no existing signatures touched.
  • Tests in tests/test_ble_connectivity_diagnostics_commands.py cover each command's built signed message over the mocked BLE transport.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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.
@Bre77

Bre77 commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

Folded into #91 to avoid serial merge conflicts across the same commands.py regions - closing this in favor of the consolidated PR.

@Bre77 Bre77 closed this Jul 22, 2026
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.

1 participant