示例#1
0
        private void DumpRB8Eeprom(KW2000Dialog kwp2000, uint address, uint length)
        {
            if (_controllerAddress != (int)ControllerAddress.Cluster)
            {
                Logger.WriteLine("Only supported for cluster (address 17)");
                return;
            }

            var dumpFileName = _filename ?? $"RB8_${address:X6}_eeprom.bin";

            kwp2000.SecurityAccess(0xFB);
            kwp2000.DumpEeprom(address, length, dumpFileName);
        }
示例#2
0
        private KW2000Dialog Kwp2000Wakeup(bool evenParityWakeup = false)
        {
            Logger.WriteLine("Sending wakeup message");

            var kwpVersion = _kwpCommon.WakeUp((byte)_controllerAddress, evenParityWakeup);

            if (kwpVersion == 1281)
            {
                throw new InvalidOperationException("Expected KWP2000 protocol.");
            }

            var kwp2000 = new KW2000Dialog(_kwpCommon, (byte)_controllerAddress);

            return(kwp2000);
        }