Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 46

Thread: CANbus 2-wire to USB adapter

  1. #21
    Low Bitrate
    Join Date
    Jul 2009
    Location
    Squamish, BC
    Posts
    93
    I'm doing OBDII calls and making reading CAN signals that are broadcast.

    SSM is on my todo list. With a Tatrix cable you can get a quick start with the RomRaider source code.

    I don't mind sharing but just not while it is in such a mess. I can find my way around but having chopped and changed the code so much it's not pretty (yet).

  2. #22
    Newbie
    Join Date
    Jul 2009
    Location
    Brighton Illinois
    Posts
    4
    Quote Originally Posted by Petrie View Post
    SSM is on my todo list. With a Tatrix cable you can get a quick start with the RomRaider source code.
    Yeah I have taken a look at the RomRaider code, many months ago, and for some reason I thought it just used k-line logging, not CAN. However, I do have a document outlining SSM along with the request IDs for the various parameters.

    Matthew

  3. #23
    Low Bitrate
    Join Date
    Jul 2009
    Location
    Squamish, BC
    Posts
    93

    Progress with SSM

    Here's an update for those of you monitoring this thread...

    I am using the LAWICEL can adapter which comes with a driver library (www.canusb.com). I have it tapped into the OBD2 port behind the connector so I can sniff packets from other diagnostic tools. However, most Subaru software (like RomRaider) don't use CAN they use K-Line & SSM, so sniffing is useless without a separate CAN diagnostic tool.

    Before you start building code, go here to download an off the shelf can monitor (http://www.canusb.com/projects.htm). Once you are connected, all you have to do is switch the ignition on and the software starts logging can messages. It could not be easier.

    I have made progress with the standard broadcast messages that don't need to be requested but have concentrated on standard and enhanced OBD2 requests.

    Just to confirm...
    The adapter uses just three pins on the OBD2 port
    CAN High is pin 7
    CAN Low is pin 2
    CAN ground is pin 3

    When you use the OBD2 port the speed should be set @ 500
    The can bus connected to the radio is speed 125

    Can messages to the ECU use arbitration id 7E0
    You must always use a DLC (data length control) of 8 for CAN

    To request engine coolant temperature, use this message (OBD pid=0x05)
    7E0 8 02 01 05 00 00 00 00 00

    dlc = 8
    data portion must start with how many bytes are part of the message (02)
    service id is always next (01=current powertrain data)
    05 is the OBD pid for coolant temperature.

    Use this message to request 3 signals; coolant temp, intake manifold pressure (0x0B) and ambient pressure (0x33) [manifold - ambient == turbo boost]
    7E0 8 02 01 05 0B 33 00 00 00

    Using the Can Monitor I suggested above you will see the response come back on 7E0+8 = 7E8
    To know that the response is meant for you the service id will be 0x40+what you sent= 0x41 in these examples. Note that if you bundle pids into a single request you will need to handle a multiframe response.

    To start with, stick to a single PID per request and then you only have a simple single frame response to deal with.

    On the OBD2 bus I'm able to log more than 100 parameters per second using multiframe. When I did a road dyno pull to power the Airboy spreadsheet I had to turn down the logging frequency because I could pull responses quicker than the ECU could receive an update of the data (lots of duplicate responses).

    Here's a fun thing for those of you with a modern Subaru...
    If you look at the logger.xml definitions in RomRaider you can see that they use a three byte address (like 0x000008). You get the response on CAN using service A8 and a 4 byte address

    7E0 8 05 A8 00 00 00 08 00 00

    Here's a useful link about CAN and messaging...
    http://www.canbushack.com/blog/index.php

    Enjoy,
    Peter

  4. #24
    Newbie
    Join Date
    Aug 2010
    Location
    australia
    Posts
    6
    Quote Originally Posted by Petrie View Post
    Here's an update for those of you monitoring this thread...

    I am using the LAWICEL can adapter which comes with a driver library (www.canusb.com). I have it tapped into the OBD2 port behind the connector so I can sniff packets from other diagnostic tools. However, most Subaru software (like RomRaider) don't use CAN they use K-Line & SSM, so sniffing is useless without a separate CAN diagnostic tool.

    Before you start building code, go here to download an off the shelf can monitor (http://www.canusb.com/projects.htm). Once you are connected, all you have to do is switch the ignition on and the software starts logging can messages. It could not be easier.

    I have made progress with the standard broadcast messages that don't need to be requested but have concentrated on standard and enhanced OBD2 requests.

    Just to confirm...
    The adapter uses just three pins on the OBD2 port
    CAN High is pin 7
    CAN Low is pin 2
    CAN ground is pin 3

    When you use the OBD2 port the speed should be set @ 500
    The can bus connected to the radio is speed 125

    Can messages to the ECU use arbitration id 7E0
    You must always use a DLC (data length control) of 8 for CAN

    To request engine coolant temperature, use this message (OBD pid=0x05)
    7E0 8 02 01 05 00 00 00 00 00

    dlc = 8
    data portion must start with how many bytes are part of the message (02)
    service id is always next (01=current powertrain data)
    05 is the OBD pid for coolant temperature.

    Use this message to request 3 signals; coolant temp, intake manifold pressure (0x0B) and ambient pressure (0x33) [manifold - ambient == turbo boost]
    7E0 8 02 01 05 0B 33 00 00 00

    Using the Can Monitor I suggested above you will see the response come back on 7E0+8 = 7E8
    To know that the response is meant for you the service id will be 0x40+what you sent= 0x41 in these examples. Note that if you bundle pids into a single request you will need to handle a multiframe response.

    To start with, stick to a single PID per request and then you only have a simple single frame response to deal with.

    On the OBD2 bus I'm able to log more than 100 parameters per second using multiframe. When I did a road dyno pull to power the Airboy spreadsheet I had to turn down the logging frequency because I could pull responses quicker than the ECU could receive an update of the data (lots of duplicate responses).

    Here's a fun thing for those of you with a modern Subaru...
    If you look at the logger.xml definitions in RomRaider you can see that they use a three byte address (like 0x000008). You get the response on CAN using service A8 and a 4 byte address

    7E0 8 05 A8 00 00 00 08 00 00

    Here's a useful link about CAN and messaging...
    http://www.canbushack.com/blog/index.php

    Enjoy,
    Peter

  5. #25
    Newbie
    Join Date
    Aug 2010
    Location
    australia
    Posts
    6
    Hello Petrie, greetings from Australia.
    I read with interest your work with Lawicel CANUSB and Subaru.
    I am in the process of doing similar things. The vehicle in question is a subaru outback 2008, CAN 11 bit 500 kbps EOBD diagnostic system. The vehicle has a simple CAN bus (linking ECM, ABS, Body Integrated Unit), the vehicle is manual trans, so no TCM, stability control is not fitted. All in all a fairly simple system. Ultimately I would like to be able to obtain information from the ABS control module, but this might be difficult as there is not a standard similar to OBD2 for ABS.
    I have hooked up the CANUSB to the data link connector and to CAN Monitor sw (the free version from WG Soft). I can obtain broadcast CAN messages. There are 11 different messages, 410, 411, 412, 501, 511, 512, 513, 514, 600, 601, 620, the format is typically 410 8 nn nn nn nn nn nn nn nn, these are legitimate 11 bit CAN messages, so far I do not know what the messages are, but hope to sort out via trial and error at a later stage.
    The next step was to request diagnostic information, much as you describe (post 7 26 2010). I attempted to send a request 7E0 8 02 01 05 00 00 00 00 00 ( to obtain engine coolant temp), but did not get a reply. I believe the message was sent, as there was not a send "failure error", simply no reply.
    Have you any thoughts, or advice on what might be the problem ?

    Cheers
    Peter

  6. #26
    Low Bitrate
    Join Date
    Jul 2009
    Location
    Squamish, BC
    Posts
    93
    You picked a simple value that's already available in the broadcast stream.
    CANID=600, byte 4 contains the coolant temp. Value-40 == Celcius
    Byte 7 should set bit 0x04 when you put the clutch in.

    Other than that, the message looks good. Start by asking 00 of service 01 to get a list of PIDs that are supported by your car. Then 20,40 etc... for the higher ranges.

    Other things to try...
    Make sure you don't have read-only/listen-only switched on.
    Make sure you don't have any filters/masks applied.

    FYI:
    I use canhacker v2.
    http://www.canhack.de/download/CANHackerV2.00.01.zip
    It's been an excellent tool in my discovery process

    411, byte 5 is the gear you are in
    511 is steering and pedals (like brake pedal pressure) steering angle and direction

    PS. Greetings to you too mate.

  7. #27
    Low Bitrate
    Join Date
    Jul 2009
    Location
    Squamish, BC
    Posts
    93
    One additional point to make...

    If you request a PID that is unsupported the service will not respond. That's dictated by CAN. If you make a request that is poorly constructed you will get an error condition returned.

  8. #28
    VENDOR - ScanTool Vitaliy's Avatar
    Join Date
    Dec 2006
    Location
    Phoenix, AZ
    Posts
    624
    Quote Originally Posted by Petrie View Post
    One additional point to make...

    If you request a PID that is unsupported the service will not respond. That's dictated by CAN. If you make a request that is poorly constructed you will get an error condition returned.
    Really? I thought "the ECU shall not respond to Service $01 unsupported PID request" was a J1979 mandate.

    Vitaliy
    OBDLink MX: world's smallest, fastest, most advanced OBD/Bluetooth adapter with SW and MS CAN support. Read the review to learn more.
    Need to look up a diagnostic trouble code? Try the most up-to-date, free DTCsearch.com!

    You cannot send me a private message using this forum. Use my email instead: vitaliy[@]scantool.net.

  9. #29
    Low Bitrate
    Join Date
    Jul 2009
    Location
    Squamish, BC
    Posts
    93
    That's exactly what I said.
    No response will be sent to a request for an unsupported PID

  10. #30
    VENDOR - ScanTool Vitaliy's Avatar
    Join Date
    Dec 2006
    Location
    Phoenix, AZ
    Posts
    624
    Quote Originally Posted by Petrie View Post
    That's exactly what I said.
    No response will be sent to a request for an unsupported PID
    You said "That's dicated by CAN". I'm simply pointing out that as far as I know, CAN places no such restrictions, it's a J1979 thing.

    Very cool project.

    Vitaliy
    OBDLink MX: world's smallest, fastest, most advanced OBD/Bluetooth adapter with SW and MS CAN support. Read the review to learn more.
    Need to look up a diagnostic trouble code? Try the most up-to-date, free DTCsearch.com!

    You cannot send me a private message using this forum. Use my email instead: vitaliy[@]scantool.net.

Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. FAQ: How to Wire an OPUS PSU
    By Quattro in forum The FAQ Emporium
    Replies: 74
    Last Post: 08-26-2006, 12:38 PM
  2. Problem with ITPS / hibernation and External USB HD
    By veetid in forum Power Supplies
    Replies: 5
    Last Post: 01-02-2006, 08:35 PM
  3. My USB/Wifi troubles.
    By JPuma in forum General Hardware Discussion
    Replies: 0
    Last Post: 09-23-2005, 11:44 AM
  4. usb power problem: solved!
    By susman in forum General Hardware Discussion
    Replies: 16
    Last Post: 08-31-2004, 01:50 AM
  5. USB 2.0 to ide adapter, anybody got one of these working
    By Batmanatthenewb in forum Input Devices
    Replies: 39
    Last Post: 08-16-2004, 02:23 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •