Jason-ABRP Posted May 13, 2019 Share Posted May 13, 2019 This thread is for anyone interested in figuring out how to get Live Data into ABRP for the BMW i3. It's something of a manual process, identifying the PIDs and what data they contain. Here's what I know so far: BMWs have a unique activation code (See link) which needs to be input to Torque Pro to connect (may or may not be true for the i3) PID reverse engineering is possibly done via CAN listening (See Link) Torque has a plugin which scans for PIDs that have data (Link) but often doesn't turn anything up for EVs. Reverse engineering the PIDs is not something I've done before, and requires physical access to the car. A lot of trial and error, and guesswork. I'm happy to provide help in troubleshooting the setups and figuring out the PIDs. Link to comment Share on other sites More sharing options...
tjsean0308 Posted May 13, 2019 Share Posted May 13, 2019 Does torque work with iOS? Last time I looked into it it was Android only. I don't have an android phone to play with. Guess i'm not much help here. I'll stick to updating the opencharge maps. 1 Link to comment Share on other sites More sharing options...
Jason-ABRP Posted May 13, 2019 Author Share Posted May 13, 2019 16 hours ago, tjsean0308 said: Does torque work with iOS? Last time I looked into it it was Android only. I don't have an android phone to play with. Guess i'm not much help here. I'll stick to updating the opencharge maps. EngineLink is pretty good for iOS, and can use the same kinds of PID lists that Torque does. I'm just not very familiar with it as an Android user myself. Link to comment Share on other sites More sharing options...
Jason-ABRP Posted May 22, 2019 Author Share Posted May 22, 2019 Of note: The link I posted in the OP (https://f30.bimmerpost.com/forums/showthread.php?t=1483707) actually links to an ICE BMW PID list, I would bet that the i3 PIDs are going to be similar, so that's probably a good place to start. Link to comment Share on other sites More sharing options...
mlow Posted August 6, 2019 Share Posted August 6, 2019 I'll take a stab at this pretty soon on my '15 i3 rex 60Ah. Link to comment Share on other sites More sharing options...
mlow Posted August 8, 2019 Share Posted August 8, 2019 @Jason (ABRP) Deep obd can certainly see a lot of ECU, and read values from registers. Not that I can begin to understand what I'm looking for, I didn't see anything specifically marked as something that looked like state of charge. Since I am not familiar with what deep obd was showing me I didn't poke too much around. If someone can give me an idea of what I'm looking for I can try and look more into it. I also gave Torque Pro a try, and the scanner plugin. Couldn't see a battery SoC there either, and the scanner took forever only to give me a long list of PIDs with their response. All of which seemed to be "7E8037F2213". Not sure if that's a status response equivalent to "404 not found" or OK, or what, but they all responded with that. Deep OBD showed these ECU: Quote CAS: Body Domain Controller EME/RLM1R: Electric Motor-Electronics I01 GWS: Gear selector switch KLE: Universal Charging Extension KOMBI: The instrument cluster LHM_L: Frontal light electronics left LHM_R: Frontal light electronics right PMA/USS: Park Maneuver Assistant RE_DME: Range-Extender Engine Electronics RE_EME: Range Extender, E-Machine Electronics SME: Memory Management Electronics TBX: Erkennerbox to the ZBE Touch TFM: Tank-Function-Module ZGW: Central Gateway This all seems like it's pretty comprehensive. Selecting an ECU loads for a good while, then presents "jobs" to run and results to select to view after the "job". For instance for the ECU "CAS" the "jobs" look like things like: Quote STATUS_ENERGIESPARMODE: Energy-Saving-mode read-out; UDS : $22 or STATUS_FH_THERMOMONITOR_AKTIV plus many more naturally, it's a long list Not sure where to go from here. Torque PID scanner didn't seem to go anywhere. Supposedly the "deep odb" app should be able to do anything that INPA/tool32 can according to the dev. I sent them an email to see if they can assist with finding the information were looking for like the battery SoC, gps info, power use commanded, and instantaneous range estimates etc. We'll see if they can get back to me and help. Link to comment Share on other sites More sharing options...
Jason-ABRP Posted August 9, 2019 Author Share Posted August 9, 2019 15 hours ago, mlow said: @Jason (ABRP) Deep obd can certainly see a lot of ECU, and read values from registers. Not that I can begin to understand what I'm looking for, I didn't see anything specifically marked as something that looked like state of charge. Since I am not familiar with what deep obd was showing me I didn't poke too much around. If someone can give me an idea of what I'm looking for I can try and look more into it. I also gave Torque Pro a try, and the scanner plugin. Couldn't see a battery SoC there either, and the scanner took forever only to give me a long list of PIDs with their response. All of which seemed to be "7E8037F2213". Not sure if that's a status response equivalent to "404 not found" or OK, or what, but they all responded with that. Deep OBD showed these ECU: This all seems like it's pretty comprehensive. Selecting an ECU loads for a good while, then presents "jobs" to run and results to select to view after the "job". For instance for the ECU "CAS" the "jobs" look like things like: Not sure where to go from here. Torque PID scanner didn't seem to go anywhere. Supposedly the "deep odb" app should be able to do anything that INPA/tool32 can according to the dev. I sent them an email to see if they can assist with finding the information were looking for like the battery SoC, gps info, power use commanded, and instantaneous range estimates etc. We'll see if they can get back to me and help. Great that you've made some progress! Generally PIDs come in a mode/pid combo. Example: mode=22, pid=2411 is the Raw SOC PID for the Chevy Bolt. Unfortunately for us most of the EV PIDs are in the "proprietary" modes (21,22,etc), and don't have a lot of carry-over between manufacturers. In the end, you'll probably need help from the developer to access those PIDs. Does Deep OBD have a server logging method? I've never had success with Torque's scanning plugin, as you said, a lot of non-responses on the PIDs it tries. I have been tinkering with an AutoPi and intend to develop my own scanning plugin to try to do a better job of finding the PIDs. Remains to be seen if I will be successful. Link to comment Share on other sites More sharing options...
mlow Posted August 9, 2019 Share Posted August 9, 2019 4 hours ago, Jason (ABRP) said: Great that you've made some progress! Generally PIDs come in a mode/pid combo. Example: mode=22, pid=2411 is the Raw SOC PID for the Chevy Bolt. Unfortunately for us most of the EV PIDs are in the "proprietary" modes (21,22,etc), and don't have a lot of carry-over between manufacturers. In the end, you'll probably need help from the developer to access those PIDs. Does Deep OBD have a server logging method? I've never had success with Torque's scanning plugin, as you said, a lot of non-responses on the PIDs it tries. I have been tinkering with an AutoPi and intend to develop my own scanning plugin to try to do a better job of finding the PIDs. Remains to be seen if I will be successful. I've got a half dozen(well closer to dozen) Pi devices and Pi-like devices. So let me know if I can help with that. I'll give the deep obd app another look, but yes it has a logging option in the menu, with some options for data types. I'll also try and use that profile command option in the torque app, as when I tried before I did not have that string of commands added to the vehicle profile. Perhaps it will reveal more information. The developer of the deep obd app did get back to me but doesn't quite know how information such as SoC would be obtained. They suggested using the "ediabas tool" to see which "jobs" to run. But I'll admit to that stuff being over my head. It certainly looks like the information could be gotten that way but it's certainly not the most straightforward app. The developer will straight up tell you the tool is only for "experts", I assume they mean essentially it's only for people very familiar with bmw CAN bus knowledge. Link to comment Share on other sites More sharing options...
mlow Posted August 9, 2019 Share Posted August 9, 2019 Some deep obd screen shots. Not that I know what really that they show or is of use, since most is German but I think it says battery in there somewhere. Link to comment Share on other sites More sharing options...
Jason-ABRP Posted August 9, 2019 Author Share Posted August 9, 2019 My opinion - there's only one way to become an expert: Starting as an amateur! Do any of your Pi devices have an OBD port you could plug in? We could certainly work with that to devise a means of probing the CAN bus. Python has a very nice OBD module that's fairly easy to use, we'd need to work out a learning algorithm, first finding all of the PIDs that respond, then figuring out which ones provide useful information. Link to comment Share on other sites More sharing options...
mlow Posted August 9, 2019 Share Posted August 9, 2019 (edited) 3 hours ago, Jason (ABRP) said: My opinion - there's only one way to become an expert: Starting as an amateur! Do any of your Pi devices have an OBD port you could plug in? We could certainly work with that to devise a means of probing the CAN bus. Python has a very nice OBD module that's fairly easy to use, we'd need to work out a learning algorithm, first finding all of the PIDs that respond, then figuring out which ones provide useful information. I did a lot of web browsing and found some info that may help. This appears to be the software "ISTA" used for diagnosis and programming. For windows machines, and used with a "K/D-CAN cable". So the protocol is obviously CAN, meaning that the ECU/module of interest is "SME", I believe. The circled text reads, "Condition high voltage battery". Circled text here reads "Current State of Charge". Bingo. So from what I gather we're looking for reading info from the SME ECU/module. Either it is exposed as a PID over OBD, or it's a message sent over CAN at intervals, and has to be "caught" I guess. Edited August 9, 2019 by mlow Link to comment Share on other sites More sharing options...
gmytis Posted September 13, 2019 Share Posted September 13, 2019 anybody else tried deepobd with i3? i can read some sensors and parameters from EDME ecu, but nothing at all from SME ecu. it's got some parameters for battery temperature, but cant read anything at all. At the same time reads battery temperature, charge level with ista-d and laptop no problem. Link to comment Share on other sites More sharing options...
PaulS Posted September 20, 2019 Share Posted September 20, 2019 So, I'm trying to have a go at this. First thing is trying to work out what to get to connect to the car. I too have been doing various bits of research, and found some schematics for the wiring inside the i3. Quote This appears to be the software "ISTA" used for diagnosis and programming. For windows machines, and used with a "K/D-CAN cable". So the protocol is obviously CAN, meaning that the ECU/module of interest is "SME" So, the OBD connector has two protocols on it. There's the DCAN bus, , and Ethernet. The K+DCAN cable allows access to DCAN and K-Line buses (K-Line isn't connected on the i3 I think). The ENET cables allow you to talk TCP-IP. Most things I see about coding the car talk about using the ENET cable, but Bimmercode just seems to use DCAN I think. Second thing is that the OBD connector connects to the BDC (Body Domain Controller). It then connects over the PT-CAN bus to the EDME (Electrical Digital Motor Electronics), and that connects over the PT-CAN2 bus over to the SME (Supply Machine Electronics - The box that sits in the battery tray). OBDII Port <---DCAN---> BDC <---PT-CAN---> EDME <---PT-CAN2---> SME That matches the diagram you've posted. There's no guarantee that the CAN messages from the SME that we want are forwarded from the PT-CAN2 bus, through the EDME, to the BDC, and then onto the DCAN bus on the OBD port. We are a few levels deep here. One thing that's working for us is that the instrument cluster is on the PT-CAN bus, so the charge level updates should be on that bus, and that's just one step away. I'm waiting for my cables to turn up, and then I'll start doing some experiments. Link to comment Share on other sites More sharing options...
mlow Posted September 23, 2019 Share Posted September 23, 2019 On 9/20/2019 at 10:51 AM, PaulS said: So, I'm trying to have a go at this. First thing is trying to work out what to get to connect to the car. I too have been doing various bits of research, and found some schematics for the wiring inside the i3. So, the OBD connector has two protocols on it. There's the DCAN bus, , and Ethernet. The K+DCAN cable allows access to DCAN and K-Line buses (K-Line isn't connected on the i3 I think). The ENET cables allow you to talk TCP-IP. Most things I see about coding the car talk about using the ENET cable, but Bimmercode just seems to use DCAN I think. Second thing is that the OBD connector connects to the BDC (Body Domain Controller). It then connects over the PT-CAN bus to the EDME (Electrical Digital Motor Electronics), and that connects over the PT-CAN2 bus over to the SME (Supply Machine Electronics - The box that sits in the battery tray). OBDII Port <---DCAN---> BDC <---PT-CAN---> EDME <---PT-CAN2---> SME That matches the diagram you've posted. There's no guarantee that the CAN messages from the SME that we want are forwarded from the PT-CAN2 bus, through the EDME, to the BDC, and then onto the DCAN bus on the OBD port. We are a few levels deep here. One thing that's working for us is that the instrument cluster is on the PT-CAN bus, so the charge level updates should be on that bus, and that's just one step away. I'm waiting for my cables to turn up, and then I'll start doing some experiments. Keep us posted for sure. I stopped short of buying the cable, as I wasn't sure which would be best to get. Plus it also seems a windows PC laptop will also be needed. Link to comment Share on other sites More sharing options...
Fridgeir Posted November 21, 2019 Share Posted November 21, 2019 Hi, I'm also sitting with an app developer on the problem of communication. We are at least ready to send commands to the OBD connector via BT-Terminal. It requires an initialization process to get the "right" answers. The next step is to determine the PID and place it in the right context. DeepOBD didn't work properly for me either and the information I could get there was very scarce. A "possible" PID list I read from tool32, if it's the PID's. I would be very happy if others would also participate in the "decoding". Because live data in ABRP would be ingenious, but also for other purposes, which I plan, meaningful and important. Link to comment Share on other sites More sharing options...
Fridgeir Posted December 5, 2019 Share Posted December 5, 2019 On 8/9/2019 at 3:22 PM, Jason (ABRP) said: My opinion - there's only one way to become an expert: Starting as an amateur! Do any of your Pi devices have an OBD port you could plug in? We could certainly work with that to devise a means of probing the CAN bus. Python has a very nice OBD module that's fairly easy to use, we'd need to work out a learning algorithm, first finding all of the PIDs that respond, then figuring out which ones provide useful information. State of Charge Grenzwerte Auslesen und Ändern der SOC Grenzen Auslesen SOC Wert (in %) und Plausibilität oder Vorgabe des SOC Werts (0-100%) aktueller Anzeige Soc minimale und maximale Einzelzellspannungen werden ausgegeben Batteriespannung hinter den Schützen, unabhängig vom Schützzustand Stromgrenzen Spannungsgrenzen Die kumulierte Ladung für Ladevorgänge in Ah HV-Strom in A Auslesen Temperaturen Bestimmung der Kapazität PID-List is here, the above are examples what we can read now (and a lot more) Link to comment Share on other sites More sharing options...
Jason-ABRP Posted December 15, 2019 Author Share Posted December 15, 2019 On 12/5/2019 at 2:54 PM, Fridgeir said: State of Charge Grenzwerte Auslesen und Ändern der SOC Grenzen Auslesen SOC Wert (in %) und Plausibilität oder Vorgabe des SOC Werts (0-100%) aktueller Anzeige Soc minimale und maximale Einzelzellspannungen werden ausgegeben Batteriespannung hinter den Schützen, unabhängig vom Schützzustand Stromgrenzen Spannungsgrenzen Die kumulierte Ladung für Ladevorgänge in Ah HV-Strom in A Auslesen Temperaturen Bestimmung der Kapazität PID-List is here, the above are examples what we can read now (and a lot more) Perfect! Do you have the ability to send anything to a webserver with that setup? I can work with you to set up live data to connect the i3 fairly easily, depending on what's available. Link to comment Share on other sites More sharing options...
joni3s Posted December 17, 2019 Share Posted December 17, 2019 Hey all, I have most of the windows software on a laptop, ENET cable, , bimmercode on ios (via ENET/adapter) described above and an i3, however I would really need some assistance in helping out. Just let me know how. I have some extra Pi3B+s to use also BTW. Link to comment Share on other sites More sharing options...
PaulS Posted January 2, 2020 Share Posted January 2, 2020 On 12/5/2019 at 8:54 PM, Fridgeir said: PID-List is here Where? Did you mean to have a link? Link to comment Share on other sites More sharing options...
Fridgeir Posted January 2, 2020 Share Posted January 2, 2020 1 hour ago, PaulS said: Where? Did you mean to have a link? no link, you have to collect them (over 2000 lines). if you use Ediabas, you hae to know the names of the ECU and than collect the PID. But the PID list isn't worth much. The initialization sequence to talk to the car via OBD is the key Link to comment Share on other sites More sharing options...
PaulS Posted January 12, 2020 Share Posted January 12, 2020 On 1/2/2020 at 2:52 PM, Fridgeir said: The initialization sequence to talk to the car via OBD is the key Ok, so any chance you'll share the initialisation sequence. Then we could look at using Torque to send live data. Link to comment Share on other sites More sharing options...
Fridgeir Posted January 12, 2020 Share Posted January 12, 2020 i have not been able to persuade Torque to send me live data with the right sequence But very soon there will be an app (first for Android) which will allow you to get live data via OBD dongle Link to comment Share on other sites More sharing options...
rs38 Posted February 1, 2020 Share Posted February 1, 2020 doesn't this one work? "AT PB E1 01\nAT CRA 612\nAT SH 6F1\nAT FC SH 6F1\nAT FC SD 12 30 0F 02\nAT FC SM1\nAT CEA 12\nAT CM 600\nAT H1\nAT SP B\nAT BI\nAT AL\n" Link to comment Share on other sites More sharing options...
gmytis Posted February 4, 2020 Share Posted February 4, 2020 (edited) with latest deepobd update started working on i3 Edited February 4, 2020 by gmytis 1 1 Link to comment Share on other sites More sharing options...
Fridgeir Posted February 4, 2020 Share Posted February 4, 2020 (edited) On 2/1/2020 at 2:30 PM, rs38 said: doesn't this one work? "AT PB E1 01\nAT CRA 612\nAT SH 6F1\nAT FC SH 6F1\nAT FC SD 12 30 0F 02\nAT FC SM1\nAT CEA 12\nAT CM 600\nAT H1\nAT SP B\nAT BI\nAT AL\n" nein, weil der Flowcontrol Befehl ins leere läuft; netter Versuch rs38. Für Dich ist das doch ein Kinderspiel, wofür andere "Monate Forschungsarbeit" betrieben haben BTW; die Sequenz kommt aus dem Syndikat Forum Edited February 4, 2020 by Fridgeir Link to comment Share on other sites More sharing options...