-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth Connector #3
Comments
This is great! I still haven't developed all the other tooling enough to use on my raspberry pi yet, but was going to need bluetooth once I'm happy with the CLI and parser. I'm hoping to push a decent size update for obd-parser and obd-parser-cli soon. When I do I will add a link to your module and probably end up using it 😄 |
You are very welcome! I'm also using it for a Pi project. Great work, good to hear that you will update it! |
@dominicrico nice, let me know if you will blog it somewhere! I pushed a new release last night for the CLI and parser. Both now v0.3.0. The "monitor" ( |
Awesome! |
@dominicrico yeah if you use the new CLI it definitely works. CLI now uses [email protected] so if you use 0.3.0 it should be good 👍 Tested last night on a drive and collected ~10 mins of data 🚗
This example above uses usb serial cable, but if you make a PR to the CLI we can add bluetooth support using your module too. |
Also, just saw this repo in your GitHub and this commit dominicrico/node-obd@606e6e9 This library works as vanilla javascript so you should not need to do this. Let me know if the library is not working as vanillajs since it should be just fine.
Then in a file such as app.js you can copy what's done in |
Yes, you are totally right. I had an issue with my electron app and an angular module loading the obd-parser so I tried it with my plain js variant. Now I change the way of requiring the module and it now works like expected! |
@evanshortiss sometimes my command queue is getting longer and longer. Do you know why? |
@dominicrico before running the program can you do the following in the terminal:
or in Windows I think it is:
Alternatively, add the following at the start of your node.js program BEFORE you do
Either of these will enable log output, then you can share those logs here and I can take a look 👍 |
Shure will do it later when I'm in my car ;) |
@dominicrico so I think I've found this same problem! Here's how I created it:
Even if I try using my Macbook USB to OBD I get the same issue. To fix it I must turn off the car, then turn it on again, then try with my Macbook and it works! My guess is that maybe the Pi is drawing to much power, since if I power the Pi via USB using my Macbook it works! The problem seems to be completely related to using the 12V outlet in my car with the Pi 😢 I'm testing using a MK6 (2012) VW, what about you? |
@evanshortiss I'm using my Macbook connecting to the OBD via my Bluetooth connector. For me, it starts working again after reloading my Electron application. I haven't tested it with a Pi in my car. Have you tested it with two pollers at the same time? My car is a VW T5 (2004)
From now on the queue is getting longer and longer and no more data will be received. |
Yep! Like so (^ this uses the CLI, but I can try do it manually too) I'm surprised by the log line When I run I get:
Note that my output has "writing message 010D1" with the "1" on the end and yours seems to be missing it. Also I don't recognise this log
Ultimately, the main reason for this is that it seems like your car OBD system returned "010D\r" for a query. The parser expects format "410DXX\r>". The "41" tells us this is a response to a query and "0D" tells us what PID it is. The "XX" is the value. The ">" tells us the system has finished the query and is ready for more. In your logs things are locked because a complete response never came back (one with a ">"). I don't know why this might, be, it could be the car, bluetooth, or maybe a file you've modified? Can you make sure the "1" is being appended also, so 010D should become 010D1 see here . Could you provide all logs from the time the program started? And we might see if |
The poller works like expected for about 40 to 50 messages. Then things starting to get messed up... I also noticed a similar behaviour in a Bluetooth Handsfree (HFP) module I'm currently writing for my Pi project. Maybe it could have something to do with the bluetooth connection and the missing bluetooth hci socket support for Mac OS.... The OBD Bluetooth log is something I wrote in my bluetooth connector. It's the same like in your serial connector. |
I've no idea @dominicrico, but I ordered a Bluetooth connector while travelling this week. I will test and see if I get the same issue with Bluetooth sometime this week or next week. |
@evanshortiss any update on this? |
@evanshortiss with the raspberry pi and a bluetooth connection to the OBD device it works without any issues. It must be an Apple thing... |
@dominicrico hey, that's interesting. So the Apple driver or system at some level just chokes? I just recently got a bluetooth adapter, but it did not appear when plugged in my vehicle and I scanned for a device. I'm not sure if the bluetooth device is broken or my car is not delivering enough power to it - I'll need to try again or get another adapter! |
@evanshortiss yes, thats very interesting. But I was not able to figure it out... Some OBDII adapters do not work with some cars. Had the same issue and had to buy another one. |
Hmm, when I get a new bluetooth adapter I'll try again and see but I've been busy with work and travel so there's big gaps in when I can do it 😢 Yeah! It's a PITA really, but seems vendors have some specific codes/specs and not all codes are implemented by vendors. For example, my VW for instance does not support the |
Hey,
great work with the OBD parser!
I have written a bluetooth connector for your module.
https://github.com/dominicrico/obd-parser-bluetooth-connection
Cheers!
The text was updated successfully, but these errors were encountered: