panda.python package

Submodules

panda.python.ccp module

class panda.python.ccp.BYTE_ORDER(value)[source]

Bases: enum.Enum

An enumeration.

BIG_ENDIAN = '>'
LITTLE_ENDIAN = '<'
class panda.python.ccp.COMMAND_CODE(value)[source]

Bases: enum.IntEnum

An enumeration.

ACTION_SERVICE = 33
BUILD_CHKSUM = 14
CLEAR_MEMORY = 16
CONNECT = 1
DIAG_SERVICE = 32
DISCONNECT = 7
DNLOAD = 3
DNLOAD_6 = 35
EXCHANGE_ID = 23
GET_ACTIVE_CAL_PAGE = 9
GET_CCP_VERSION = 27
GET_DAQ_SIZE = 20
GET_SEED = 18
GET_S_STATUS = 13
MOVE = 25
PROGRAM = 24
PROGRAM_6 = 34
SELECT_CAL_PAGE = 17
SET_DAQ_PTR = 21
SET_MTA = 2
SET_S_STATUS = 12
SHORT_UP = 15
START_STOP = 6
START_STOP_ALL = 8
TEST = 5
UNLOCK = 19
UPLOAD = 4
WRITE_DAQ = 22
class panda.python.ccp.CcpClient(panda, tx_addr: int, rx_addr: int, bus: int = 0, byte_order: panda.python.ccp.BYTE_ORDER = BYTE_ORDER.BIG_ENDIAN, debug=False)[source]

Bases: object

action_service(service_num: int, data: bytes = b'') dict[source]
build_checksum(size: int) bytes[source]
clear_memory(size: int) None[source]
connect(station_addr: int) None[source]
diagnostic_service(service_num: int, data: bytes = b'') dict[source]
disconnect(station_addr: int, temporary: bool = False) None[source]
download(data: bytes) int[source]
download_6_bytes(data: bytes) int[source]
exchange_station_ids(device_id_info: bytes = b'') dict[source]
get_active_calibration_page()[source]
get_daq_list_size(list_num: int, can_id: int = 0) dict[source]
get_seed(resource_mask: int) bytes[source]
get_session_status() dict[source]
get_version(desired_version: float = 2.1) float[source]
move_memory_block(size: int) None[source]
program(size: int, data: bytes) int[source]
program_6_bytes(data: bytes) int[source]
select_calibration_page() None[source]
set_daq_list_pointer(list_num: int, odt_num: int, element_num: int) None[source]
set_memory_transfer_address(mta_num: int, addr_ext: int, addr: int) None[source]
set_session_status(status: int) None[source]
short_upload(size: int, addr_ext: int, addr: int) bytes[source]
start_stop_synchronised_transmission(mode: int) None[source]
start_stop_transmission(mode: int, list_num: int, odt_num: int, channel_num: int, rate_prescaler: int = 0) None[source]
test_availability(station_addr: int) None[source]
unlock(key: bytes) int[source]
upload(size: int) bytes[source]
write_daq_list_entry(size: int, addr_ext: int, addr: int) None[source]
exception panda.python.ccp.CommandCounterError[source]

Bases: Exception

exception panda.python.ccp.CommandResponseError(message, return_code)[source]

Bases: Exception

exception panda.python.ccp.CommandTimeoutError[source]

Bases: Exception

panda.python.config module

panda.python.dfu module

class panda.python.dfu.PandaDFU(dfu_serial)[source]

Bases: object

clear_status()[source]
erase(address)[source]
get_mcu_type(dev)[source]
static list()[source]
program(address, dat, block_size=None)[source]
program_bootstub(code_bootstub)[source]
recover()[source]
reset()[source]
static st_serial_to_dfu_serial(st, mcu_type=1)[source]
status()[source]

panda.python.flash_release module

panda.python.flash_release.flash_release(path=None, st_serial=None)[source]

panda.python.isotp module

panda.python.isotp.isotp_recv(panda, addr, bus=0, sendaddr=None, subaddr=None)[source]
panda.python.isotp.isotp_recv_subaddr(panda, addr, bus, sendaddr, subaddr)[source]
panda.python.isotp.isotp_send(panda, x, addr, bus=0, recvaddr=None, subaddr=None, rate=None)[source]
panda.python.isotp.msg(x)[source]
panda.python.isotp.recv(panda, cnt, addr, nbus)[source]

panda.python.serial module

class panda.python.serial.PandaSerial(panda, port, baud)[source]

Bases: object

property baudrate
close()[source]
flush()[source]
read(l=1)[source]
write(dat)[source]

panda.python.uds module

class panda.python.uds.ACCESS_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

REQUEST_SEED = 1
SEND_KEY = 2
class panda.python.uds.BAUD_RATE_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

CAN1000000 = 19
CAN125000 = 16
CAN250000 = 17
CAN500000 = 18
PC115200 = 5
PC19200 = 2
PC38400 = 3
PC57600 = 4
PC9600 = 1
class panda.python.uds.CONTROL_PARAMETER_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

FREEZE_CURRENT_STATE = 2
RESET_TO_DEFAULT = 1
RETURN_CONTROL_TO_ECU = 0
SHORT_TERM_ADJUSTMENT = 3
class panda.python.uds.CONTROL_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

DISABLE_RX_DISABLE_TX = 3
DISABLE_RX_ENABLE_TX = 2
ENABLE_RX_DISABLE_TX = 1
ENABLE_RX_ENABLE_TX = 0
class panda.python.uds.CanClient(can_send: Callable[[int, bytes, int], None], can_recv: Callable[[], List[Tuple[int, int, bytes, int]]], tx_addr: int, rx_addr: int, bus: int, sub_addr: Optional[int] = None, debug: bool = False)[source]

Bases: object

recv(drain: bool = False) Generator[bytes, None, None][source]
send(msgs: List[bytes], delay: float = 0) None[source]
class panda.python.uds.DATA_IDENTIFIER_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

ACTIVE_DIAGNOSTIC_SESSION = 61830
APPLICATION_DATA_FINGERPRINT = 61829
APPLICATION_DATA_IDENTIFICATION = 61826
APPLICATION_SOFTWARE_FINGERPRINT = 61828
APPLICATION_SOFTWARE_IDENTIFICATION = 61825
BOOT_SOFTWARE_FINGERPRINT = 61827
BOOT_SOFTWARE_IDENTIFICATION = 61824
CALIBRATION_DATE = 61851
CALIBRATION_EQUIPMENT_SOFTWARE_NUMBER = 61852
CALIBRATION_REPAIR_SHOP_CODE_OR_CALIBRATION_EQUIPMENT_SERIAL_NUMBER = 61850
ECU_INSTALLATION_DATE = 61853
ECU_MANUFACTURING_DATE = 61835
ECU_SERIAL_NUMBER = 61836
ENTITY = 61855
EXHAUST_REGULATION_OR_TYPE_APPROVAL_NUMBER = 61846
ODX_FILE = 61854
PROGRAMMING_DATE = 61849
REPAIR_SHOP_CODE_OR_TESTER_SERIAL_NUMBER = 61848
SUPPORTED_FUNCTIONAL_UNITS = 61837
SYSTEM_NAME_OR_ENGINE_TYPE = 61847
SYSTEM_SUPPLIER_ECU_HARDWARE_NUMBER = 61842
SYSTEM_SUPPLIER_ECU_HARDWARE_VERSION_NUMBER = 61843
SYSTEM_SUPPLIER_ECU_SOFTWARE_NUMBER = 61844
SYSTEM_SUPPLIER_ECU_SOFTWARE_VERSION_NUMBER = 61845
SYSTEM_SUPPLIER_IDENTIFIER = 61834
VEHICLE_MANUFACTURER_ECU_HARDWARE_NUMBER = 61841
VEHICLE_MANUFACTURER_ECU_SOFTWARE_NUMBER = 61832
VEHICLE_MANUFACTURER_ECU_SOFTWARE_VERSION_NUMBER = 61833
VEHICLE_MANUFACTURER_KIT_ASSEMBLY_PART_NUMBER = 61838
VEHICLE_MANUFACTURER_SPARE_PART_NUMBER = 61831
VIN = 61840
class panda.python.uds.DTC_GROUP_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

ALL = 16777215
EMISSIONS = 0
class panda.python.uds.DTC_REPORT_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

DTC_BY_SEVERITY_MASK_RECORD = 8
DTC_BY_STATUS_MASK = 2
DTC_EXTENDED_DATA_RECORD_BY_DTC_NUMBER = 6
DTC_FAULT_DETECTION_COUNTER = 20
DTC_SNAPSHOT_IDENTIFICATION = 3
DTC_SNAPSHOT_RECORD_BY_DTC_NUMBER = 4
DTC_SNAPSHOT_RECORD_BY_RECORD_NUMBER = 5
DTC_WITH_PERMANENT_STATUS = 21
FIRST_CONFIRMED_DTC = 12
FIRST_TEST_FAILED_DTC = 11
MIRROR_MEMORY_DTC_BY_STATUS_MASK = 15
MIRROR_MEMORY_DTC_EXTENDED_DATA_RECORD_BY_DTC_NUMBER = 16
MOST_RECENT_CONFIRMED_DTC = 14
MOST_RECENT_TEST_FAILED_DTC = 13
NUMBER_OF_DTC_BY_SEVERITY_MASK_RECORD = 7
NUMBER_OF_DTC_BY_STATUS_MASK = 1
NUMBER_OF_MIRROR_MEMORY_DTC_BY_STATUS_MASK = 17
SEVERITY_INFORMATION_OF_DTC = 9
SUPPORTED_DTC = 10
class panda.python.uds.DTC_SETTING_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

OFF = 2
ON = 1
class panda.python.uds.DTC_SEVERITY_MASK_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

ALL = 224
CHECK_AT_NEXT_HALT = 64
CHECK_IMMEDIATELY = 128
MAINTENANCE_ONLY = 32
class panda.python.uds.DTC_STATUS_MASK_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

ALL = 255
CONFIRMED_DTC = 8
PENDING_DTC = 4
TEST_FAILED = 1
TEST_FAILED_SINCE_LAST_CLEAR = 32
TEST_FAILED_THIS_OPERATION_CYCLE = 2
TEST_NOT_COMPLETED_SINCE_LAST_CLEAR = 16
TEST_NOT_COMPLETED_THIS_OPERATION_CYCLE = 64
WARNING_INDICATOR_REQUESTED = 128
class panda.python.uds.DYNAMIC_DEFINITION_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

CLEAR_DYNAMICALLY_DEFINED_DATA_IDENTIFIER = 3
DEFINE_BY_IDENTIFIER = 1
DEFINE_BY_MEMORY_ADDRESS = 2
class panda.python.uds.DynamicSourceDefinition(data_identifier, position, memory_size, memory_address)[source]

Bases: tuple

data_identifier: int

Alias for field number 0

memory_address: int

Alias for field number 3

memory_size: int

Alias for field number 2

position: int

Alias for field number 1

exception panda.python.uds.InvalidServiceIdError[source]

Bases: Exception

exception panda.python.uds.InvalidSubFunctioneError[source]

Bases: Exception

class panda.python.uds.IsoTpMessage(can_client: panda.python.uds.CanClient, timeout: float = 1, debug: bool = False, max_len: int = 8)[source]

Bases: object

recv(timeout=None) Optional[bytes][source]
send(dat: bytes) None[source]

Bases: enum.IntEnum

An enumeration.

class panda.python.uds.MESSAGE_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

NETWORK_MANAGEMENT = 2
NORMAL = 1
NORMAL_AND_NETWORK_MANAGEMENT = 3
exception panda.python.uds.MessageTimeoutError[source]

Bases: Exception

exception panda.python.uds.NegativeResponseError(message, service_id, error_code)[source]

Bases: Exception

class panda.python.uds.RESET_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

DISABLE_RAPID_POWER_SHUTDOWN = 5
ENABLE_RAPID_POWER_SHUTDOWN = 4
HARD = 1
KEY_OFF_ON = 2
SOFT = 3
class panda.python.uds.RESPONSE_EVENT_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

CLEAR_RESPONSE_ON_EVENT = 6
ON_CHANGE_OF_DATA_IDENTIFIER = 3
ON_COMPARISON_OF_VALUES = 7
ON_DTC_STATUS_CHANGE = 1
ON_TIMER_INTERRUPT = 2
REPORT_ACTIVATED_EVENTS = 4
START_RESPONSE_ON_EVENT = 5
STOP_RESPONSE_ON_EVENT = 0
class panda.python.uds.ROUTINE_CONTROL_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

REQUEST_RESULTS = 3
START = 1
STOP = 2
class panda.python.uds.ROUTINE_IDENTIFIER_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

CHECK_PROGRAMMING_DEPENDENCIES = 65281
ERASE_MEMORY = 65280
ERASE_MIRROR_MEMORY_DTCS = 65282
class panda.python.uds.SERVICE_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

