RVS_BTDriver_OBD_ELM327_DeviceProtocol

public protocol RVS_BTDriver_OBD_ELM327_DeviceProtocol : RVS_BTDriver_OBD_DeviceProtocol

This is a specialization for the common ELM327 chipset.

  • This returns the ELM327 chipset version for the device.

    Declaration

    Swift

    var elm327Version: String { get }

General

  • Return the device description

    Declaration

    Swift

    func getDeviceDescription()
  • Return the device ID

    Declaration

    Swift

    func getDeviceIdentifier()
  • Set the device ID

    Declaration

    Swift

    func setDeviceIdentifier(_ id: String)

    Parameters

    id

    A String, with up to 12 ASCII characters.

  • Set the Baud Rate Divisor

    Declaration

    Swift

    func setBaudRateDivisor(_ divisor: UInt8)

    Parameters

    divisor

    0-255, unsigned 8-bit integer.

  • Set the Baud Rate Rate Handshake Timeout

    Declaration

    Swift

    func setBaudRateHandshakeTimeout(_ timeout: UInt8)

    Parameters

    timeout

    0-255, unsigned 8-bit integer.

  • Restore the OBD Device to Defaults

    Declaration

    Swift

    func restoreToDefaults()
  • Turn echo on

    Declaration

    Swift

    func turnEchoOn()
  • Turn Echo Off

    Declaration

    Swift

    func turnEchoOff()
  • Flush All Events

    Declaration

    Swift

    func flushAllEvents()
  • Return the unit ID

    Declaration

    Swift

    func getID()
  • Turn on Linefeeds

    Declaration

    Swift

    func turnLinefeedsOn()
  • Turn Off Linefeeds

    Declaration

    Swift

    func turnLinefeedsOff()
  • Turn On Low Power Mode

    Declaration

    Swift

    func turnLowPowerModeOn()
  • Turn On Memory

    Declaration

    Swift

    func turnMemoryOn()
  • Turn Off Memory

    Declaration

    Swift

    func turnMemoryOff()
  • Return Stored Data In Memory

    Declaration

    Swift

    func fetchStoredData()
  • Store 1 Byte of Data in Memory

    Declaration

    Swift

    func storeData(_ data: UInt8)

    Parameters

    data

    0-255, unsigned 8-bit integer.

  • Perform a “Warm Start”

    Declaration

    Swift

    func warmStart()
  • Reset All

    Declaration

    Swift

    func resetAll()

