CAN Bench Testing (no ACK)

69 views
Skip to first unread message

Jerry Trantow

unread,
Dec 29, 2017, 4:55:08 PM12/29/17
to OpenXC
Is the DEFAULT_CAN_ACK_STATUS working as described in the CAN Bench Testing docs?

I am trying to do some bench work with some CAN data recorded on another system. I am using an older NI 8473 CAN USB device to playback the CAN data but I can't get the Ford VI to catch the data. The Ford VI wakes up when I start sending data and my Android phone running XC Enable catches two messages each time it wakes up (I think these are just the version and not CAN messages). With nothing ACKing on the bus I an understand why this would happen. So following the directions, I built and installed the firmware using "DEFAULT_CAN_LOCK_STATUS=1 make PLATFORM=FORDBOARD"

I am sending the data at 5000000 with the NI USB and the test message has a standard id of 0x555 and eight bytes of data [0x00, 0x00, 0xAA, 0xAA, 0x55, 0x55, 0x00, 0x00]
I ran this test message into the Ford VI using DEFAULT_CAN_LOCK_STATUS=0 and =1 firmware.

I expected to see the ACK delimiter when the firmware was compiled for ACK=1. Instead, I see the exact same signal for the two firmware builds???


The attached scope capture shows the following traces (top to bottom): CAN high, CAN low, measurement(CAN high - CAN low), reference signal.
I saved the ACK=0 build measurement as the reference and expected to see the CAN delimiter change between the two firmware builds but I see the same signal???

So it appears that the firmware isn't ACKing the message even when I recompile with DEFAULT_CAN_LOCK_STATUS=1. Any ideas on why would be appreciated. 

Is the firmware expecting CAN baud of 500,000 or something else on pins 6,14 of the J1962 connector?


I am building the code with the Vagrant dev environment. The only change I made was to use latest Ubuntu box (original files don't provision without errors during vagrant up).
CAN_ACK_MISSING.html

Jerry Trantow

unread,
Dec 29, 2017, 11:15:19 PM12/29/17
to OpenXC
I got my bench to work. I'm using a NI USB to send recorded vehicle CAN traffic to a custom controller and the Ford VI (running type 5 ford binary). I see the values in the android app.

Now if I can just figure out where the android logs the output I should be ok.
Or better yet, I can figure out how to get the usb recognized within the vagrant VM on my Win10 machine so I can see the JSON output!

Eric Marsman

unread,
Dec 30, 2017, 10:55:55 AM12/30/17
to ope...@googlegroups.com
Hi, 

Did you specify the messages in a json  file and generate a signals.cpp file? 

--
Eric Marsman
Go Blue!!!

--
You received this message because you are subscribed to the Google Groups "OpenXC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openxc+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/openxc.
To view this discussion on the web visit https://groups.google.com/d/msgid/openxc/a3535a96-2e48-43f2-a057-f5c7b80af9ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jerry Trantow

unread,
Dec 30, 2017, 2:11:20 PM12/30/17
to ope...@googlegroups.com
I mistakenly thought I could use the default firmware and get it to at least give me a CAN message count. I saw last night that CAN messages only get counted when they produce a firmware output. My mistake. 

My real focus is the output from the Ford binaries and I figured out how to keep the Ford firmware running on the bench. I can now send CAN messages and see the Ford specific messages show up in the Android application. I thought these messages would get logged into a file on my phone but I can't find a file anywhere on my phone? I have the Record Trace checked in settings. If I'm using the Ford binaries does the Android app log the messages? Using Android was just a quick test, I'd like to focus my work on my computer.

I have been able to build the code using a modified (https://github.com/openxc/vi-firmware/issues/402) Vagrant VM on my Win10 machine. I'm a long time VMWare user but new to Vagrant/Virtualbox. I haven't figured out how to access the Ford Vi over usb from within the VM. Any hints would be appreciated.

Happy New Year!



--
You received this message because you are subscribed to a topic in the Google Groups "OpenXC" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openxc/Dwe47ff78UA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openxc+unsubscribe@googlegroups.com.

Eric Marsman

unread,
Jan 2, 2018, 11:44:17 AM1/2/18
to OpenXC
Yes, if you have the "record traces" set, you should get a logfile in /root/openxc-traces/. Are they not there? 

Regards,
Eric

Jerry Trantow

unread,
Jan 2, 2018, 2:55:00 PM1/2/18
to ope...@googlegroups.com
I turned on my developer option on the phone and the openxc-traces showed up in my windows file explorer under the Pixel phone. I took a quick look at the files and saw the JSON output in several of the files (and a lot of empty files from the last week or two) So I deleted the xcopen-traces directory (using windows file explorer). 

Now I can see the Status - Messages Received increment and the Dashboard messages like "Fuel Level %" but I don't see any openxc-traces??? I thought maybe using Windows to delete the directory on the phone was a mistake so I uninstalled openxc enabler and reinstalled. Still no files appear??? I also tried enabling recording, sending the CAN messages, disabling recording to see if that would trigger a file save without success.

I'm probably making a simple mistake. If I see the messages in the Dashboard should they be going into the trace file? What opens and closes the trace file?

Eric Marsman

unread,
Jan 2, 2018, 4:02:15 PM1/2/18
to OpenXC
If you have the "record trace" box checked and are getting data in the "dashboard" then you should be creating JSON files in that directory. It's all done in the app. 


Regards,
Eric

Jerry Trantow

unread,
Jan 9, 2018, 2:15:15 PM1/9/18
to ope...@googlegroups.com
It may be the fact that I'm trying to get by with the Windows File Explorer to transfer files from my phone. But I see Messages Received in the Dashboard and I see the individual values ("Fuel Level, RPM, etc.. but I don't see the file appear in the Windows File Explorer phone folder until I restart my phone. I wait for the BT connection to the Ford VI to shut down before I restart. Sometimes I will see the data as expected in the file, sometimes I see a partial json message at the end of the file, and often I just see empty file, This is with bench testing where I am sending short batches of CAN messages. In this case, I don't think the log file is being flushed or closed correctly.

Jerry Trantow

unread,
Jan 9, 2018, 7:58:17 PM1/9/18
to ope...@googlegroups.com
I verified that if I send CAN messages longer (INTER_TRIP_THRESHOLD_MINUTES ) I don't get empty log files. I still need to restart my phone. I think this is a bug for logging CAN messages probably when log time < INTER_TRIP_THRESHOLD_MINUTES.
I was able to use the Android OpenXC Enabler to verify some CAN data file I needed to run and I won't be investigating this any further.

Thanks for the help.

Eric Marsman

unread,
Jan 11, 2018, 10:30:35 AM1/11/18
to OpenXC
Hi Jerry,

I have files that are less than 5 minutes. I end up doing that all the time in testing. Unless you kill the app or disconnect BT or something, it should properly close the file. Not sure what was going on for you there.

Glad you got what needed. Hopefully you found OpenXC helpful. Let us know if you need anything else.

Regards,
Eric
Reply all
Reply to author
Forward
0 new messages