Alfa Romeo Giulia Forum banner
41 - 60 of 120 Posts
Discussion starter · #43 ·
So you don't really need a "real" cable... just a RS-232 male plug with 2 wires and another 2 wires for the 12V to the arduino
You don't even need an DB9 cable for a more "permanent" install. I connected power to barrel connector and did a pigtail to the can connectors (not the DB9) on the arduino shield.
 
I wanted some more granular control over the RDNA modes.....e.g. soft suspension in race mode, traction control on in race mode, traction control off in other modes, etc. I have quite a bit of C experience, but no experience with embedded devices or maker stuff, so did some research and ended up picking up an Arduino and a canbus shield. After some extensive logging, REing canbus traffic, and learning my way around (and fixing) the canbus libraries, I did manage to get the TC/ESC switch done.


Some Q/A:

Q: Is this dyno mode?
A: No. ABS is active, suspension selection still works, etc. It just toggles TC/ESC independently of the (R)DNA mode setting

Q: Does it work?
A: Yes. Did some nice donuts in N mode, and Race mode with TC/ESC enabled is a real blast (in a straight line at least). Will snag some 0-60 times when the weather is more conducive.

Q: Will it work on non-QV?
A: Probably, but I don't have one

Q: Will you release more info on this?
A: Probably not. If any of the tuners are interested and already ship products with canbus interface, hit me up and we can discuss. Ping @Terry@BMS
I swear if you work with @Terry@BMS to get this to implemented in the JB4 on the 2.0, I am buying a JB4 yesterday.
 
I'm going to try this on my 2019, but I will have the SGW and need to do some reading about that aspect. If anyone can point me in the right direction on the SGW (I'm comfortable with the arduino aspects) that would be much appreciated.
 
Discussion starter · #49 ·
I'm going to try this on my 2019, but I will have the SGW and need to do some reading about that aspect. If anyone can point me in the right direction on the SGW (I'm comfortable with the arduino aspects) that would be much appreciated.
This has been confirmed not to work on 2.0 cars. It's probably feasible to do something similar, but I can't say for sure since I have a QV.
 
This has been confirmed not to work on 2.0 cars. It's probably feasible to do something similar, but I can't say for sure since I have a QV.
Agreed. I'm comfortable with the code you wrote (looks reasonable to me) and I've got the arduino experience needed to see if I can make it work. More importantly, I'll have a 2018 Q4 sitting around for a few weeks as a tester while I wait for the lease turn in date....
 
Discussion starter · #52 ·
I'd like to start working on this... Any suggested CAN bus shields? Spark fun?
It's been quite a while since I worked on any of this, but I think I put the hardware I used in the readme in the repo. I will say the hardest part is logging and identifying what messages do what. There are windows and linux tools widely available that work with cantact/canable, so I'd suggest one of those devices for the research/test phase and then arduino when you are ready to create. If you choose to reinvent the wheel by building arduino tools for analyzing traffic, you have to keep in mind that the SD interface is too slow to log everything. So you'll need to set up filters, etc.

There are several publicly available research documents with tips and tricks (and software) for sniffing can buses with cantact/canable.
 
@beaups Going to try my hand at this...

I'm looking at the file Escaped.ino.
There are some functions that are defined but never called.. such as:

void print_can_buf(int id, unsigned char len)
void setup()
void loop()

Where are they called? Is there something like a Main file?
 
Discussion starter · #55 ·
@beaups Going to try my hand at this...

I'm looking at the file Escaped.ino.
There are some functions that are defined but never called.. such as:

void print_can_buf(int id, unsigned char len)
void setup()
void loop()

Where are they called? Is there something like a Main file?
setup() and loop() are an Arduino thing. setup() is called at startup (think main()) and loop is called when setup returns and loops infinitely.

print_can_buf() was just some leftover code I left in the source in case anyone found it useful for logging etc.

I will say that this does not work on 2.0 cars as-is, just an FYI.
 
@beaups Going to try my hand at this...

I'm looking at the file Escaped.ino.
There are some functions that are defined but never called.. such as:

void print_can_buf(int id, unsigned char len)
void setup()
void loop()

Where are they called? Is there something like a Main file?
When you build an .ino in the Arduino IDE, it uses a standard main.cpp which calls the setup() and loop() functions. These are the standard functions for a Arduino program. Setup() is run once at boot and loop() runs from then on.

print_can_buf() would print the can message to the serial console, so it is probably for debugging and was just left in if needed.
 
Discussion starter · #58 ·
Has anyone tried it with the proxy setup for the new rdna knob (which in itself just sends out canbus commands)
Don't think so. But the packet would be quite a bit different than what this code is sending. Should be fairly trivial for someone with the "new" rdna switch to sniff what's being sent from the new switch and emulate that with Arduino. That wasn't what I was after, but I don't see why it couldn't be done.
 
setup() and loop() are an Arduino thing. setup() is called at startup (think main()) and loop is called when setup returns and loops infinitely.

print_can_buf() was just some leftover code I left in the source in case anyone found it useful for logging etc.

I will say that this does not work on 2.0 cars as-is, just an FYI.
Thanks. So, does your code just send the single command for ESC off, or does it send the one to enter the whole race mode?
 
41 - 60 of 120 Posts