Comments (6)
Let me show you an example, here's communication over protocol 7:
I ask for 03
and get the following rawResponse
:
(lldb) po self.rawResponse
<__NSArrayM 0x28150cbd0>(
18DAF110100A430401100148,
18DAF1102101700210000000
)
Stripping the ECU IDs and reassembling the fragments gives me the following cookedResponse
:
(lldb) po self.cookedResponse
{
10 = (
4,
1,
16,
1,
72,
1,
112,
2,
16,
0,
0,
0
);
}
We are seeing ECU #10 responding with 12 bytes. To my knowledge, every DTC is encoded as 2 bytes and the first byte of the whole response to 03
and 07
is the actual number of encountered DTCs, i.e. in this example we are seeing 4 DTCs where as the actual values are P0110, P0148, P0170, and P0210.
If you think this is wrong, could you show me example data from your car?
from ltsupportautomotive.
Hello @mickeyl , I am getting "P2800" from this Library, but other apps or wired scanner reads "P1628".
Please suggest or If I'll change the index to 0 will fix it as above mentioned by @JRJian
In NSRange codeRange = NSMakeRange(1, bytes.count-1);
NSArray<NSNumber*>* codeBytes = [bytes subarrayWithRange:codeRange];
screen shot of wired scanner.( what is mod $12 i don't familiar with)
from ltsupportautomotive.
NSRange codeRange = NSMakeRange(1, bytes.count-1);
NSArray<NSNumber*>* codeBytes = [bytes subarrayWithRange:codeRange];
@JRJian @thdankert @mickeyl , is this code correct or have to change the RangeIndex to 0?
Please Help. (Not getting ABS fault codes specifically "U0102" )
from ltsupportautomotive.
Thanks for opening this issue, I think you are up to something. My implementation of the DTC parsing code is based on SAE J1979_201408, which is the reference, but I may have mixed up some of the tables depicted in there (granted, it's quite a confusing spec in some places). I have developed the DTC-implementation against an OBD2 Simulator (since I do not possess so many cars with actual failures), it might be possible that this Simulator has a broken implementation of the DTC answer. I will double check with the spec later this week and report ASAP.
from ltsupportautomotive.
I may have spoken too soon. Upon my inquiry, the simulator developer just got back to me and claims that for all CAN-protocols, the answer to 03
has to report the number of DTCs before the actual codes. For all other protocols, this number will be omitted.
Can anyone confirm or deny that?
from ltsupportautomotive.
See also the accepted answer to https://mechanics.stackexchange.com/questions/51226/obd2-mode-3-wrong-response – I trust these folks, as they have a lot of experience in seeing "real world" values.
from ltsupportautomotive.
Related Issues (20)
- Doubt about how to implement new CAN Codes HOT 1
- Reading DTCs HOT 2
- Not able to read all DTC if vehicle having multiple ECU HOT 1
- Swift support for LTSupportAutomotive 1.1 HOT 3
- Connection Issue HOT 1
- UDS Support (cancelled) HOT 4
- Transmitting DTCs using Swift HOT 1
- Is it possible to get PID commands return data faster? HOT 15
- Adapter State Initializing HOT 1
- LELink Bluetooth Low Energy - stuck on "OBD2AdapterStateInitializing" state HOT 4
- Crash when adapter state changed HOT 2
- After Disconnect it didnt connect stuck on "Initializing" state.
- How to set IP address to connect OBD ELM327 through Wifi? HOT 2
- Any ideas about simulating DTC functions?
- got "Invalid or short line '83' found"?
- How can I get Trouble Code and Pending Code like android in iOS Swift ?
- Documentation refers to Swift-UDS which cannot be found on GitHub HOT 1
- Bug in LTOBD2ProtocolISO15765_4 HOT 1
- Crash on XCode 14.3, init is unavailable!
- How to read odometer from OBD2? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ltsupportautomotive.