[Ovmsdev] Activating a sleeping Gen 1 Leaf
Tom Parker
tom at carrott.org
Mon Mar 21 18:01:41 HKT 2016
On 03/16/2016 08:46 AM, Collin Kidder wrote:
> The proper message is 0x68C. Here is a capture of the car sitting
> idle, then getting a climate control request over carwings. Then, the
> carwings system wakes up the car and begins heating. Timestamp is in
> microseconds. So, there is only a 50ms gap from the time the wakeup
> message is sent to the time that other devices begin blasting a ton of
> messages onto the bus. Before the wake up message there are no
> messages on the bus at all. It's dead quiet.
Your TCU is sending the CC On frame every 100ms for about 2 seconds. I'm
only sending it once, which was enough for my car.
I added sending the 0x68c frame 50ms before the CC On command. If you do
git remote add carrott.org
https://carrott.org/git/Open-Vehicle-Monitoring-System.git
git fetch carrott.org
git checkout carrott.org/nissan-leaf-climate-control
and you should have my code. Otherwise a hex file is at
https://carrott.org/OVMS.X.production.hex
Could someone try it with a Gen 2 Leaf and see if remote climate control
works? I'm abusing the homelink command (number 24) which I send with
the perl client in Open-Vehicle-Monitoring-System/client :
./cmd.pl 24
It won't do anything if the car is already turned on. To turn off the
climate control, turn the car on, or send command 6
./cmd.pl 6
> www.savvycan.com/leaf-cc-remotely.zip
>
> The URL also answers the question of what am I using for capture
> analysis. I wrote my own program in QT for that purpose.
Savvy CAN looks quite interesting for reverse engineering CAN bus
messages. In the past I've used cansniffer from the SocketCAN suite, but
your tool looks much more comprehensive.
Have you seen Wireshark? I've written a partial dissector for the Gen 1
Leaf messages at
https://carrott.org/git/leaf-can-dissector.git/blob/HEAD:/leaf.lua which
makes looking at what is happening on the bus quite nice after someone
has done the reverse engineering and written the dissector.
In the same repo is csv-pcap-converter.py which is a primitive converter
from your csv format to pcap format, so you can load some data into
Wireshark. It reads stdin and writes stdout.
Interestingly there is a disagreement between tcpdump and wireshark's
first layer CAN dissector about whether the can id should be big endian
or little endian. I wrote pcap-canid-endian-swap.py to swap the byte order.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the OvmsDev
mailing list