Git Product home page Git Product logo

obd2connect's People

Contributors

joematt avatar wisors avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

obd2connect's Issues

'data' in Viewcontroller.swift return null, but 'requestResponse' in 'func handleReceived' show data.

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) {

    pthread_rwlock_wrlock(&self.requestLock)
    defer { pthread_rwlock_unlock(&self.requestLock) }
    guard let response = String(bytes: data, encoding: String.Encoding.ascii) else {
        finishTransmission(result: .failure(.responseIsInvaid)); return
    }

    requestResponse = requestResponse + response
    
    print("handleReceived: " + requestResponse)
    if requestResponse.hasSuffix(">") {
        finishTransmission(result: .success(requestResponse))
    }
}`

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:

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:

I think "requestResponse" not asSuffix(">"). Could you fix get response again? I think requestResponse timer low.
I am auto locksmith, do not master for fix.hihi. Please help update.

iOS 9/10 Compatibility

Hey Wisor,

Awesome start on OBD2Connect. Are you able to get this working on iOS9/10 devices? My own OBD project no longer works. Trying your demo project, it request times out as well. It connects fine, but requests time out.

I previous had an iPhone 5 running iOS 8 that had ELM transmissions working properly, but I no longer have said device.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.