J1939 Protocol on Carloop

How to request VIN # via J1939

Thanks
David

@davidsi, I moved this to a new topic as the other thread was about CAN-Extended format, (VIN # was just an example used in that thread).

Requesting the VIN # is done according to the OBDII messaging specification.
How you send & receive the message can be different according to the low-level communications protocol and the hardware protocol.

For that, we have to work through J1939. J1939 is based on CAN, but is different and has some restrictions.
Let’s start with the hardware questions.

Does your heavy equipment actually store its VIN # in its electronic control unit?
It is required for road vehicles, but you do not indicate if you are dealing with a road vehicle or some other heavy equipment.

Does your equipment have an OBDII connector? Does your machine operate off of 12 volts or 24 volts or something else? If you have an OBDII connector on 12 V, then you can use the Carloop hardware. If you have an OBDII connector on 24V, you will need to change the Carloop hardware design to use a 24 V OBDII connector and change the power supply circuitry ( an IC and a couple of resistors & capacitors). Something else might require a bit more extensive hardware design. Let us know what your situation is.

Now, on to the code.

As for your firmware to program the Carloop (or your modified version of Carloop), you should start with the VIN Example here:
https://www.carloop.io/apps/app-vin-reader
This app reads the VIN # for a normal car using the regular CAN bus. This might work as-is, but I doubt it. Most likely, you will have to adjust the code so that the CAN messages follow the format for J1939. It should not be a difficult change, to make sure the right information goes in the right place within the messages.

You can read this (and the links there) for more information on J1939 to help you get started:

All of the Carloop design is open-source and is available on GitHub.
There are repositories for the Hardware, the Carloop library and all the example apps.

This sounds like an interesting project … let us know how you are doing and if we can answer anything more!