I have an Xbee bluetooth module coming tomorrow and am wondering what I need to do to make the M2 emulate an ELM327? Is having M2ret on it enough?
Thanks
Rick
I have an Xbee bluetooth module coming tomorrow and am wondering what I need to do to make the M2 emulate an ELM327? Is having M2ret on it enough?
Thanks
Rick
M2RET has some ELM327 emulation code, but I doubt 400 lines is enough to emulate the complete chip. That is the only ELM327 code for the M2 that I am aware of.
Building on what @adamvoss mentioned, M2RET has some ELM327 emulation code, but only CAN protocol. If you want ISO9141, for example, that will need some more work.
Perhaps @CollinK can chime in here, but I believe the M2RET code currently allows you to communicate with M2 via serial AT commands just like you would a ELM327. You’ll probably need to write some code to interface the ELM emulation code to your Bluetooth module.
What module did you end up using? Many of these modules make it pretty easy to act as a serial connection.
Let us know how this project works out for you! We’d love to see some screenshots or even a short write-up.
I think it would be great to see this split into multiple modules. Something like, splitting the AT command portion out to run on the ESP32, Hologram, what have you. Then M2RET can run independently. Just a thought as I’m also interested in seeing ELM327 over BT.
This is the BT module I got. iduino For Arduino XBee Bluetooth Bee Module B2.0 HC-05/HC-06 Master and Slave Shield
https://www.amazon.com/gp/product/B019GU8JC0/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
…all I’ve done so far is plug it in, but have not even powered it up yet. If it doens’t just work, unless the code is very well documented I’m probably in over my head…in trying to fix the code…so if anyone wants to help please
Yeah, currently it should be possible to lightly edit the M2RET code and get ELM327 emulation to work for the CAN ports. It won’t work for anything else. It works by using the bluetooth module as a wireless serial port. To my knowledge nobody has ever tried it on the M2 yet. It was ported from GVRET which runs on GEVCU, EVTVDue, and CANDue2 boards. There I did test it years ago.
So, YMMV but it should be a decent start. It is in it’s own file so it could be split out to other things like ESP32. In the past people have done just that.
Yea this is one of my ideas to expand upon as well. I want to provide STN support which is actually a superset of the ELM instruction set. Which would allow this to work with many pieces of software but I haven’t dived in too far yet.
As is you should be able to connect to it with some generic ELM based software and communicate with it. The problem you MAY have right now is some of the initialization stuff MIGHT not work out. If you have some ELM based free software you want to try on it let me know and I will see if I can get it running on mine. I have a STN based USB cable I can use for comparison.
Getting it to be STN compatible would let it work with most of the Scantool software that exists as well as all of the ELM stuff.
Rodney
STN would be a nice feature to have.
Since I seem to be having issues getting my test lab I will likely work on this feature. I will also be looking at building a more universal driver in both windows and linux but since I actually have to learn HOW to do that it will be a little while.
My goal will be to get the M2 to work with my Scantool software. Once I have that working I believe it is done.
I need to find some basic software that I can modify to debug with but Scantool’s website has a bunch of older software source to help with that.
In the mean time I will also be tweaking with my lab until I get it to work.
This is great everyone! Thanks for your willingness to work on this @redheadedrod! This will be some very useful code as it opens up compatibility with all sorts of software and phone apps.
If anyone needs any Macchina hardware to work on this project, let us know!
Already emailed you… Since I have been poking around the M2RET software to try and understand it hopefully won’t be much more of a learning curve.
Will still try to tinker with my lab and get it running again. Figure out what I did wrong. Hopefully didn’t break the simulator I have. The ELM emulation stuff shouldn’t be affected since I have diagnostic software I downloaded that is for testing an STN device. We shall see…
Hopefully the BT/WiFi module listed on here earlier will work if not already with the M2. I have one of those modules too… Would be nice to get it working as a standard ODBII dongle for those that want to use it that way.
Rodney