OBD

  • Use Long (>7 Byte) Messages

    Declaration

    Swift

    func useLongMessages()
  • Use Short <= 7Bytes) Messages

    Declaration

    Swift

    func useShortMessages()
  • Enable Automatic Receive

    Declaration

    Swift

    func autoReceive()
  • Enable Adaptive Timing Auto Mode 1

    Declaration

    Swift

    func useAdaptiveTimingMode1()
  • Enable Adaptive Timing Auto Mode 1

    Declaration

    Swift

    func useAdaptiveTimingMode2()
  • Turn Adaptive Timing Off

    Declaration

    Swift

    func turnAdaptiveTimingOff()
  • Return a Buffer Dump

    Declaration

    Swift

    func bufferDump()
  • Bypass the Initialization Sequence

    Declaration

    Swift

    func bypassInitialization()
  • Describe the Current Protocol

    Declaration

    Swift

    func describeCurrentProtocol()
  • Describe the Current Protocol as a Number

    Declaration

    Swift

    func describeProtocolByNumber()
  • Turn Headers On

    Declaration

    Swift

    func turnHeadersOn()
  • Turn Headers Off

    Declaration

    Swift

    func turnHeadersOff()
  • Monitor All

    Declaration

    Swift

    func monitorAll()
  • Set the Monitor for Receiver

    Declaration

    Swift

    func setMonitorForReceiver(_ monitor: UInt8)

    Parameters

    monitor

    0-255 (8-bit unsigned integer)

  • Set the Monitor for Transmitter

    Declaration

    Swift

    func setMonitorForTransmitter(_ monitor: UInt8)

    Parameters

    monitor

    0-255 (8-bit unsigned integer)

  • Set the Protocol

    Declaration

    Swift

    func setProtocol(_ protocolNumber: UInt8)

    Parameters

    protocolNumber

    0-7 (unsigned integer)

  • Set Protocol (Alternate Try)

    Declaration

    Swift

    func setProtocol2(_ protocolNumber: UInt8)

    Parameters

    protocolNumber

    0-7 (unsigned integer)

  • Set Auto Protocol (1 hex Digit)

    Declaration

    Swift

    func setAutoProtocol(_ protocolNumber: UInt8)

    Parameters

    protocolNumber

    0-7 (unsigned integer)

  • Set Auto Protocol (Alternate Try)

    Declaration

    Swift

    func setAutoProtocol2(_ protocolNumber: UInt8)

    Parameters

    protocolNumber

    0-7 (unsigned integer)

  • Use Auto Protocol

    Declaration

    Swift

    func useAutoProtocol()
  • Close the Protocol

    Declaration

    Swift

    func closeProtocol()
  • Turn Responses On

    Declaration

    Swift

    func turnResponsesOn()
  • Turn Responses Off

    Declaration

    Swift

    func turnResponsesOff()
  • Set the Receive Address

    Declaration

    Swift

    func setReceiveAddress(_ address: UInt8)

    Parameters

    address

    0-255 (8-bit unsigned integer)

  • Set the Receive Address (Alternate Command)

    Declaration

    Swift

    func setReceiveAddress2(_ address: UInt8)

    Parameters

    address

    0-255 (8-bit unsigned integer)

  • Turn On Print Spaces

    Declaration

    Swift

    func turnPrintSpacesOn()
  • Turn Off Print Spaces

    Declaration

    Swift

    func turnPrintSpacesOff()
  • Set Header

    Declaration

    Swift

    func setHeader(_ pref: UInt8, _ value: UInt8)

    Parameters

    pref

    Prefix 0-7

    value

    0-255

  • Set Header

    Declaration

    Swift

    func setHeader(_ value1: UInt8, _ value2: UInt8, _ value3: UInt8)

    Parameters

    value1

    0-255

    value2

    0-255

    value3

    0-255

  • Set Standard (J1978) Search Order

    Declaration

    Swift

    func useStandardSearchOrder()
  • Set Tester Address

    Declaration

    Swift

    func setTesterAddress(_ address: UInt8)

    Parameters

    address

    0-255 (8-bit unsigned integer)

  • Set Timeout to Multiples of 4ms

    Declaration

    Swift

    func setTimeOutBy4MillisecondIntervals(_ timeout: UInt8)

    Parameters

    timeout

    0-255 (8-bit unsigned integer)

CAN

  • Turn CAN Auto-Formatting On

    Declaration

    Swift

    func turnCANAutoFormattingOn()
  • Turn CAN Auto-Formatting Off

    Declaration

    Swift

    func turnCANAutoFormattingOff()
  • Turn on CAN Extended Addressing, and Set it to the Given Value

    Declaration

    Swift

    func setCANExtendedAddressing(_ address: UInt8)

    Parameters

    address

    0-255 (8-bit unsigned integer)

  • Turn CAN Extended Addressing Off

    Declaration

    Swift

    func turnOffCANExtendedAddressing()
  • Set the ID Filter

    • paramater pref: Prefix 0-7

    Declaration

    Swift

    func setIDFilter(_ pref: UInt8, _ value: UInt8)

    Parameters

    value

    0-255

  • Set the ID Filter

    Declaration

    Swift

    func setIDFilter(_ value1: UInt8, _ value2: UInt8, _ value3: UInt8, _ value4: UInt8)

    Parameters

    value1

    0-255

    value2

    0-255

    value3

    0-255

    value4

    0-255

  • Turn CAN Flow Control On

    Declaration

    Swift

    func turnCANFlowControlOn()
  • Turn CAN Flow Control Off

    Declaration

    Swift

    func turnCANFlowControlOff()
  • Turn CAN Silent Mode On

    Declaration

    Swift

    func turnCANSilentModeOn()
  • Turn CAN Silent Mode Off

    Declaration

    Swift

    func turnCANSilentModeOff()
  • Turn DLC Display On

    Declaration

    Swift

    func turnDLCDisplayOn()
  • Turn DLC Display Off

    Declaration

    Swift

    func turnDLCDisplayOff()
  • Set the CAN Flow Control Data

    Declaration

    Swift

    func setFlowControlData(_ values: [UInt8])

    Parameters

    values

    Up to 5 values of 0-255

  • Set the CAN Flow Control Header

    Declaration

    Swift

    func setFlowControlHeader(_ value1: UInt8, _ value2: UInt8, _ value3: UInt8, _ value4: UInt8)

    Parameters

    value1

    0-255

    value2

    0-255

    value3

    0-255

    value4

    0-255

  • Set the CAN Flow Control Mode

    Declaration

    Swift

    func setFlowControlMode(_ mode: UInt8)

    Parameters

    mode

    0-7

  • Set the Protocol B Options and Baud Rate

    Declaration

    Swift

    func setProtocolBOptionsAndBaudRate(_ options: UInt8, _ baudRate: UInt8)

    Parameters

    options

    0-255

    baudRate

    0-255

  • Send an RTR Message

    Declaration

    Swift

    func rtrMessage()
  • Turn the Variable DLC On

    Declaration

    Swift

    func turnVariableDLCOn()
  • Turn the Variable DLC Off

    Declaration

    Swift

    func turnVariableDLCOff()

Volts

  • Set the Calibration Volts

    Declaration

    Swift

    func setCalibratingVoltage(_ value: Float)

    Parameters

    value

    Calibrating voltage.

  • Reset the Calibration Voltage

    Declaration

    Swift

    func resetCalibratingVoltage()

J1939

J1850

  • The IFR Value Should be Set From the Header

    Declaration

    Swift

    func getIFRValueFromHeader()
  • The IFR Value Should be Set From the Source

    Declaration

    Swift

    func getIFRValueFromSource()
  • Turn IFRs On

    Declaration

    Swift

    func turnIFRsOn()
  • Turn On IFRs, and Set to Auto

    Declaration

    Swift

    func useIFRsAuto()
  • Turn IFRs Off

    Declaration

    Swift

    func turnIFRsOff()

ISO

  • Try to Set Baud Rate to 10400

    Declaration

    Swift

    func isoBaudRate10400()
  • Try to Set Baud Rate to 4800

    Declaration

    Swift

    func isoBaudRate4800()
  • Try to Set Baud Rate to 9600

    Declaration

    Swift

    func isoBaudRate9600()
  • Set the ISO Initial Address

    Declaration

    Swift

    func setISOInitAddress(_ address: UInt8)

    Parameters

    address

    0-255

  • Display Keywords

    Declaration

    Swift

    func displayKeywords()
  • Turn Keyword Checking On

    Declaration

    Swift

    func turnKeywordCheckingOn()
  • Turn Keyword Checking Off

    Declaration

    Swift

    func turnKeywordCheckingOff()
  • Perform a Slow Initiation

    Declaration

    Swift

    func performSlowInitiation()
  • Set the Wakeup Interval to Multiple of 4ms

    Declaration

    Swift

    func setWakeupIntervalMultiplerBy20ms(_ multiplier: UInt8)

    Parameters

    multiplier

    0-255

  • Set the Wakeup Message

    Declaration

    Swift

    func setWakeupMessage(_ message: [UInt8])

    Parameters

    message

    Up to 6 0-255

PPs

  • Turn On All Program Parameters

    Declaration

    Swift

    func turnAllPPsProgParametersOn()
  • Turn Off All Program Parameters

    Declaration

    Swift

    func turnAllPPsProgParametersOff()
  • Turn On the Given Program Parameter

    Declaration

    Swift

    func setPPsProgParameterOnFor(_ index: UInt8)

    Parameters

    index

    Parameter index 0-255

  • Turn On the Given Program Parameter

    Declaration

    Swift

    func setPPsProgParameterOffFor(_ index: UInt8)

    Parameters

    index

    Parameter index 0-255

  • Set the Given Program Parameter to the Given Value

    Declaration

    Swift

    func setPPsProgParameterValue(_ value: UInt8, for: UInt8)

    Parameters

    value

    0-255

    for

    Parameter index 0-255

  • Return a PPs Summary

    Declaration

    Swift

    func ppSummary()