ACCESS_TIMING_PARAMETER = 131
CLEAR_DIAGNOSTIC_INFORMATION = 20
COMMUNICATION_CONTROL = 40
CONTROL_DTC_SETTING = 133
DIAGNOSTIC_SESSION_CONTROL = 16
DYNAMICALLY_DEFINE_DATA_IDENTIFIER = 44
ECU_RESET = 17
INPUT_OUTPUT_CONTROL_BY_IDENTIFIER = 47
READ_DATA_BY_IDENTIFIER = 34
READ_DATA_BY_PERIODIC_IDENTIFIER = 42
READ_DTC_INFORMATION = 25
READ_MEMORY_BY_ADDRESS = 35
READ_SCALING_DATA_BY_IDENTIFIER = 36
REQUEST_DOWNLOAD = 52
REQUEST_TRANSFER_EXIT = 55
REQUEST_UPLOAD = 53
RESPONSE_ON_EVENT = 134
ROUTINE_CONTROL = 49
SECURED_DATA_TRANSMISSION = 132
SECURITY_ACCESS = 39
TESTER_PRESENT = 62
TRANSFER_DATA = 54
WRITE_DATA_BY_IDENTIFIER = 46
WRITE_MEMORY_BY_ADDRESS = 61
class panda.python.uds.SESSION_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

DEFAULT = 1
EXTENDED_DIAGNOSTIC = 3
PROGRAMMING = 2
SAFETY_SYSTEM_DIAGNOSTIC = 4
class panda.python.uds.TIMING_PARAMETER_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

READ_CURRENTLY_ACTIVE = 3
READ_EXTENDED_SET = 1
SET_TO_DEFAULT_VALUES = 2
SET_TO_GIVEN_VALUES = 4
class panda.python.uds.TRANSMISSION_MODE_TYPE(value)[source]

Bases: enum.IntEnum

An enumeration.

SEND_AT_FAST_RATE = 3
SEND_AT_MEDIUM_RATE = 2
SEND_AT_SLOW_RATE = 1
STOP_SENDING = 4
class panda.python.uds.UdsClient(panda, tx_addr: int, rx_addr: Optional[int] = None, bus: int = 0, timeout: float = 1, debug: bool = False, tx_timeout: float = 1, response_pending_timeout: float = 10)[source]

Bases: object

access_timing_parameter(timing_parameter_type: panda.python.uds.TIMING_PARAMETER_TYPE, parameter_values: Optional[bytes] = None)[source]
clear_diagnostic_information(dtc_group_type: panda.python.uds.DTC_GROUP_TYPE)[source]
communication_control(control_type: panda.python.uds.CONTROL_TYPE, message_type: panda.python.uds.MESSAGE_TYPE)[source]
control_dtc_setting(dtc_setting_type: panda.python.uds.DTC_SETTING_TYPE)[source]
diagnostic_session_control(session_type: panda.python.uds.SESSION_TYPE)[source]
dynamically_define_data_identifier(dynamic_definition_type: panda.python.uds.DYNAMIC_DEFINITION_TYPE, dynamic_data_identifier: int, source_definitions: List[panda.python.uds.DynamicSourceDefinition], memory_address_bytes: int = 4, memory_size_bytes: int = 1)[source]
ecu_reset(reset_type: panda.python.uds.RESET_TYPE)[source]
input_output_control_by_identifier(data_identifier_type: panda.python.uds.DATA_IDENTIFIER_TYPE, control_parameter_type: panda.python.uds.CONTROL_PARAMETER_TYPE, control_option_record: bytes = b'', control_enable_mask_record: bytes = b'')[source]
read_data_by_identifier(data_identifier_type: panda.python.uds.DATA_IDENTIFIER_TYPE)[source]
read_data_by_periodic_identifier(transmission_mode_type: panda.python.uds.TRANSMISSION_MODE_TYPE, periodic_data_identifier: int)[source]
read_dtc_information(dtc_report_type: panda.python.uds.DTC_REPORT_TYPE, dtc_status_mask_type: panda.python.uds.DTC_STATUS_MASK_TYPE = DTC_STATUS_MASK_TYPE.ALL, dtc_severity_mask_type: panda.python.uds.DTC_SEVERITY_MASK_TYPE = DTC_SEVERITY_MASK_TYPE.ALL, dtc_mask_record: int = 16777215, dtc_snapshot_record_num: int = 255, dtc_extended_record_num: int = 255)[source]
read_memory_by_address(memory_address: int, memory_size: int, memory_address_bytes: int = 4, memory_size_bytes: int = 1)[source]
read_scaling_data_by_identifier(data_identifier_type: panda.python.uds.DATA_IDENTIFIER_TYPE)[source]
request_download(memory_address: int, memory_size: int, memory_address_bytes: int = 4, memory_size_bytes: int = 4, data_format: int = 0)[source]
request_transfer_exit()[source]
request_upload(memory_address: int, memory_size: int, memory_address_bytes: int = 4, memory_size_bytes: int = 4, data_format: int = 0)[source]
response_on_event(response_event_type: panda.python.uds.RESPONSE_EVENT_TYPE, store_event: bool, window_time: int, event_type_record: int, service_response_record: int)[source]
routine_control(routine_control_type: panda.python.uds.ROUTINE_CONTROL_TYPE, routine_identifier_type: panda.python.uds.ROUTINE_IDENTIFIER_TYPE, routine_option_record: bytes = b'')[source]
secured_data_transmission(data: bytes)[source]
security_access(access_type: panda.python.uds.ACCESS_TYPE, security_key: bytes = b'', data_record: bytes = b'')[source]
tester_present()[source]
transfer_data(block_sequence_count: int, data: bytes = b'')[source]
write_data_by_identifier(data_identifier_type: panda.python.uds.DATA_IDENTIFIER_TYPE, data_record: bytes)[source]
write_memory_by_address(memory_address: int, memory_size: int, data_record: bytes, memory_address_bytes: int = 4, memory_size_bytes: int = 1)[source]
panda.python.uds.get_dtc_num_as_str(dtc_num_bytes)[source]
panda.python.uds.get_dtc_status_names(status)[source]
panda.python.uds.get_rx_addr_for_tx_addr(tx_addr, rx_offset=8)[source]

