wisors / obd2connect Goto Github PK
View Code? Open in Web Editor NEWThis is a simple implementation of a socket connection to OBD2 adapter.
License: MIT License
This is a simple implementation of a socket connection to OBD2 adapter.
License: MIT License
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.