Logging data tips

Hi everyone,

today I got some interesting info from Hyundai service guys. I visited because I have problems with my right wing mirror and asked them the following: is there an option for coming over with an OBD2 logger and to try to record what commands need to be sent to be able to open and close windows, lock/unlock the car and most important, set the AC unit. Surprisingly, after I told the service guy about AutoPi and showing him the interface (not much to see in my case, only GPS location, 12 V battery chart and HV battery state of charge chart) he was actually interested. At least it looked like it :slight_smile:
I told him I’d be willing to pay them for an hour or 2 so I/we could play with their tablet and record the data flowing through OBD2.
My question is the following: AFAIK the Ioniq needs to get some data and it will reply. It doesn’t transmit anything unless asked to. This is a good thing in this case I think :slight_smile:
What would be the best way to log the data so I could later know what is what? I’m not really good with scripting.
My plan was to go there with my laptop and connect directly to AutoPi to execute commands.

Can someone give me a tip what to look for, where to save results and so? I know I’ll put the jumper in to keep RPI ON.

Another question (I’ll also try that this evening), can I monitor OBD2 traffic by just plugging in another CAN device (ie. Sparkfun OBD2 UART adapter)? If so, then I can monitor what Hyundai’s tablet PC sends to car and see replies back :slight_smile:

@Daniel_Senic here’s the tag you asked for :stuck_out_tongue:

1 Like

I’m very interested in this :slight_smile:

If I had access to the Hyundai GDS I think I would first try -

  1. Use a OBD2 2-way connector - plug autopi into one GDS into the other
  2. On autopi start recording ( eg odb.dump duration=30 file=bms.log )
  3. On GDS issue simple command ( eg look at the BMS sensors )
  4. Stop record on autopi
  5. Write down all the displayed sensor settings on the GDS
  6. Repeat 1-5 for next set of sensors
  7. Upload autopi recordings
  8. Try and figure out correlation between recordings and what was displayed on GDS

Hopefully you could also try some commands - eg turn on pre-warming.

I’ve no real idea if this will work, but thats what I would try first.

1 Like

Thanks :smiley:

Yes, I already have a 3-way connector in my car so GDS + AutoPi and probably SparkFun’s OBD2 adapter that will be plugged into my laptop at the time.
I might actually do the logging via a terminal app (on laptop) as I hope that I’ll be able to see all the data flowing. I’ll try to check this evening and see what I get - if anything. I’ll connect my Torque Pro + Konnwei KW902 Bluetooth and my latop at the same time. If I see messages that are sent from Konnwei and + replies back from the car, I’ll be very happy.
Apparently it’s possible to honk horn, control windows, lock/unlock the car, enable/disable hazard blinkers, control A/C, control mirrors, radio and even lights and switch gears.

I just hope they won’t chicken out :slight_smile: hehe

Short update. I tried connecting 3 devices at same time to OBD2: AutoPi, Konnwei KW902 with my phone’s Torque Pro and Sparkfun’s OBD2 adapter. Once I connected the third device, things started to get a bit wacky (phone reporting 1100+ A battery current, all 4 drive gears selected (D, R, N and P were active in Torque) and similar stuff.
If only 2 devices were connected, it worked with no hiccups.

I have noticed one thing but need to research more into it. I can’t seem to be able to properly use the recorded data. Is there an option to download it as raw data? Probably only directly from dongle by WiFi/SSH?
Recording shows either 19 messages or 109 (2 recordings). On 19 messages one I only see 10 messages but I couldn’t find the ones I was sending to the car in between them. The one with 109 recordings, I can’t even see/filter any data out for some reason.

1 Like

Looking at the source, it looks to me that duples are written to /opt/autopi/acc in json format.

There is also the obd.recordings command to list recordings.

I would use scp to get the files to a desktop first.

1 Like

Sooo umm did the latest update actually mess up the obd connection?
I can’t get any reading back from the device, when trying to start logging, I get message that it was logged successfully but there is no trace of a log anywhere.
That’s a real shame, I was planning to record data with Hyundai’s GDS tool connected to the car :frowning: :sob:
Can’t even get any readings directly from console either. Bummer :sob:

1 Like

Same for me
Odb seem not connected.
I will flash autopi as old système. Then wait an update.

Hi,

We are currently investigating this. It does not seem to be a problem for all devices, but we will keep you posted on our findings.

best
Peter

1 Like

Hi!

Same problem here on my IONIQ EV after the 4:th of april update, no response from the bus

/Mats

Hi All,

We just released a hotfix adressing this issue.

Can you check if that fixes the issues you are seeing?

best
Peter

1 Like

After the last update my IONIQ EV refused to drive in D or R and I had to disconnect both the AutoPi and the 12v battery and reset the car

The same thing happened with my Kona this morning: Unplugging whilst driving: Not recommended!

Guess we need an other update to fix this issue!

/Mats

Hi Peter,
I brought the AutoPi inside and plugged it into my lab power supply. I did the update, checked if the “brown-outs” work (if that’s the term?) and they do. So I put the device back into my car.
Sure enough, I get back my State of Charge data. Awesome :slight_smile:

Thank you!

Also on the second note, the Hyundai’s GDS is pretty much useless. It can’t do anything if car isn’t powered on (at least in first stage running only from 12 V battery). Shame :frowning:
I guess someone will need to figure out how to take Ioniq’s radio out so we can connect to other CAN busses.