panda.python.update module

panda.python.update.ensure_st_up_to_date()[source]

Module contents

class panda.python.ALTERNATIVE_EXPERIENCE[source]

Bases: object

DEFAULT = 0
DISABLE_DISENGAGE_ON_GAS = 1
DISABLE_STOCK_AEB = 2
RAISE_LONGITUDINAL_LIMITS_TO_ISO_MAX = 8
class panda.python.Panda(serial: Optional[str] = None, claim: bool = True)[source]

Bases: object

CAN_PACKET_VERSION = 2
CAN_SEND_TIMEOUT_MS = 10
CLOCK_SOURCE_MODE_DISABLED = 0
CLOCK_SOURCE_MODE_FREE_RUNNING = 1
F2_DEVICES = (b'\x04',)
F4_DEVICES = (b'\x01', b'\x02', b'\x03', b'\x05', b'\x06')
FLAG_HONDA_ALT_BRAKE = 1
FLAG_HONDA_BOSCH_LONG = 2
FLAG_HONDA_NIDEC_ALT = 4
FLAG_HONDA_RADARLESS = 8
FLAG_HYUNDAI_EV_GAS = 1
FLAG_HYUNDAI_HYBRID_GAS = 2
FLAG_HYUNDAI_LONG = 4
FLAG_TESLA_LONG_CONTROL = 2
FLAG_TESLA_POWERTRAIN = 1
FLAG_TOYOTA_ALT_BRAKE = 256
FLAG_TOYOTA_STOCK_LONGITUDINAL = 512
GMLAN_CAN2 = 1
GMLAN_CAN3 = 2
H7_DEVICES = (b'\x07',)
HEALTH_PACKET_VERSION = 7
HEALTH_STRUCT = <Struct object>
HW_TYPE_BLACK_PANDA = b'\x03'
HW_TYPE_DOS = b'\x06'
HW_TYPE_GREY_PANDA = b'\x02'
HW_TYPE_PEDAL = b'\x04'
HW_TYPE_RED_PANDA = b'\x07'
HW_TYPE_UNKNOWN = b'\x00'
HW_TYPE_UNO = b'\x05'
HW_TYPE_WHITE_PANDA = b'\x01'
REQUEST_IN = 192
REQUEST_OUT = 64
SAFETY_ALLOUTPUT = 17
SAFETY_BODY = 27
SAFETY_CHRYSLER = 9
SAFETY_ELM327 = 3
SAFETY_FAW = 26
SAFETY_FORD = 6
SAFETY_GM = 4
SAFETY_GM_ASCM = 18
SAFETY_HONDA_BOSCH = 20
SAFETY_HONDA_BOSCH_GIRAFFE = 5
SAFETY_HONDA_NIDEC = 1
SAFETY_HYUNDAI = 8
SAFETY_HYUNDAI_COMMUNITY = 24
SAFETY_HYUNDAI_HDA2 = 28
SAFETY_HYUNDAI_LEGACY = 23
SAFETY_MAZDA = 13
SAFETY_NISSAN = 14
SAFETY_NOOUTPUT = 19
SAFETY_SILENT = 0
SAFETY_STELLANTIS = 25
SAFETY_SUBARU = 11
SAFETY_SUBARU_LEGACY = 22
SAFETY_TESLA = 10
SAFETY_TOYOTA = 2
SAFETY_VOLKSWAGEN_MQB = 15
SAFETY_VOLKSWAGEN_PQ = 21
SERIAL_DEBUG = 0
SERIAL_ESP = 1
SERIAL_LIN1 = 2
SERIAL_LIN2 = 3
call_control_api(msg)[source]
can_clear(bus)[source]

