have you already compared the value of U_DC_CHGNG_IN at 3B4h 56/8 with an actual voltage at the charge port?Jack Bauer wrote: ↑Sun Jun 06, 2021 8:22 am Using the 2017+ LIM...well it says 2017-12-01. Voltage board I'm not sure what car it came from.
BMW i3 CCS/charge port controller
- muehlpower
- Posts: 635
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 12 times
- Been thanked: 116 times
Re: BMW i3 CCS/charge port controller
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
I did a bench test up to about 60v using a psu and it tracked within a volt if I remember. Random thought but I wonder does the LIM need the message counters in 0x112 and others? not the crc but just the counter.
I'm going to need a hacksaw
- muehlpower
- Posts: 635
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 12 times
- Been thanked: 116 times
Re: BMW i3 CCS/charge port controller
you sending a lot of active signals, if you do that, maybe the LIM waits for signals from this units. Only * are found in the logs
0x51A *
0x540 *
0x512 *
0x55E
0x560 *
0x509
0x51D
0x510 *
0x51A *
0x540 *
0x512 *
0x55E
0x560 *
0x509
0x51D
0x510 *
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
Thanks will try. So latest update : reviewing the ccs logs showed that during precharge the max v limit in 0x2f1 drops from 400.2v to 360v which just happened to be the value from the bms in 0x112 at that time. So I modded the code to transmitt batter pack voltage in 0x21f during precharge phase and bingo! ccs unit now puts correct voltage out and measured voltage at the contactors is only a few volts different from that reported by the charger. Still drops out as soon as attempt to close contactors. Also still unable to make either lim do a weld test which leads me to think there is some weird problem with the contactors. I'll do another can log at a ionity station later today. Its almost as if the LIM is perfectly happy right up to when we ask it to do anything with the contactors then it throws a fit.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
Just added some logs from a UK 2013 i3 AC only REX model. Lock and unlock cycle and ac charging.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
Excellent video on logging from the i3 :
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
Uploaded latest ionity fail log. Its the same story. As soon as we go for dc contactors on it terminates the session.
I'm going to need a hacksaw
- muehlpower
- Posts: 635
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 12 times
- Been thanked: 116 times
Re: BMW i3 CCS/charge port controller
i made a little video of the weldtest. At the top left is the battery voltage, at the top right is the voltage of the main contactors (measured by the ISA shunt). somewhere in the middle "DC Spannung am Stecker" is the voltage at the port (measured with my board). The last line shows the status of the DC contactors. The second from the right is nomaly OK. If I give a voltage on the port, it changes to unexpected DC on the port, after removing the voltage on the port it reports both contactors weldet. Now my code starts the diagnosis and the error is cleard.
on my testbuild the lower 3 LED are the RGB controled by te LIM (doesn't have a blue one), The upper two LEDs show the state of the DC contactors, simulatet by litle relais and 16 Ohm resistors.
on my testbuild the lower 3 LED are the RGB controled by te LIM (doesn't have a blue one), The upper two LEDs show the state of the DC contactors, simulatet by litle relais and 16 Ohm resistors.
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
Perfect thanks. I need to get this working.
I'm going to need a hacksaw
- CCSknowitall
- Posts: 105
- Joined: Fri Jun 04, 2021 1:47 pm
- Has thanked: 1 time
- Been thanked: 28 times
Re: BMW i3 CCS/charge port controller
Ok, so you are likely getting to the first CurrentDemandRequest. Here’s the things the LIM is likely to need in order to keep going: EV ready flag (may be built into the LIM), SOC, target current, maximum voltage limit (usually a few volts above 100% SOC), maximum current limit (sounds like this is built in to the LIM?), maximum power limit, and target voltage.
There is one message between precharge and current demand request called power delivery request. It’s sent by the EV, with a confirmation message sent shortly after by the station at which the contactors close. I think that is handled internally by the LIM when you command the contactors closed but do look closely at the logs around the closing time to see if there’s anything briefly changing state during this time that would hint that you have to do something special here.
But I think you may be missing a value or sending an incorrect value that the LIM only checks when in the current loop. Hopefully that list above can help. I wish that home plug green phy tools weren’t so eye watering expensive, I could help even more if I could see that side.
There is one message between precharge and current demand request called power delivery request. It’s sent by the EV, with a confirmation message sent shortly after by the station at which the contactors close. I think that is handled internally by the LIM when you command the contactors closed but do look closely at the logs around the closing time to see if there’s anything briefly changing state during this time that would hint that you have to do something special here.
But I think you may be missing a value or sending an incorrect value that the LIM only checks when in the current loop. Hopefully that list above can help. I wish that home plug green phy tools weren’t so eye watering expensive, I could help even more if I could see that side.
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
Much appreciate the support. The fact I can't get either LIM to do a weld test as per muehlpower's video tells me I'm missing something from my setup and that something is stopping charge contactor closure as well as the weld test.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
More experiments. Neither of my LIMs will do the weld test. But both report test passed. If I disconnect the contactors they report test passed. So off I went back to my ccs station with the contactors disconnected. Guess what? Fails in the exact same way. I can sit there in precharge until the station times out but the second I want contactors its night night. Almost as if the LIM can't see the contactors isn't it?
Now if you were a paranoid oem and worried about someone swapping a lim to repair an accident damaged car would you do something like disable the dc contactors if say the lim sees a different vin or no vin?
The last 7 digits of the vin are transmitted in 0x380. Good news is I have the Vin for the 2017 LIM. Hey that rymes. Do you have a vin for your lim? Let's see what happens. Probably another blind alley but it feeds my paranoia so that's never a bad thing.
Now if you were a paranoid oem and worried about someone swapping a lim to repair an accident damaged car would you do something like disable the dc contactors if say the lim sees a different vin or no vin?
The last 7 digits of the vin are transmitted in 0x380. Good news is I have the Vin for the 2017 LIM. Hey that rymes. Do you have a vin for your lim? Let's see what happens. Probably another blind alley but it feeds my paranoia so that's never a bad thing.
I'm going to need a hacksaw
- muehlpower
- Posts: 635
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 12 times
- Been thanked: 116 times
Re: BMW i3 CCS/charge port controller
do you have a new CAN log of your attempts? In your old log the signal for the plug lock is invalid! 3B4h 26/2 should be 1 not 3!
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
Here is the code I'm using for trying the weld test on the bench :
Code: Select all
/*
BMW i3 LIM Controller Software. Alpha version.
Version 2 with extra commands to the LIM
0x3E9 is the most important message to send to the LIM!
Copyright 2021
Damien Maguire
First attempt at DC!
//////////////////////////////////////////////////////////////
Signal that seem to be required for AC :
0x112 - BMS
0x12f - Wake up KL15/KL30
0x2FC
0x3E9 - LIM command
0x431 - possible battery status message?
0x560
//////////////////////////////////////////////////////////////
Signal that seem to be required for DC CCS :
0x3c
0x112 - BMS-this will need to reflect hv batt volts and amps
0x12f - Wake up KL15/KL30
0x2A0
0x2F1 - Lim command used only for DC.contains charge voltage limit and countdown timer to the desired SOC%
0x2FA - Lim command used only for DC.Seems to seed a state request to the FC. 0-9. also a countdown to departure timer.
Startup seq = 0 - 1 - 9(send chg pwr in 0x3e9 amd readiness=1) -2 -3 (send fc current command in 0x3e9).
0x2FC - central locking
0x328 - DLC6 seems to be 1 sec interval and counting up every interval. Time of day / date? Used by LIM for charge time perhaps?
0x330
0x397
0x3A0
0x3E8
0x3E9 - LIM command.The big guy.
0x3F9
0x431 - possible battery status message?
0x432 - another voltage and possible SOC in this msg.
0x510
0x512
0x51A
0x540
0x560
/////////////////////////////////////////////////////////////
*/
#include <Metro.h>
#include <due_can.h>
#include <due_wire.h>
#include <DueTimer.h>
#include <Wire_EEPROM.h>
#define SerialDEBUG SerialUSB
template<class T> inline Print &operator <<(Print &obj, T arg) { obj.print(arg); return obj; } //Allow streaming
#define OUT1 48
#define OUT2 49
#define IN1 6
#define IN2 7
#define led 13
Metro timer_diag = Metro(1100);
Metro timer_Frames600 = Metro(600);
Metro timer_Frames200 = Metro(200);
Metro timer_Frames10 = Metro(10);
Metro timer_Frames100 = Metro(100);
bool CHGState=false;
bool CHGreq=false;
bool PP=false;
bool Auto=false;
bool flap_lock=false;
bool weld_test=false;
bool ign_on=false;
byte ACcur=0;
byte CABlim=0;
byte Pilot=0;
uint16_t Batt_Wh=21000; //battery energy capacity in watt hours. Values taken from 2014 and 2015 i3. Really need a 94ah or 120ah to verify ...
uint16_t CHG_Pwr=0; //calculated charge power. 12 bit value scale x25. Values based on 50kw DC fc and 1kw and 3kw ac logs. From bms???
int16_t FC_Cur=0; //10 bit signed int with the ccs dc current command.scale of 1.
byte EOC_Time=0x00; //end of charge time in minutes.
byte CHG_Status=0; //observed values 0 when not charging , 1 and transition to 2 when commanded to charge. only 4 bits used.
//seems to control led colour.
byte CHG_Req=0; //observed values 0 when not charging , 1 when requested to charge. only 1 bit used in logs so far.
byte CHG_Ready=0; //indicator to the LIM that we are ready to charge. observed values 0 when not charging , 1 when commanded to charge. only 2 bits used.
byte CONT_Ctrl=0; //4 bits with DC ccs contactor command.
CAN_FRAME outFrame; //A structured variable according to due_can library for transmitting CAN data.
CAN_FRAME inFrame; //structure to keep inbound inFrames
#define Status_NotRdy 0x0 //no led
#define Status_Rdy 0x2 //pulsing blue led when on charge. 0x2. 0x1 = 1 red flash then off
#define Req_Charge 0x1
#define Req_EndCharge 0x0
#define Chg_Rdy 0x1
#define Chg_NotRdy 0x0
void setup()
{
Can0.begin(CAN_BPS_500K); // LIM CAN
Can1.begin(CAN_BPS_500K); // External CAN
Can0.watchFor();
Can1.watchFor();
Serial.begin(115200); //Initialize our USB port which will always be redefined as SerialUSB to use the Native USB port tied directly to the SAM3X processor.
Serial2.begin(19200); //setup serial 2 for wifi access
pinMode(OUT1,OUTPUT);
pinMode(OUT2,OUTPUT);
pinMode(led,OUTPUT);
pinMode(IN1,INPUT);
pinMode(IN2,INPUT);
}
void loop()
{
checkCAN();
if(timer_diag.check())
{
handle_Wifi();
}
if(timer_Frames600.check())
{
Msgs600ms();
}
if(timer_Frames10.check())
{
Msgs10ms();
}
if(timer_Frames100.check())
{
Msgs100ms();
}
if(timer_Frames200.check())
{
Msgs200ms();
checkforinput();
}
}
void Msgs10ms() //10ms messages here
{
outFrame.id = 0x112; //BMS message required by LIM
outFrame.length = 8;
outFrame.extended = 0;
outFrame.rtr=1;
outFrame.data.bytes[0]=0xf9; //Battery current LSB. Scale 0.1 offset 819.2. 16 bit unsigned int
outFrame.data.bytes[1]=0x1f; //Battery current MSB. Scale 0.1 offset 819.2. 16 bit unsigned int
outFrame.data.bytes[2]=0x8b; //Battery voltage LSB. Scale 0.1. 16 bit unsigned int.
outFrame.data.bytes[3]=0x0e; //Battery voltage MSB. Scale 0.1. 16 bit unsigned int.
outFrame.data.bytes[4]=0xa6; //Battery SOC LSB. 12 bit unsigned int. Scale 0.1. 0-100%
outFrame.data.bytes[5]=0x71; //Battery SOC MSB. 12 bit unsigned int. Scale 0.1. 0-100%
outFrame.data.bytes[6]=0x65; //Low nibble battery status. Seem to need to be 0x5.
outFrame.data.bytes[7]=0x5d; //zwischenkreis. Battery voltage. Scale 4. 8 bit unsigned int.
Can0.sendFrame(outFrame);
}
void Msgs100ms() //100ms messages here
{
outFrame.id = 0x12f; //Wake up message.
outFrame.length = 8;
outFrame.extended = 0;
outFrame.rtr=1;
outFrame.data.bytes[0]=0xf5;
outFrame.data.bytes[1]=0x28;
if(ign_on) outFrame.data.bytes[2]=0x8a;//8a=ign on,88=ign off radio on, 86=no ign.
if(!ign_on) outFrame.data.bytes[2]=0x88;//8a=ign on,88=ign off radio on, 86=no ign.
outFrame.data.bytes[3]=0x1d;
outFrame.data.bytes[4]=0xf1;
outFrame.data.bytes[5]=0x35;
outFrame.data.bytes[6]=0x30;
outFrame.data.bytes[7]=0x80;
Can0.sendFrame(outFrame);
outFrame.id = 0x2fc; //central locking status message.
outFrame.length = 7;
outFrame.extended = 0;
outFrame.rtr=1;
if(flap_lock) outFrame.data.bytes[0]=0x82; //f0=lock,f1=unlock
if(!flap_lock) outFrame.data.bytes[0]=0x81; //f0=lock,f1=unlock
outFrame.data.bytes[1]=0x00;
outFrame.data.bytes[2]=0x04;
outFrame.data.bytes[3]=0xff;
outFrame.data.bytes[4]=0xff;
outFrame.data.bytes[5]=0xff;
outFrame.data.bytes[6]=0xff;
Can0.sendFrame(outFrame);
outFrame.id = 0x2f1; //Lim command 2. Used in DC mode
outFrame.length = 8;
outFrame.extended = 0;
outFrame.rtr=1;
outFrame.data.bytes[0]=0xA2; //Charge voltage limit LSB. 14 bit signed int.scale 0.1 0xfa2=4002*.1=400.2Volts
outFrame.data.bytes[1]=0x0f; //Charge voltage limit MSB. 14 bit signed int.scale 0.1
outFrame.data.bytes[2]=0x00; //Fast charge current limit. Not used in logs from 2014-15 vehicle so far. 8 bit unsigned int. scale 1.so max 254amps in theory...
outFrame.data.bytes[3]=0x18; //time remaining in seconds to hit soc target from byte 7 in AC mode. LSB. 16 bit unsigned int. scale 10.
outFrame.data.bytes[4]=0x1B; //time remaining in seconds to hit soc target from byte 7 in AC mode. MSB. 16 bit unsigned int. scale 10.
outFrame.data.bytes[5]=0xFB; //time remaining in seconds to hit soc target from byte 7 in ccs mode. LSB. 16 bit unsigned int. scale 10.
outFrame.data.bytes[6]=0x06; //time remaining in seconds to hit soc target from byte 7 in ccs mode. MSB. 16 bit unsigned int. scale 10.
outFrame.data.bytes[7]=0xA0; //Fast charge SOC target. 8 bit unsigned int. scale 0.5. 0xA0=160*0.5=80%
Can0.sendFrame(outFrame);
outFrame.id = 0x2fa; //Lim command 3. Used in DC mode
outFrame.length = 8;
outFrame.extended = 0;
outFrame.rtr=1;
outFrame.data.bytes[0]=0x84; //Time to go in minutes LSB. 16 bit unsigned int. scale 1. May be used for the ccs station display of charge remaining time...
outFrame.data.bytes[1]=0x04; //Time to go in minutes MSB. 16 bit unsigned int. scale 1. May be used for the ccs station display of charge remaining time...
outFrame.data.bytes[2]=0x00; //upper nibble seems to be a mode command to the ccs station. 0 when off, 9 when in constant current phase of cycle.
//more investigation needed here...
//Lower nibble seems to be intended for two end charge commands each of 2 bits.
outFrame.data.bytes[3]=0xff;
outFrame.data.bytes[4]=0xff;
outFrame.data.bytes[5]=0xff;
outFrame.data.bytes[6]=0xff;
outFrame.data.bytes[7]=0xff;
Can0.sendFrame(outFrame);
}
void Msgs200ms() ////200ms messages here
{
outFrame.id = 0x3E9; //Main LIM control message
outFrame.length = 8;
outFrame.extended = 0;
outFrame.rtr=1;
outFrame.data.bytes[0]=lowByte(Batt_Wh);
outFrame.data.bytes[1]=highByte(Batt_Wh);
outFrame.data.bytes[2]=((CHG_Status<<4)|(CHG_Req)); //charge status in bits 4-7.goes to 1 then 2.8 secs later to 2. Plug locking???. Charge request in lower nibble. 1 when charging. 0 when not charging.
outFrame.data.bytes[3]=((lowByte(CHG_Pwr)<<4)|CHG_Ready); //charge readiness in bits 0 and 1. 1 = ready to charge.upper nibble is LSB of charge power.
outFrame.data.bytes[4]=lowByte(CHG_Pwr)>>4; //MSB of charge power.in this case 0x28 = 40x25 = 1000W. Probably net DC power into the Batt.
outFrame.data.bytes[5]=0x00; //LSB of the DC ccs current command
outFrame.data.bytes[6]=0x00; //bits 0 and 1 MSB of the DC ccs current command.Upper nibble is DC ccs contactor control. Observed in DC fc logs only.
//transitions from 0 to 2 and start of charge but 2 to 1 to 0 at end. Status and Ready operate the same as in AC logs.
outFrame.data.bytes[7]=EOC_Time;// end of charge timer.
Can0.sendFrame(outFrame);
outFrame.id = 0x431; //LIM needs to see this but doesnt control anything...
outFrame.length = 8;
outFrame.extended = 0;
outFrame.rtr=1;
outFrame.data.bytes[0]=0xca;
outFrame.data.bytes[1]=0xff;
outFrame.data.bytes[2]=0x0b;
outFrame.data.bytes[3]=0x02;
outFrame.data.bytes[4]=0x69;
outFrame.data.bytes[5]=0x26;
outFrame.data.bytes[6]=0xf3;
outFrame.data.bytes[7]=0x4b;
Can0.sendFrame(outFrame);
digitalWrite(led,!digitalRead(led));//blink led every time we fire this interrrupt.
}
void Msgs600ms() //600ms messages here
{
outFrame.id = 0x560; //Network managment msg perhaps ...
outFrame.length = 8;
outFrame.extended = 0;
outFrame.rtr=1;
outFrame.data.bytes[0]=0x00;
outFrame.data.bytes[1]=0x00;
outFrame.data.bytes[2]=0x00;
outFrame.data.bytes[3]=0x00;
outFrame.data.bytes[4]=0xfe;
outFrame.data.bytes[5]=0x00;
outFrame.data.bytes[6]=0x00;
outFrame.data.bytes[7]=0x60;
Can0.sendFrame(outFrame);
}
void checkCAN()
{
if(Can0.available())
{
Can0.read(inFrame);
if(inFrame.id == 0x3B4)
{
ACcur = inFrame.data.bytes[0];
CABlim = inFrame.data.bytes[1];
PP = (inFrame.data.bytes[2]&0x1);
Pilot = (inFrame.data.bytes[4]&0xF);
}
}
}
void handle_Wifi(){
if((Auto)&&(PP)) CHGreq=true;
if(CHGreq)
{
EOC_Time=0xFE;
CHG_Status=Status_Rdy;
CHG_Req=Req_Charge;
CHG_Ready=Chg_Rdy;
CHG_Pwr=0x2c;//just a holding value of 1kw for now.
}
if(!CHGreq)
{
EOC_Time=0x00;
CHG_Status=Status_NotRdy;
CHG_Req=Req_EndCharge;
CHG_Ready=Chg_NotRdy;
CHG_Pwr=0x00;
}
outFrame.id = 0x3e8; //diag msg.
outFrame.length = 2;
outFrame.extended = 0;
outFrame.rtr=1;
if(weld_test) outFrame.data.bytes[0]=0xf2; //f1=no obd reset, f9=obd reset
if(!weld_test) outFrame.data.bytes[0]=0xf0; //f1=no obd reset, f9=obd reset
outFrame.data.bytes[1]=0xff;
Can0.sendFrame(outFrame);
outFrame.id = 0x1fa;
outFrame.length = 8;
outFrame.extended = 0;
outFrame.rtr=1;
outFrame.data.bytes[0]=0x45;
outFrame.data.bytes[1]=0x65;
outFrame.data.bytes[2]=0x45;
outFrame.data.bytes[3]=0xf0;
outFrame.data.bytes[4]=0x46;
outFrame.data.bytes[5]=0x44;
outFrame.data.bytes[6]=0x45;
outFrame.data.bytes[7]=0x46;
Can0.sendFrame(outFrame);
/*
*
* Routine to send data to wifi on serial 2
The information will be provided over serial to the esp8266 at 19200 baud 8n1 in the form :
vxxx,ixxx,pxxx,mxxxx,nxxxx,oxxx,rxxx,qxxx* where :
v=pack voltage (0-700Volts)
i=current (0-1000Amps)
p=power (0-300kw)
m=half pack voltage (0-500volts)
n=Amp Hours (0-300Ah)
o=KiloWatt Hours (0-150kWh)
r=HV Box Temp (0-100C)
q=third pack Volts (0-500Volts)
*=end of string
xxx=three digit integer for each parameter eg p100 = 100kw.
updates will be every 1000ms approx.
v100,i200,p35,m3000,n4000,o20,r100,q50*
*/
Serial2.print("v100,i200,p35,m3000,n4000,o20,r30,q50*"); //test string
//digitalWrite(13,!digitalRead(13));//blink led every time we fire this interrrupt.
SerialDEBUG.println("//////////////////EVBMW LIM CONTROLLER V1//////////////////////////////////////////////////////////");
SerialDEBUG.print("Pilot Current=");
SerialDEBUG.print(ACcur);
SerialDEBUG.println("Amps");
SerialDEBUG.print("Cable Limit=");
SerialDEBUG.print(CABlim);
SerialDEBUG.println("Amps");
if(PP) SerialDEBUG.println("Plug Inserted");
if(!PP) SerialDEBUG.println("Unplugged");
SerialDEBUG.print("CP Status=");
if(Pilot==0x8) SerialDEBUG.println("None");
if(Pilot==0x9) SerialDEBUG.println("STD AC");
if(Pilot==0xA) SerialDEBUG.println("AC Charging");
if(Pilot==0xC) SerialDEBUG.println("5% DC");
if(Pilot==0xD) SerialDEBUG.println("CCS Comms");
if(Auto) SerialDEBUG.println("Auto Chg Active");
if(!Auto) SerialDEBUG.println("Auto Chg Deactivated");
SerialDEBUG.println("Commands : 'c' engage charge. 'd' disengage charge. 'a' toggle auto charge. 'f' toggle flap lock, 'e' weld tst. 'i' toggle ign");
SerialDEBUG.println("//////////////////////////////////////////////////////////////////////////////////////////");
}
void checkforinput(){
//Checks for keyboard input from Native port
if (SerialDEBUG.available())
{
int inByte = SerialDEBUG.read();
switch (inByte)
{
case 'c':
CHGreq=true;
break;
case 'd':
CHGreq=false;
Auto=false;
break;
case 'a':
Auto=!Auto;
break;
case 'f':
flap_lock=!flap_lock;
break;
case 'e':
weld_test=!weld_test;
break;
case 'i':
ign_on=!ign_on;
break;
}
}
}
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
New log from today's failed attempt in the car on a ionity station :
https://github.com/damienmaguire/BMW-i3 ... _fail2.csv
https://github.com/damienmaguire/BMW-i3 ... _fail2.csv
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
First test on the 2014 LIM on the bench:
No VIN : AC works as expected.
Wrong VIN : Nothing works. No leds. nothing.
No VIN : AC works as expected.
Wrong VIN : Nothing works. No leds. nothing.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
Re: BMW i3 CCS/charge port controller
Another day another lack of contactor. Correct vin seems to make no difference to operation. Still no weld test , still no closure on ccs. The struggle continues ...
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3564
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 1 time
- Been thanked: 93 times
- Contact:
-
- Posts: 935
- Joined: Fri Apr 26, 2019 5:40 pm
- Has thanked: 340 times
- Been thanked: 204 times
Re: BMW i3 CCS/charge port controller
*glares at BMW*Jack Bauer wrote: ↑Mon Jun 07, 2021 9:50 amNo VIN : AC works as expected.
Wrong VIN : Nothing works. No leds. nothing.
That's going to somewhat significantly impact its reuseability, if the LIM knows what vehicle it came out of. Means any one you buy second hand you'd have to know the VIN of the vehicle it came from.
At least (presumably) CCS doesn't (yet) have VIN-tracking enabled, so we don't suffer the same fate as Elon Superchargers blacklisting you because you changed your shoes.
-
- Posts: 120
- Joined: Sun Nov 08, 2020 11:33 am
- Been thanked: 2 times
Re: BMW i3 CCS/charge port controller
The "No VIN" behaviour is potentially encouraging though.
And there is probably a way to program the VIN into it (at least a blank unit), or maybe read it out.
Worst case, find a suitable volunteer with an i3, Have its LIM suffer a "mysterious" failure under warranty and send it to the dealer with a concealed CAN logger to catch what they send it to program the replacement.
It may be that once a new unit is programmed it can't be reprogrammed, but that would be a bit extreme.
I think I saw "9 digits of the VIN" somewhere earlier, however many of these are probably predictable, so brute-forcing might be viable.
If we can test a VIN in 10 seconds, and narrow the search to 100,000 VINs, that' less that 2 weeks' search time
Can our resident CCS expert comment on whether the CCS protocol can access VIN information, and if so is this an optional part of the protocol?
If it can, then that would be a plausible reason for the LIM to want it which might not have anything to do with VIN-locking.
And there is probably a way to program the VIN into it (at least a blank unit), or maybe read it out.
Worst case, find a suitable volunteer with an i3, Have its LIM suffer a "mysterious" failure under warranty and send it to the dealer with a concealed CAN logger to catch what they send it to program the replacement.
It may be that once a new unit is programmed it can't be reprogrammed, but that would be a bit extreme.
I think I saw "9 digits of the VIN" somewhere earlier, however many of these are probably predictable, so brute-forcing might be viable.
If we can test a VIN in 10 seconds, and narrow the search to 100,000 VINs, that' less that 2 weeks' search time
Can our resident CCS expert comment on whether the CCS protocol can access VIN information, and if so is this an optional part of the protocol?
If it can, then that would be a plausible reason for the LIM to want it which might not have anything to do with VIN-locking.
-
- Posts: 120
- Joined: Sun Nov 08, 2020 11:33 am
- Been thanked: 2 times
Re: BMW i3 CCS/charge port controller
Maybe also see if we can find someone with access to third-party BMW service tools to see if they have anything about LIM coding to the car. For example :
- CCSknowitall
- Posts: 105
- Joined: Fri Jun 04, 2021 1:47 pm
- Has thanked: 1 time
- Been thanked: 28 times
Re: BMW i3 CCS/charge port controller
VIN is not sent over CCS, it’s not used anywhere. I think the fact that you can AC charge with no VIN is encouraging.
-
- Posts: 120
- Joined: Sun Nov 08, 2020 11:33 am
- Been thanked: 2 times
Re: BMW i3 CCS/charge port controller
Re. getting logs - how easy is it to access the required CAN bus?
I know someone with a fairly recent i3, but not sure how amenable he'd be to tinkering....
I know someone with a fairly recent i3, but not sure how amenable he'd be to tinkering....
- CCSknowitall
- Posts: 105
- Joined: Fri Jun 04, 2021 1:47 pm
- Has thanked: 1 time
- Been thanked: 28 times
Re: BMW i3 CCS/charge port controller
Do you see any error messages on the charger? Any hint as to what it says? The LIM could be sending something bogus and the charger ends the session. A target voltage of "1600V" could certainly do it.
However, some charging stations don't care about certain values. You could try a few other models of stations, might get lucky.
However, some charging stations don't care about certain values. You could try a few other models of stations, might get lucky.