<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Quick test, using the OBDII ECU Simulator and an OBDwiz dongle. It
still appears to be working, both standard and extended mode. No
telling if it's right, but it works. :)<br>
<br>
Greg<br>
<br>
<br>
<div class="moz-cite-prefix">Mark Webb-Johnson wrote:<br>
</div>
<blockquote type="cite"
cite="mid:3CBEFB5B-1093-42CD-897B-3C24F8AEB210@webb-johnson.net">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
This didn’t seem to work, so I made some further refinements.
Documentation on MCP2515 datasheet is not very clear. From what I
can tell, the receive registers are setup like this:
<div class=""><br class="">
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding:
0px;" class="">
<div class=""><font class="" face="Andale Mono"><span
style="font-size: 18px;" class="">Register Standard
Extended</span></font></div>
<div class=""><font class="" face="Andale Mono"><span
style="font-size: 18px;" class="">SIDH (0x61) 7:0
28:21</span></font></div>
<div class=""><font class="" face="Andale Mono"><span
style="font-size: 18px;" class="">SIDL (0x62) 7:5
20:18, 17:16</span></font></div>
<div class=""><font class="" face="Andale Mono"><span
style="font-size: 18px;" class="">EID8 (0x63) n/a
15:8</span></font></div>
<div class=""><font class="" face="Andale Mono"><span
style="font-size: 18px;" class="">EID0 (0x64) n/a
7:0</span></font></div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">and the SIDL bit 3 (IDE) is 1 for extended and 0 for
standard.</div>
<div class=""><br class="">
</div>
<div class="">I implemented it like that, and it now seems to
co-exists between the MCP2515 and ESP32 native CAN in both
standard and extended modes. Of course, both implementations
could now be wrong, but at least they match ;-) Need to try it
out on something real, to be certain it is fixed now.</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 10 Oct 2017, at 4:20 AM, Greg D. <<a
href="mailto:gregd2350@gmail.com" class=""
moz-do-not-send="true">gregd2350@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hi folks, (Mark, in particular),<br
class="">
<br class="">
I've tweaked the mcp2515.cpp code to support Extended
CAN frames on CAN<br class="">
2 & 3. Needed this for the OBD2ECU code, but it's
there for anyone else<br class="">
who may want it.<br class="">
<br class="">
Mark - I did a bit of this by trial & error, since
some of what I was<br class="">
doing wasn't working as I expected it would. Bits
upside down, that<br class="">
sort of thing... So I expect some of the middle bits
around the three<br class="">
frame flags is wrong, particularly on the transmit side,
but for the<br class="">
PIDs I use, the results I get match what Wireshark
decodes. So, I think<br class="">
it's close.<br class="">
<br class="">
Greg<br class="">
<br class="">
p.s. Got my first CAN 3 bus hang too... hope it's not
related. :)<br class="">
_______________________________________________<br
class="">
OvmsDev mailing list<br class="">
<a href="mailto:OvmsDev@lists.teslaclub.hk" class=""
moz-do-not-send="true">OvmsDev@lists.teslaclub.hk</a><br
class="">
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br
class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
</body>
</html>