Clears all messages from the specified internal CAN ringbuffer as though it were drained.

Args:
bus (int): can bus number to clear a tx queue, or 0xFFFF to clear the

global can rx queue.

can_recv()[source]
can_send(addr, dat, bus, timeout=10)[source]
can_send_many(arr, timeout=10)[source]
close()[source]
connect(claim=True, wait=False)[source]
enable_deepsleep()[source]
enter_bootloader()[source]
esp_reset(bootmode=0)[source]
flash(fn='/home/batman/openpilot/panda/python/../board/obj/panda.bin.signed', code=None, reconnect=True)[source]
static flash_static(handle, code)[source]
get_canfd_status(bus)[source]
get_datetime()[source]
get_fan_rpm()[source]
get_mcu_type()[source]
get_packets_versions()[source]
get_secret()[source]
get_serial()[source]
get_signature()[source]
static get_signature_from_firmware(fn) bytes[source]
get_type()[source]
get_usb_serial()[source]
get_version()[source]
has_canfd() bool[source]
has_obd()[source]
health()[source]
is_black()[source]
is_dos()[source]
is_grey()[source]
is_internal() bool[source]
is_pedal()[source]
is_red()[source]
is_uno()[source]
is_white()[source]
isotp_recv(addr, bus=0, sendaddr=None, subaddr=None)[source]
isotp_send(addr, dat, bus, recvaddr=None, subaddr=None)[source]
kline_5baud(addr, k=True, l=True)[source]
kline_drain(bus=2)[source]
kline_ll_recv(cnt, bus=2)[source]
kline_recv(bus=2, header_len=4)[source]
kline_send(x, bus=2, checksum=True)[source]
kline_wakeup(k=True, l=True)[source]
static list()[source]
reconnect()[source]
recover(timeout: Optional[int] = None, reset: bool = True) bool[source]
reset(enter_bootstub=False, enter_bootloader=False)[source]
send_heartbeat(engaged=True)[source]
serial_clear(port_number)[source]

Clears all messages (tx and rx) from the specified internal uart ringbuffer as though it were drained.

Args:

port_number (int): port number of the uart to clear.

serial_read(port_number)[source]
serial_write(port_number, ln)[source]
set_can_data_speed_kbps(bus, speed)[source]
set_can_enable(bus_num, enable)[source]
set_can_loopback(enable)[source]
set_can_speed_kbps(bus, speed)[source]
set_clock_source_mode(mode)[source]
set_datetime(dt)[source]
set_esp_power(on)[source]
set_fan_power(percentage)[source]
set_gmlan(bus=2)[source]
set_green_led(enabled)[source]
set_heartbeat_disabled()[source]
set_ir_power(percentage)[source]
set_obd(obd)[source]
set_phone_power(enabled)[source]
set_power_save(power_save_enabled=0)[source]
set_safety_mode(mode=0, param=0, disable_checks=True)[source]
set_siren(enabled)[source]
set_uart_baud(uart, rate)[source]
set_uart_callback(uart, install)[source]
set_uart_parity(uart, parity)[source]
set_usb_power(on)[source]
panda.python.ensure_can_packet_version(fn)[source]
panda.python.ensure_health_packet_version(fn)[source]
panda.python.pack_can_buffer(arr)[source]
panda.python.unpack_can_buffer(dat)[source]