-
Notifications
You must be signed in to change notification settings - Fork 471
Unable to get DTC #111
Comments
@nomwerp any insight? |
no not really without diving into it, works for me on Android 5-something... any suggestions welcome |
@mvglasow can you try latest code, please? |
Tried today with 2.0-RC2, still no luck. OS is now Android 5.1.1. |
What's your car protocol? |
Where can I find that out? The car is a 2005 Audi A4 (B7 model). |
Have you tried building the code? |
No, so far I've only used the APKs on F-Droid. |
A question, though: how come live data works while DTC doesn't? I thought the underlying protocol is the same for both – or am I wrong? |
You should try build and install the code. There's protocol nuances for some commands. |
@valens254 anything to add? |
@mvglasow I can't understand, what you get when trying read DTC |
@valens254 just to be sure it's clear, @mvglasow is running an old release of this software. I will try and make a new release, but I suggested him to compile the code. Also @mvglasow, I'm not responsible for F-Droid releases or any other APK releases. |
Yes, the old release can read all except DTC and VIN code, because not all protocols was implemented yet. |
@mvglasow please test https://github.com/pires/android-obd-reader/releases/tag/2.0-RC3 and let us know. I'm closing this for now. |
Same symptoms here, too: I can collect live data but when I try to get DTC, it says "Unable to connect to Bluetooth device". The error message indicates the error happens lower down in the stack – or the app is giving out a misleading error message. As for F-Droid: for most apps they simply build an APK from the repo. Thus, apart from the signature, there is no difference between an F-Droid build, a version I have built myself and (presumably) a release build on github. They may occasionally patch apps to remove advertising or non-free dependencies, but they try to limit this to a few exceptional cases because they lack the resources to do such adaptations. |
@mvglasow did you run the RC3? |
Yes, downloaded from https://github.com/pires/android-obd-reader/releases/download/2.0-RC3/android-obd-reader-debug.apk. The app shows as RC2 in the package manager, but that is presumably due to https://github.com/pires/android-obd-reader/blob/2.0-RC3/src/main/AndroidManifest.xml#L6. |
You are correct. @mvglasow the app crashed? Can you provide logs? |
I have fixed this issue in my version. The issue was that it crashes when there are no errors found. I will see if I can incorporate my fix with this. |
@Pho3niX90 care to develop further your comment? Is it an app thing? Library thing? I can provide a fix as well if I see some logs. |
@pires is an app issue. I will provide a fix in the next 30mins. |
@Pho3niX90 awesome! Thank you. |
Try this: #153 |
@pires OK, will try. Just to clarify: the app does not crash, it simply displays a toast with an error message. |
Same issue with RC4. When I try to read DTC, all I get is a toast saying "unable to connect to Bluetooth device". Logcat is attached. Since at the same time Android was syncing my phone book and dumping all its contents to the log, I've filtered for |
@mvglasow are you able to read any other data? Have you conpletely restrted your phone and then ON 6D40 LY tried reading dtc without clicking on start live data? |
@pires I have a suspicion what it might be: LiveData and DTC define their own methods to connect to the OBD dongle, and implementations differ. Compare ObdGatewayService (live data): ObdGatewayService has a workaround for certain Bluetooth connection issues, which is missing for DTC. Unfortunately my logcat got cut off at the start, so I can't tell for sure if live data relies on the fallback on my phone, but it's probably a good idea to implement the fallback in DTC as well. |
@Pho3niX90 see above – yes, live data works. Didn't try restarting, though. My test cycle was:
Currently my suspicion is that it's a low-level issue and that my phone requires the hack in ObdGatewayService to get anything out of the dongle at all, and DTC won't work because it's lacking the fallback machanism. |
Interesting! |
Try #155, that should work if it is in fact your issue |
I've just built it myself and implemented a fix, which is functionally equivalent to #155. In fact it works now. I'll just clean up the code to make it a bit more modular (duplicate code isn't very nice) and then send you a merge request. |
@mvglasow i'm also in favor if a dedup of code. |
…ires#111) Signed-off-by: mvglasow <michael -at- vonglasow.com>
Just built and tested successfully (live data and DTC work). I've introduced a new class, io.BluetoothManager, to take the new method, because I didn't find any other class that looked appropriate for this. If you have a better idea (you certainly know the code better than I do), feel free to refactor. |
De-duplicate Bluetooth connection code, fixes DTC connection issues (#111)
@mvglasow this was a really nice contribution. Thank you for that. And thank you for debugging this issue until a solution was found. |
i set up F-droid to automatically build from github but that works on the android:versionName On Sunday 20 December 2015 08:52:25 mvglasow wrote: Same symptoms here, too: I can collect live data but when I try to get DTC, it says "Unable to [1] #111 (comment) |
I have recently tried the latest version available on F-Droid. Unlike in the earlier version I tried before, I can now obtain live data on Android 4.4. However, when I try to get DTCs, I still get an error about the adapter not being reachable and am unable to get any information from the dongle. Could this be a leftover from #7? That is, live data addresses the OBD dongle in a way that is compatible with Android 4.2.1+ but DTC still uses the old way?
The text was updated successfully, but these errors were encountered: