I'm attempting to copycat the work of Louis Frigon's Toyota Aux Enabler. I have (with a lot of help on this site) managed to begin capturing and understanding messages on the AVC-LAN bus, but I can't quite send messages. Frigon uses the following line to drive output signal to high:
DDRD |= _BV(PD2) | _BV(PD3);
I have more or less no idea what this means. He then 'releases the output' with the following:
DDRD &= ~( _BV(PD2) | _BV(PD3) );
If I copy these lines verbatim I don't get the same results. If I set the output high and then read the bus, I don't even see the signal I'm putting out. I wonder if this is related to the differences between his Atmega8 and my Arduino Nano?
I can't paste my or Frigon's work here due to character count limitations, so here is his github for the project: https://github.com/halleysfifthinc/Toyota-AVC-LAN
The most important files to my question are BigSchematic.jpg and AVCLanDriver.c.
Here is a dump of my current code: https://pastebin.com/NG9U5FuL
Here is my schematic: https://imgur.com/a/HBkK7