RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Sat Feb 21, 2026 5:12 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: SSM2 via CAN with MCP2515
PostPosted: Wed Jun 06, 2012 10:30 pm 
Offline
Experienced

Joined: Sun Oct 16, 2011 7:57 am
Posts: 150
Hi guys,

I'm currently playing with the concept of reading in SSM2 via CAN using a microcontroller. I have an MCP2515 working with some demo arduino code, reading on standard OBDII stuff.

The MCP2515 seems to have only 8 bytes of data buffer per message - which appears to be a problem, as some of the messages in SSM2 via CAN are greater than 8 bytes long. For instance, the ECU init process is huge.

I've looked at other CAN controllers, such as the AVR-CAN series of microcontrollers, they too seem to only support 8 bytes.

Am I interpreting the data-sheets in correctly, or am I right in my understanding that these 8-byte controllers are not sufficient for SSM ?

Thanks,

Adrian


Top
 Profile  
 
 Post subject: Re: SSM2 via CAN with MCP2515
PostPosted: Wed Jun 06, 2012 11:13 pm 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
You will need to double buffer on the receive side. Your code should read the 8 byte CAN message, extract the payload and then buffer it some where appending the remaining parts of the message until it's complete. The SSM protocol will tell you how many bytes to expect after the header has been detected.


Top
 Profile  
 
 Post subject: Re: SSM2 via CAN with MCP2515
PostPosted: Thu Jun 07, 2012 11:48 am 
Offline
Experienced

Joined: Sun Oct 16, 2011 7:57 am
Posts: 150
okay..

so i'm a little confused. i've done some more reading since my original post, and read all about iso-tp/iso15765-2 being required for segmentation across multiple can messages.

Do I effectively need to code my own iso-tp "middleware" that sits in between my SSM send/receive routines, and the lower layer MCP2515 driver ?

Or does the SSM protocol sit directly above the CAN physical/data-link layer protocols ?


Top
 Profile  
 
 Post subject: Re: SSM2 via CAN with MCP2515
PostPosted: Thu Jun 07, 2012 1:57 pm 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
SSM -> ISO15765-2 -> CAN.
Here's a bit of info you can digest:
http://subdiesel.wordpress.com/generic/ ... 2-via-can/


Top
 Profile  
 
 Post subject: Re: SSM2 via CAN with MCP2515
PostPosted: Mon Jun 18, 2012 12:56 am 
Offline
Newbie

Joined: Fri Oct 14, 2011 2:40 am
Posts: 34
aijii wrote:
okay..

so i'm a little confused. i've done some more reading since my original post, and read all about iso-tp/iso15765-2 being required for segmentation across multiple can messages.

Do I effectively need to code my own iso-tp "middleware" that sits in between my SSM send/receive routines, and the lower layer MCP2515 driver ?

Or does the SSM protocol sit directly above the CAN physical/data-link layer protocols ?


Yes - you do need to implement the iso15765-2 protocol (multi frame messages). SSM2 or OBD-II sits on top.

Are you using the arduino can bus shield ? The example code that comes with that basically implements the simple single frame case of iso15765-2. Extending it to handle the multi frame case is a bit of work, but not too hard.

I have done this using the MPC2515 (can bus shield) on an arduino and it works perfectly - used http://en.wikipedia.org/wiki/ISO_15765-2 as a reference.


Top
 Profile  
 
 Post subject: Re: SSM2 via CAN with MCP2515
PostPosted: Mon Aug 06, 2012 2:40 am 
Offline
Newbie

Joined: Tue Nov 14, 2006 6:05 pm
Posts: 63
alpine9000 wrote:
aijii wrote:
okay..

so i'm a little confused. i've done some more reading since my original post, and read all about iso-tp/iso15765-2 being required for segmentation across multiple can messages.

Do I effectively need to code my own iso-tp "middleware" that sits in between my SSM send/receive routines, and the lower layer MCP2515 driver ?

Or does the SSM protocol sit directly above the CAN physical/data-link layer protocols ?


Yes - you do need to implement the iso15765-2 protocol (multi frame messages). SSM2 or OBD-II sits on top.

Are you using the arduino can bus shield ? The example code that comes with that basically implements the simple single frame case of iso15765-2. Extending it to handle the multi frame case is a bit of work, but not too hard.

I have done this using the MPC2515 (can bus shield) on an arduino and it works perfectly - used http://en.wikipedia.org/wiki/ISO_15765-2 as a reference.



care to share your source code?


Top
 Profile  
 
 Post subject: Re: SSM2 via CAN with MCP2515
PostPosted: Thu Sep 06, 2012 4:23 am 
Offline
Newbie

Joined: Fri Oct 14, 2011 2:40 am
Posts: 34
PM me if you want the code..

Its a hacked version of the canbus shield code, its not really in a state where I want to "release" it as I got seriously side tracked and have not worked on that project for a few months, but happy to share.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl