<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="" style="overflow-wrap: break-word;">I found this interesting :</div><div dir="ltr" class="" style="overflow-wrap: break-word;"><br class="" style="font-family: "Segoe UI";"></div><div dir="ltr" class="" style="overflow-wrap: break-word;"><a href="https://github.com/jmagnuson/canparse" class="">https://github.com/jmagnuson/canparse</a></div></div></div></div></blockquote></div><div class=""><br class=""></div><div class="">Our parser is loosely based on:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""></div><blockquote type="cite" class=""><div class="">; With credit due to candbc-parser.y, for idea and structure</div><div class="">; <a href="https://github.com/Polyconseil/libcanardbc" class="">https://github.com/Polyconseil/libcanardbc</a></div><div class="">; Copyright (C) 2007-2009 Andreas Heitmann</div></blockquote></div></blockquote><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="" style="overflow-wrap: break-word;">I have a question about this : </div><div dir="ltr" class="" style="overflow-wrap: break-word;"> </div><div dir="ltr" class="" style="overflow-wrap: break-word;"><span class="" style="overflow-wrap: break-word;">The dbcSignal name is defined in the DBC as the name of an OVMS metric.</span></div></div></div></div></blockquote></div><div class=""><br class=""></div>I originally looked at several solutions to the issue:<div class=""><br class=""></div><div class=""><ol class="MailOutline"><li class="">Change the DBC SG_ entry so that signal name is the ovms metric name. In your example, this would be:<br class=""><br class="">SG_ v.m.rpm : 24|16@1+ (0.125,0) [0|8031.88] "rpm" Vector__XXX<br class=""><br class="">Or if we want to keep this 100% pure DBC, then use:<br class=""><br class="">SG_ v_m_rpm : 24|16@1+ (0.125,0) [0|8031.88] "rpm” Vector__XXX<br class=""><br class="">and map ‘_’ to ‘.’<br class=""><br class=""></li><li class="">Add a comment to the DBC file, to provide the mapping of signal name to metric. In your example, this would be:<br class=""><br class="">SG_ Engine_Speed : 24|16@1+ (0.125,0) [0|8031.88] "rpm" Vector__XXX<br class="">CM_ SG_ 2364539904 Engine_Speed “#ovms metric v.m.rpm";<br class=""><br class=""></li><li class="">Create a separate mapping (file or config) to map from DBC name to OVMS metrics.</li></ol></div><div class=""><br class=""></div><div class="">The solution I chose was #1. It seems the simplest and most direct.</div><div class=""><br class=""></div><div class="">The dbc.{h,cpp} implementation of dbcSignal::SetName() already did this by trying to lookup the metric when the signal name was set. It required the signal name to be a (non standard) identifier (with periods ‘.’ in the identifier name).</div><div class=""><br class=""></div><div class="">I have just now extended this to also support a mapping alternative (‘_’ -> ‘.’). So now you can use either ‘v.m.rpm’ or ‘v_m_rpm’ as the signal name (both will work). You should be able to try this now:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">SG_ v_m_rpm : 24|16@1+ (0.125,0) [0|8031.88] "rpm" Vector__XXX</div></blockquote><div class=""><br class=""></div><div class="">and you should see the speed metric (v.m.rpm) mapped correctly.</div><div class=""><br class=""></div><div class="">The remaining problem I have is implementing the Encode/Decode functions in an efficient manner. The DBC specification says to convert everything to floating point, but that is incredibly innefficient. So, I’ve created dbcNumber that tries to abstract this out and efficiently perform mathematical operations between integers dbcNumbers without having to go through DBC floating point.</div><div class=""><br class=""></div><div class="">Once the dbcSignal::Decode function has been implemented, the pure dbc IncomingFrameCanX handlers can be written (to call dbcSignal::DecodeMetric on each signal of the message) to update the metric appropriately. At that point, dbc based vehicles should start to work.</div><div class=""><br class=""></div><div class="">At the moment, I have a pile of other projects I am working on (including the Retools conversion to work from DBCs, and the message chat function in iOS App). If you have time to work on the dbcSignal::Decode (and appropriate dbcNumber support), that would be wonderful. The issue is really just the bit masking and extraction for dbc signals (with two version - one for integers and a second for floats). I can handle the vehicle_dbc once the dbcSignal::Decode is working.</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 27 Jan 2019, at 2:52 AM, Olivier <<a href="mailto:ogrums@gmail.com" class="">ogrums@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div style="overflow-wrap: break-word;" dir="ltr" class="">Hi Mark,</div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><br style="font-family:"Segoe UI"" class=""></div>
<div style="overflow-wrap: break-word;" dir="ltr" class="">I was looking for ideas to implement the code to decode and encode CAN
Messages, I found this interesting :</div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><br style="font-family:"Segoe UI"" class=""></div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><a href="https://github.com/jmagnuson/canparse" class="">https://github.com/jmagnuson/canparse</a></div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><br style="font-family:"Segoe UI"" class=""></div>
<div style="overflow-wrap: break-word;" dir="ltr" class="">Is doing what we want to do, what do you think ?</div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""> </div>
<div style="overflow-wrap: break-word;" dir="ltr" class="">I have a question about this : </div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""> </div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><span style="overflow-wrap: break-word;" class="">The
dbcSignal name is defined in the DBC as the name of an OVMS metric. Each
dbcSignal object contains an m_metric, as a pointer to an OVMS metric, that can
be set during initialisation based on a simple lookup of the metric name. That
is in dbcSignal::AssignMetric(). I have done that in the dbcSignal constructor
and SetName() functions, although it makes our DBC slightly non-standard
conformant by allowing periods (“.”) in identifiers.</span></div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><span style="overflow-wrap: break-word;" class=""></span> </div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><span style="overflow-wrap: break-word;" class=""> Example
sample dbc file :</span></div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><span style="overflow-wrap: break-word;" class=""></span> </div><span style="overflow-wrap: break-word;" class="">
<div style="overflow-wrap: break-word;" dir="ltr" class="">VERSION "A version string°"</div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""> </div>
<div style="overflow-wrap: break-word;" dir="ltr" class="">BO_ 2364539904 EEC1 : 8 Vector__XXX<br style="font-family:"Segoe UI"" class=""> SG_ Engine_Speed : <a href="mailto:24%7C16@1" style="font-family:"Segoe UI"" class="">24|16@1</a>+ (0.125,0) [0|8031.88] "rpm"
Vector__XXX<br style="font-family:"Segoe UI"" class="">BA_ "SingleFrame" BO_ 2364539904 0;<br style="font-family:"Segoe UI"" class="">BA_ "SPN" SG_ 2364539904
Engine_Speed 190;</div>
<div style="overflow-wrap: break-word;" dir="ltr" class="">CM_ BO_ 2364539904 "Engine Controller";</div>
<div style="overflow-wrap: break-word;" dir="ltr" class="">CM_ SG_ 2364539904 Engine_Speed "A description for Engine speed.";</div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""> </div>
<div style="overflow-wrap: break-word;" dir="ltr" class="">the metric can be dynamically build like :</div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""> dbc + NodeName + SignalName => dbc.eec1.engine_Speed</div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""> </div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><span style="overflow-wrap: break-word;" class="">But
is that case, I don't know how I can manage to use this metric on charts because
if the dbc file is not loaded, the metric doesn't exist. And if I want to use
standard metric how can we map/link signal in dbc file to standard metric
?</span></div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><span style="overflow-wrap: break-word;" class=""></span> </div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><span style="overflow-wrap: break-word;" class="">Or
It's just I idea, with the config vehicle, we define custom metrics we need in
the code, and find a way to save somewhere matrix like : custom.metric.a = byte
for signal A from Message J </span></div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><span style="overflow-wrap: break-word;" class=""></span> </div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><span style="overflow-wrap: break-word;" class="">regards,</span></div>
<div style="overflow-wrap: break-word;" dir="ltr" class=""><span style="overflow-wrap: break-word;" class="">Olivier</span></div></span></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 9 déc. 2018 à 15:41, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> a écrit :<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">Olivier,<div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">1. do you know how to config the dbc file to "compile" data from 2 Btye not contigu ?</div></div></div></blockquote></div><div class=""><br class=""></div><div class="">Nope, sorry, I don’t think the DBC file can handle that. See more of my thoughts on this below.</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""> 2. The next step do after dbc load, How I can use information the value to map or link with Standard metric ? </div></div></div></blockquote><div class=""><br class=""></div><div class="">I haven’t gotten to that bit yet, but have written (and just committed) a stub implementation, in case you (or others) have the time to help out. Otherwise, I’ll get to it after my work converting retools to use DBC.</div><div class=""><br class=""></div><div class="">None of the following has been implemented yet (except for stubs, and a very basic pure DBC vehicle implementation):</div><div class=""><br class=""></div><div class=""><ul class="gmail-m_1986604958053118096MailOutline"><li class="">The dbcSignal name is defined in the DBC as the name of an OVMS metric. Each dbcSignal object contains an m_metric, as a pointer to an OVMS metric, that can be set during initialisation based on a simple lookup of the metric name. That is in dbcSignal::AssignMetric(). I have done that in the dbcSignal constructor and SetName() functions, although it makes our DBC slightly non-standard conformant by allowing periods (“.”) in identifiers.<br class=""><br class=""></li><li class="">The dbcSignal contains a Encode(dbcNumber& source, struct CAN_frame_t* msg) function to encode a particular dbcNumber source number into the specified message. We would use this if we want to transmit data based on a dbc file. I don’t think implementing this is at all urgent, as that is not something we normally do (simulate a vehicle from within the ovms module firmware). This needs to be implemented in an efficient manner, supporting signed and unsigned numbers, and little and big endian types, as well as floats; but no hurry at all for this.<br class=""><br class=""></li><li class="">The dbcSignal contains a Decode(struct CAN_frame_t& msg) function to decode a particular CAN frame, and return a dbcNumber for the specified value. This is urgent now, and high up on my list to implement. However, it is non-trivial to do this in an efficient way, dealing with signed/unsigned, big/little endian, integers/floats, etc. The DBC specification treats everything as ‘double’, which would be horrendously inefficient.<br class=""><br class=""></li><li class="">There is also a DecodeMetric() in dbcSignal that can be built on top of Decode(), to decode straight into the signal’s ovms metric.<br class=""><br class=""></li><li class="">I have implemented the stub of a component vehicle_dbc, which implements class OvmsVehicleDBC derived from OvmsVehicle. The idea is that vehicles based on DBC files will do a few special things:<br class=""><br class=""></li><ul class=""><li class="">Derive from OvmsVehicleDBC, rather than OvmsVehicle.<br class=""></li><li class="">Provide DBC file in the vehicle source code directory, one for each CAN bus.</li><li class="">Embed those DBC files in the usual way (see web server for an example).</li><li class="">Rather than calling the usual OvmsVehicle::RegisterCanBus() to register each CAN bus, instead call OvmsVehicleDBC::RegisterCanBusDBC() with the extra parameter to specify the DBC file in memory.</li><li class="">At the start of the usual IncomingFrameCan1(), call OvmsVehicleDBC::IncomingFrameCan1 to allow the DBC system to look for and decode metrics from that incoming frame, based on the DBC file.</li><li class="">After the OvmsVehicleDBC::IncomingFrameCan1 does its work, control passes back to the vehicle to do whatever custom work it requires (such as decode messages not supported by the DBC format, etc).</li><li class="">IncomingFrameCan2, and IncomingFrameCan3 work in a similar way.</li><li class="">The main thing remaining to implement is the decoding of messages into metrics (via dbcSignal).<br class=""><br class=""></li></ul><li class="">I have also implemented a base pure DBC based vehicle type. That takes a DBC file stored on disk managed by the MyDBC system), and implement a vehicle with ZERO coding. You just configure the name of the DBC file, and everything is automatic from then onwards. For example:<br class=""><br class=""># config set vehicle dbc.can1 ts<br class=""># vehicle module dbc<br class="">I (36084) vehicle_dbc: Pure DBC vehicle module<br class="">I (36084) vehicle_dbc: Registering can bus #1 as DBC ts<br class=""><br class=""></li><li class="">Finally, we should also probably extend the DBC format to do some of the common stuff we do that the format doesn’t support. Character strings (such as VIN numbers) for example.</li></ul></div><div class=""><br class=""></div><div class="">The next step is the dbcSignal::Decode() and dbcSignal::DecodeMetric() functions.</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 8 Dec 2018, at 5:08 PM, Olivier <<a href="mailto:ogrums@gmail.com" target="_blank" class="">ogrums@gmail.com</a>> wrote:</div><br class="gmail-m_1986604958053118096Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">Hi Mark,<div class=""><br class=""></div><div class="">Before the update code is working to but with some error, I will fix my dbc file to add signal for all message.</div><div class=""><br class=""></div><div class="">I have two question :</div><div class="">1. do you know how to config the dbc file to "compile" data from 2 Btye not contigu ?</div><div class=""> Example : ID 00FDF040 8 0x85 0x85 0x81 0x6A 0x7A 0xD9 0x4C 0x2E // ID message contain 5 Cells Voltage</div><div class=""> Cell 1 : #Byte 0 (0x85) | #LowByte 5 (0x9) => 0x859 => 2137 * 0,0015 = 3,2055Volts</div><div class=""> Cell 2 : #Byte 1 (0x85) | #HighByte 5 (0xD) => 0x85D</div><div class=""> Cell 3 : #Byte 2 (0x81) | #LowByte 6 (0xC) => 0x81C </div><div class=""> Cell 4 : #Byte 3 (0x6A) | #HighByte 7 (0x4) => 0x6A4</div><div class=""> Cell 5 : #Byte 4 (0x7A) | #LowByte 8 (0xE) => 0x7AE</div><div class=""> the last Byte is the ID of BMS Board (0x2?)<br class=""></div><div class=""><br class=""></div><div class=""> 2. The next step do after dbc load, How I can use information the value to map or link with Standard metric ? </div><div class=""><br class=""></div><div class="">Thank you</div><div class="">Olivier</div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">Le ven. 7 déc. 2018 à 05:00, <<a href="mailto:ovmsdev-request@lists.openvehicles.com" target="_blank" class="">ovmsdev-request@lists.openvehicles.com</a>> a écrit :<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send OvmsDev mailing list submissions to<br class="">
<a href="mailto:ovmsdev@lists.openvehicles.com" target="_blank" class="">ovmsdev@lists.openvehicles.com</a><br class="">
<br class="">
To subscribe or unsubscribe via the World Wide Web, visit<br class="">
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class="">
or, via email, send a message with subject or body 'help' to<br class="">
<a href="mailto:ovmsdev-request@lists.openvehicles.com" target="_blank" class="">ovmsdev-request@lists.openvehicles.com</a><br class="">
<br class="">
You can reach the person managing the list at<br class="">
<a href="mailto:ovmsdev-owner@lists.openvehicles.com" target="_blank" class="">ovmsdev-owner@lists.openvehicles.com</a><br class="">
<br class="">
When replying, please edit your Subject line so it is more specific<br class="">
than "Re: Contents of OvmsDev digest..."<br class="">
<br class="">
<br class="">
Today's Topics:<br class="">
<br class="">
1. Re: OvmsDev Digest, Vol 83, Issue 3 (Mark Webb-Johnson)<br class="">
<br class="">
<br class="">
----------------------------------------------------------------------<br class="">
<br class="">
Message: 1<br class="">
Date: Fri, 7 Dec 2018 09:19:41 +0800<br class="">
From: Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" target="_blank" class="">mark@webb-johnson.net</a>><br class="">
To: OVMS Developers <<a href="mailto:ovmsdev@lists.openvehicles.com" target="_blank" class="">ovmsdev@lists.openvehicles.com</a>><br class="">
Subject: Re: [Ovmsdev] OvmsDev Digest, Vol 83, Issue 3<br class="">
Message-ID: <<a href="mailto:4F23B219-BDC5-4DA2-BAED-CC8380ABC720@webb-johnson.net" target="_blank" class="">4F23B219-BDC5-4DA2-BAED-CC8380ABC720@webb-johnson.net</a>><br class="">
Content-Type: text/plain; charset="utf-8"<br class="">
<br class="">
Olivier,<br class="">
<br class="">
Glad to see it is working again. I re-worked the dbc parsing code yesterday to allow sections to be in any order in the DBC (although the formal specification defines a specific order). That fixed your problem with loading the DBC?<br class="">
<br class="">
I tried your provided Vectrix_VX1.dbc with the day before yesterday?s 1bce372b20d4a79fb633faa6b96574604d95272f code, and get a segmentation fault on parsing it. With today?s master head, no problems and the file seems to load ok. The problem is the line 'BO_ 2164185677 FrontSensorRevision: 8 FRONTSensor? - a message (BO_) without any signals (SG_). The newer code doesn?t care, but the older code couldn?t handle it.<br class="">
<br class="">
Regarding opendbc, yes I am aware of that. A very good resource. But, most (if not all) of those DBCs there have illegal structure. I think they are only used for human (not machine) reference. Things like section terms mis-spelled, missing semi-colons, values referring to signals or messages that don?t exist, etc. It is a good resource for testing broken DBC files ;-)<br class="">
<br class="">
Regards, Mark.<br class="">
<br class="">
> On 7 Dec 2018, at 4:37 AM, Olivier <<a href="mailto:ogrums@gmail.com" target="_blank" class="">ogrums@gmail.com</a>> wrote:<br class="">
> <br class="">
> Hello Mark,<br class="">
> <br class="">
> It's strange, I have re-clone again to be sure about IDF, <br class="">
> <br class="">
> $ git describe --tags --dirty<br class="">
> v3.1-dev-2835-g151269458<br class="">
> <br class="">
> And now both is working, SD read and load dbc<br class="">
> <br class="">
> I have add my dbc file, and if you want to test the is this git : <a href="https://github.com/commaai/opendbc" rel="noreferrer" target="_blank" class="">https://github.com/commaai/opendbc</a> <<a href="https://github.com/commaai/opendbc" rel="noreferrer" target="_blank" class="">https://github.com/commaai/opendbc</a>><br class="">
> <br class="">
> regards,<br class="">
> Olivier<br class="">
> <br class="">
> Le jeu. 6 d?c. 2018 ? 05:16, <<a href="mailto:ovmsdev-request@lists.openvehicles.com" target="_blank" class="">ovmsdev-request@lists.openvehicles.com</a> <mailto:<a href="mailto:ovmsdev-request@lists.openvehicles.com" target="_blank" class="">ovmsdev-request@lists.openvehicles.com</a>>> a ?crit :<br class="">
> Send OvmsDev mailing list submissions to<br class="">
> <a href="mailto:ovmsdev@lists.openvehicles.com" target="_blank" class="">ovmsdev@lists.openvehicles.com</a> <mailto:<a href="mailto:ovmsdev@lists.openvehicles.com" target="_blank" class="">ovmsdev@lists.openvehicles.com</a>><br class="">
> <br class="">
> To subscribe or unsubscribe via the World Wide Web, visit<br class="">
> <a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a> <<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>><br class="">
> or, via email, send a message with subject or body 'help' to<br class="">
> <a href="mailto:ovmsdev-request@lists.openvehicles.com" target="_blank" class="">ovmsdev-request@lists.openvehicles.com</a> <mailto:<a href="mailto:ovmsdev-request@lists.openvehicles.com" target="_blank" class="">ovmsdev-request@lists.openvehicles.com</a>><br class="">
> <br class="">
> You can reach the person managing the list at<br class="">
> <a href="mailto:ovmsdev-owner@lists.openvehicles.com" target="_blank" class="">ovmsdev-owner@lists.openvehicles.com</a> <mailto:<a href="mailto:ovmsdev-owner@lists.openvehicles.com" target="_blank" class="">ovmsdev-owner@lists.openvehicles.com</a>><br class="">
> <br class="">
> When replying, please edit your Subject line so it is more specific<br class="">
> than "Re: Contents of OvmsDev digest..."<br class="">
> <br class="">
> <br class="">
> Today's Topics:<br class="">
> <br class="">
> 1. Re: Issue to store en SD Card after upgrade to idf 3.2-Dev<br class="">
> (Pull Request 2# from M4GNV5/master) (Mark Webb-Johnson)<br class="">
> <br class="">
> <br class="">
> ----------------------------------------------------------------------<br class="">
> <br class="">
> Message: 1<br class="">
> Date: Thu, 6 Dec 2018 08:59:57 +0800<br class="">
> From: Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" target="_blank" class="">mark@webb-johnson.net</a> <mailto:<a href="mailto:mark@webb-johnson.net" target="_blank" class="">mark@webb-johnson.net</a>>><br class="">
> To: OVMS Developers <<a href="mailto:ovmsdev@lists.openvehicles.com" target="_blank" class="">ovmsdev@lists.openvehicles.com</a> <mailto:<a href="mailto:ovmsdev@lists.openvehicles.com" target="_blank" class="">ovmsdev@lists.openvehicles.com</a>>><br class="">
> Subject: Re: [Ovmsdev] Issue to store en SD Card after upgrade to idf<br class="">
> 3.2-Dev (Pull Request 2# from M4GNV5/master)<br class="">
> Message-ID: <<a href="mailto:5B58BB15-BEB4-4B9E-AAFC-E98DFA176748@webb-johnson.net" target="_blank" class="">5B58BB15-BEB4-4B9E-AAFC-E98DFA176748@webb-johnson.net</a> <mailto:<a href="mailto:5B58BB15-BEB4-4B9E-AAFC-E98DFA176748@webb-johnson.net" target="_blank" class="">5B58BB15-BEB4-4B9E-AAFC-E98DFA176748@webb-johnson.net</a>>><br class="">
> Content-Type: text/plain; charset="utf-8"<br class="">
> <br class="">
> And related to this, if anyone else has any DBC files, please send them to me so that I can test them against our DBC support library (to test for robustness and completeness).<br class="">
> <br class="">
> Regards, Mark<br class="">
> <br class="">
> > On 6 Dec 2018, at 7:54 AM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" target="_blank" class="">mark@webb-johnson.net</a> <mailto:<a href="mailto:mark@webb-johnson.net" target="_blank" class="">mark@webb-johnson.net</a>>> wrote:<br class="">
> > <br class="">
> > Olivier,<br class="">
> > <br class="">
> > I think this is two different issues.<br class="">
> > <br class="">
> > SD card issue<br class="">
> > <br class="">
> > Are there any system-level errors shown in the logs when you try this? Please try on local console to see what is shown there.<br class="">
> > <br class="">
> > Are you powered from USB or vehicle power?<br class="">
> > <br class="">
> > Can you show the output of ?config list sdcard? and ?sd status??<br class="">
> > <br class="">
> > DBC load issue<br class="">
> > <br class="">
> > Can you send me the Vectrix.dbc file you are using, please. Most likely something in the structure of this file is causing the crash. It seems that one of the messages (BO_) cannot be parsed correctly.<br class="">
> > <br class="">
> > What version of IDF are you using now? Just master head, right?<br class="">
> > <br class="">
> > Regards, Mark.<br class="">
> > <br class="">
> >> On 6 Dec 2018, at 4:29 AM, Olivier <<a href="mailto:ogrums@gmail.com" target="_blank" class="">ogrums@gmail.com</a> <mailto:<a href="mailto:ogrums@gmail.com" target="_blank" class="">ogrums@gmail.com</a>> <mailto:<a href="mailto:ogrums@gmail.com" target="_blank" class="">ogrums@gmail.com</a> <mailto:<a href="mailto:ogrums@gmail.com" target="_blank" class="">ogrums@gmail.com</a>>>> wrote:<br class="">
> >> <br class="">
> >> Hello,<br class="">
> >> <br class="">
> >> I have some issue with SD Card on OVMS 3.1 I don't know how to fix the "bug"<br class="">
> >> <br class="">
> >> I can't write or read file on SD Card, but I can make directory :<br class="">
> >> <br class="">
> >> OVMS# vfs ls /sd<br class="">
> >> [DIR] 05-Nov-2018 20:46 logs/<br class="">
> >> 13.5k 23-Nov-2018 19:45 Vectrix_bak.dbc<br class="">
> >> 14.0k 11-Nov-2018 22:04 Vectrix.dbc<br class="">
> >> 13 01-Jan-1980 00:00 FOO.TXT<br class="">
> >> 13.5k 23-Nov-2018 19:45 vx1.dbc<br class="">
> >> <br class="">
> >> OVMS# vfs mkdir /sd/testdir<br class="">
> >> VFS directory created<br class="">
> >> <br class="">
> >> OVMS# vfs ls /sd<br class="">
> >> [DIR] 05-Nov-2018 20:46 logs/<br class="">
> >> 13.5k 23-Nov-2018 19:45 Vectrix_bak.dbc<br class="">
> >> 14.0k 11-Nov-2018 22:04 Vectrix.dbc<br class="">
> >> [DIR] 05-Dec-2018 21:14 testdir/<br class="">
> >> 13 01-Jan-1980 00:00 FOO.TXT<br class="">
> >> 13.5k 23-Nov-2018 19:45 vx1.dbc<br class="">
> >> <br class="">
> >> OVMS# config backup /sd/cfg.zip<br class="">
> >> Creating config backup '/sd/cfg.zip'...<br class="">
> >> Error: zip failed: No such file or directory<br class="">
> >> <br class="">
> >> OVMS# vfs rmdir /sd/testdir<br class="">
> >> VFS directory removed<br class="">
> >> <br class="">
> >> And If I try do load dbc file it's crash <br class="">
> >> <br class="">
> >> OVMS# dbc load test /sd/vx1.dbc<br class="">
> >> <br class="">
> >> Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.<br class="">
> >> Core 1 register dump:<br class="">
> >> PC : 0x40271023 PS : 0x00060730 A0 : 0x800e38f1 A1 : 0x3ffd4540<br class="">
> >> 0x40271023: dbcMessage::SetID(unsigned int) at ?????/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc.cpp:935<br class="">
> >> <br class="">
> >> A2 : 0x00000000 A3 : 0x80feda4d A4 : 0x3ffe5360 A5 : 0x3ffe5363<br class="">
> >> A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000020 A9 : 0x3f4055b0<br class="">
> >> A10 : 0x00000001 A11 : 0x3f4061ce A12 : 0x3f81ec50 A13 : 0x00000000<br class="">
> >> A14 : 0x3ffd4524 A15 : 0x00000000 SAR : 0x00000008 EXCCAUSE: 0x0000001d<br class="">
> >> EXCVADDR: 0x0000001c LBEG : 0x4009bd69 LEND : 0x4009bd9d LCOUNT : 0xffffffff<br class="">
> >> <br class="">
> >> 0x4009bd69: memcpy at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memcpy.S:291<br class="">
> >> 0x4009bd9d: memcpy at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memcpy.S:324<br class="">
> >> <br class="">
> >> Backtrace: 0x40271023:0x3ffd4540 0x400e38ee:0x3ffd4560 0x400dfeba:0x3ffd4ea0 0x400dea49:0x3ffd4ee0 0x400dec48:0x3ffd4f80 0x400f118a:0x3ffd4fa0 0x400f129b:0x3ffd4fd0 0x400f129b:0x3ffd5000 0x400f12<br class="">
> >> d1:0x3ffd5030 0x400ecae8:0x3ffd5050 0x4010601d:0x3ffd5070 0x4010608e:0x3ffd50d0 0x400ecb1f:0x3ffd5110 0x40271193:0x3ffd5130 0x401010a9:0x3ffd5150 0x400fa5cd:0x3ffd5180 0x400fa7e1:0x3ffd51b0 0x401<br class="">
> >> 00f35:0x3ffd51d0 0x40100f44:0x3ffd51f0 0x400f2489:0x3ffd5210<br class="">
> >> <br class="">
> >> 0x40271023: dbcMessage::SetID(unsigned int) at ?????/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc.cpp:935<br class="">
> >> 0x400e38ee: yyparse(void*) at ?????/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc_parser.y:306<br class="">
> >> 0x400dfeba: dbcfile::LoadFile(char const*, __sFILE*) at ?????/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc.cpp:935<br class="">
> >> 0x400dea49: dbc::LoadFile(char const*, char const*) at ?????/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc_app.cpp:198<br class="">
> >> 0x400dec48: dbc_load(int, OvmsWriter*, OvmsCommand*, int, char const* const*) at ?????/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc_app.cpp:62<br class="">
> >> 0x400f118a: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at ?????/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_command.cpp:73<br class="">
> >> 0x400f129b: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at ?????/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_command.cpp:73<br class="">
> >> 0x400f129b: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at ?????/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_command.cpp:73<br class="">
> >> 0x400f12d1: OvmsCommandApp::Execute(int, OvmsWriter*, int, char const* const*) at ?????/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_command.cpp:73<br class="">
> >> <br class="">
> >> I Have try my SD Card on a PC is working, I have try example code "sd_card_example_main.c" from SDK "esp-idf\examples\storage\sd_card\main", It's working to, no crash. <br class="">
> >> My guest, is the hardware is OK, esp-idf is OK, but they is something in OVMS main code make this bug.<br class="">
> >> <br class="">
> >> I have delete both esp-idf, and OVMS folder and clone again, compiled again, but it's the same issue.<br class="">
> >> <br class="">
> >> Thank you for your help.<br class="">
> >> Olivier<br class="">
> >> _______________________________________________<br class="">
> >> OvmsDev mailing list<br class="">
> >> <a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a> <mailto:<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a>> <mailto:<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a> <mailto:<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a>>><br class="">
> >> <a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a> <<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>><br class="">
> > <br class="">
> > _______________________________________________<br class="">
> > OvmsDev mailing list<br class="">
> > <a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a> <mailto:<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a>><br class="">
> > <a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a> <<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>><br class="">
> <br class="">
> -------------- next part --------------<br class="">
> An HTML attachment was scrubbed...<br class="">
> URL: <<a href="http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20181206/8ceb27f0/attachment-0001.html" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20181206/8ceb27f0/attachment-0001.html</a> <<a href="http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20181206/8ceb27f0/attachment-0001.html" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20181206/8ceb27f0/attachment-0001.html</a>>><br class="">
> <br class="">
> ------------------------------<br class="">
> <br class="">
> Subject: Digest Footer<br class="">
> <br class="">
> _______________________________________________<br class="">
> OvmsDev mailing list<br class="">
> <a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a> <mailto:<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a>><br class="">
> <a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a> <<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>><br class="">
> <br class="">
> <br class="">
> ------------------------------<br class="">
> <br class="">
> End of OvmsDev Digest, Vol 83, Issue 3<br class="">
> **************************************<br class="">
> <Vectrix_VX1.dbc>_______________________________________________<br class="">
> OvmsDev mailing list<br class="">
> <a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a><br class="">
> <a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class="">
<br class="">
-------------- next part --------------<br class="">
An HTML attachment was scrubbed...<br class="">
URL: <<a href="http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20181207/34756cd8/attachment-0001.html" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20181207/34756cd8/attachment-0001.html</a>><br class="">
<br class="">
------------------------------<br class="">
<br class="">
Subject: Digest Footer<br class="">
<br class="">
_______________________________________________<br class="">
OvmsDev mailing list<br class="">
<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a><br class="">
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class="">
<br class="">
<br class="">
------------------------------<br class="">
<br class="">
End of OvmsDev Digest, Vol 83, Issue 5<br class="">
**************************************<br class="">
</blockquote></div>
_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a><br class=""><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">
OvmsDev mailing list<br class="">
<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank" class="">OvmsDev@lists.openvehicles.com</a><br class="">
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class="">
</blockquote></div></div></div>
_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></div></body></html>