ble

command
v2.0.0-...-8e500b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Ble illustrates how to send commands to a vehicle over Bluetooth Low Energy. The program unlocks your car and turns on the AC.

For more fleshed out examples of other commands, see github.com/tesla/vehicle-command/pkg/cmd/tesla-control.

Pairing with the vehicle

To generate a key pair with OpenSSL:

openssl ecparam -genkey -name prime256v1 -noout > private.pem
openssl ec -in private.pem -pubout > public.pem

Next, use github.com/teslamotors/vehicle-command/cmd/tesla-control an send add-key request to the vehicle over BLE:

tesla-control -vin YOUR_VIN -ble add-key-request public.pem owner cloud_key

Approve the request by tapping your NFC card or keyfob on the center console and then tapping "Confirm" on the vehicle screen.

Sending "unlock" and "climate on" commands

Sending commands to the vehicle requires the private key you generated above:

./ble -vin YOUR_VIN -key private.pem

You can add the -debug flag to inspect the bytes sent over BLE.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL