Closed autoMD closed 3 years ago
Could you custom time get response ? B/c every OBD2 adapter have time response different
We rate the minimal response time using the following rough scale:
Minimal response time, ms | Rating | Reachable in |
---|---|---|
0...9 | Excellent | OBDLink MX, CanTieCar, some ELM327 USB devices (depends on USB-UART chip) |
10...34 | Good | ELM327 USB and some ELM327 Bluetooth |
35...59 | Average | ELM327 Bluetooth |
60 and higher | Bad | ELM327 WiFi |
Hey @autoMD, I'm no longer working on this library and can't help you with debuging.
The ">" is the expected ending character of a valid request. It indicates that the device is in the idle state, ready to receive the next command.
You can set a custom timeout for your request by passing a OBDConnectionConfiguration to OBDConnection.init
method. The default configuration has a timeout of 1 second.
Ok thanks @Wisors . I will debug and setting it
I see issue in OBDConnection.swift When i connected and send 0100.
self.connection.send(data: "\(String(describing: cmd))\r".data(using: .ascii)!) { data in data.onSuccess { data in print("data:" + data) } }
data return null.
But I print("handleReceived: " + requestResponse) support data of Response
`private func handleReceived(data: Data) {
Log: Transmitting data between host and adapter handleReceived: 0100
Connection ready to send data data:0100 -----> data on Viewcontroller.swift
handleReceived: 41 00 BE 3E B8 11 --------> requestResponse on func handleReceived
handleReceived:
Connection ready to send data data:0100 -----> data on Viewcontroller.swift
handleReceived: 41 00 BE 3E B8 11 --------> requestResponse on func handleReceived
handleReceived: