Author Topic: USB drive.  (Read 4465 times)

Brammofan

  • Administrator
  • Brammovangelist
  • *****
  • Posts: 3257
  • Following the momentum of Enertia
    • View Profile
    • Email
USB drive.
« on: September 23, 2010, 02:29:00 PM »
Has anyone popped their under-seat USB drive into their computer and looked at what's on it?  If so... what's on it?  I was going to do that last night but was concerned that the USB would spread a virus of pure awesomeness to my PC and then I'd have to ... I don't know ... buy a new monitor.
The Brammoforum Wiki is still active: http://www.brammoforum.com/wiki

protomech

  • Brammovangelist
  • *****
  • Posts: 1987
    • View Profile
    • ProtoBlog
Re: USB drive.
« Reply #1 on: September 23, 2010, 02:47:29 PM »
From p.54 of the 2010 enertia owner's manual:
Quote
USB Data Storage
While riding and charging, real time diagnostic data is stored
on this USB flash drive. This data can be useful while your
Enertia is being serviced. The data files stored here are only
readable by your BRAMMO Authorized Service Agent using
specialized software.

My uninformed guess is that the flash drive is a standard mass storage device, and that the files are in a custom format used by Brammo maintenance software, but can be copied by any standard PC.

An unofficial Brammo log viewer would be fantastic, or log format documentation. Otherwise, I would not be surprised to see someone in the community develop an open-source log viewer tool.
1999 Honda VFR800i | 2014 Zero SR
Check out who's near you on frodus's EV owner map!
http://protomech.wordpress.com/

Brammofan

  • Administrator
  • Brammovangelist
  • *****
  • Posts: 3257
  • Following the momentum of Enertia
    • View Profile
    • Email
Re: USB drive.
« Reply #2 on: September 24, 2010, 12:47:47 PM »
I took it out, started the charging procedure, and got a "H73 - Service Required" error code on the dash.  Looking that up in the Owner's Manual, I see it is a "USB Flash Drive Bad or Removed." 
I plugged it into my pc and got the usual "new hardware installed" messages.  Under "My Computer" it showed up as a 4GB disk drive.  Nothing in the root directory except for the directory "Logs."  "Logs" has many text files... but the text (as predicted) is gobbledygook. 

Anyone interested in deciphering?  Today's file is attached.
The Brammoforum Wiki is still active: http://www.brammoforum.com/wiki

protomech

  • Brammovangelist
  • *****
  • Posts: 1987
    • View Profile
    • ProtoBlog
Re: USB drive.
« Reply #3 on: September 28, 2010, 07:01:39 AM »
That log covers friday 11:14 am to 12:35 pm, near what appears to be the end of a charging cycle. The log file is broken out into what appear to be system/battery info block every 5 seconds, and a shorter (empty) block every second. I assume the latter would be populated while riding.
1999 Honda VFR800i | 2014 Zero SR
Check out who's near you on frodus's EV owner map!
http://protomech.wordpress.com/

protomech

  • Brammovangelist
  • *****
  • Posts: 1987
    • View Profile
    • ProtoBlog
Re: USB drive.
« Reply #4 on: October 11, 2010, 03:02:22 AM »
Here's a simple application that may -- or may not -- read the Enertia log files.

The log files consist of a series of timestamped binary records. Records with a common identifier appear to track a consistent value at each offset within the record. You can think of each record as a row in a spreadsheet, and each offset as a column. Each row then is a date, and each column is a particular type of value: cell voltage, temperature, current, etc.

You can export all records of a certain type to a .csv file which you may load into your favorite spreadsheet program for further use or just to play around with the values yourself.

You can configure the log fields by editing the Log Settings.xml file in your favorite text editor. I've taken a stab at what the values might represent in the included Log Settings.xml, but that's only a poor guess at best.

Here are some examples of the types of log records.

Code: [Select]
<record>
  <name>Slow Rise 1</name>
  <loweroffset>32</loweroffset>
</record>
A simple 8-bit value. Note that for 8 bit values, only the loweroffset is used. I'm not sure what the values at offset 32 represent, so I've given it a general descriptor for clarity.

Code: [Select]
<record>
  <name>Unknown 1 16-bit volts?</name>
  <upperoffset>37</upperoffset>
  <loweroffset>36</loweroffset>
  <scale>0.001</scale>
</record>
A 16-bit value, note the offsets for the lower byte and the upper byte. This value appears to be recorded in millivolts, so you can scale it down to volts for display.

The application may crash. But give it a shot.
1999 Honda VFR800i | 2014 Zero SR
Check out who's near you on frodus's EV owner map!
http://protomech.wordpress.com/

Brammofan

  • Administrator
  • Brammovangelist
  • *****
  • Posts: 3257
  • Following the momentum of Enertia
    • View Profile
    • Email
Re: USB drive.
« Reply #5 on: October 11, 2010, 01:51:11 PM »
I'll have to give this a shot... pretty cool that you put this together.
The Brammoforum Wiki is still active: http://www.brammoforum.com/wiki

protomech

  • Brammovangelist
  • *****
  • Posts: 1987
    • View Profile
    • ProtoBlog
Re: USB drive.
« Reply #6 on: October 12, 2010, 09:12:31 AM »
And here's the rather dirty source, for anyone that would like to modify or rebuild. I built it with Visual Studio 2010 and .NET 4.0, but it should work fine on an older C# and .NET configuration.

You'll need to drop the ZedGraph.dll library somewhere where the program can find it: the main project directory or the executable directory (bin/Debug) would be fine. You can get ZedGraph.dll from the binary zip file or from http://zedgraph.org.
1999 Honda VFR800i | 2014 Zero SR
Check out who's near you on frodus's EV owner map!
http://protomech.wordpress.com/

protomech

  • Brammovangelist
  • *****
  • Posts: 1987
    • View Profile
    • ProtoBlog
Re: USB drive.
« Reply #7 on: October 12, 2010, 09:18:21 AM »
The intent of the program is to first figure out the Brammo log file format and what the fields represent, and second to provide a little bit more insight into how the bikes work without having to call up a Brammo tech.

To that end, if you use the program and figure out some of the fields and update your Log Settings.xml, you can post your new Log Settings.xml here and other people can use it. You can also post logs and a description of what took place during the log or a route, and I'll see if I can identify any more fields in the log files.
1999 Honda VFR800i | 2014 Zero SR
Check out who's near you on frodus's EV owner map!
http://protomech.wordpress.com/