Questions tagged [j1939]

CAN bus standard SAE J1939 is the recommended practice used for communication and diagnostics among vehicle components. Originating in the car and heavy-duty truck industry in the United States, it is now widely used in other parts of the world.

From the Wikipedia page on SAE J1939:

SAE J1939 defines five layers in the seven-layer OSI network model, and this includes the Controller Area Network (CAN) ISO 11898 specification (using only the 29-bit/"extended" identifier) for the physical and data-link layers. Under J1939/11 and J1939/15, the data rate is specified as 250 kbit/s, with J1939/14 specifying 500 kbit/s. The session and presentation layers are not part of the specification. The later use of CAN FD is currently discussed.

All J1939 packets, except for the request packet, contain eight bytes of data and a standard header which contains an index called Parameter Group Number (PGN), which is embedded in the message's 29-bit identifier. A PGN identifies a message's function and associated data. J1939 attempts to define standard PGNs to encompass a wide range of automotive, agricultural, marine and off-road vehicle purposes. A range of PGNs (00FF0016 through 00FFFF16, inclusive) is reserved for proprietary use. PGNs define the data which is made up of a variable number of Suspect Parameter Number (SPN) elements defined for unique data.

48 questions
4
votes
1 answer

python-can J1939 filter mask

I have been working in a Raspberry with an MCP2515 CAN bus device for read entire values of J1939 messages on broadcasting with python . I would like to filter the J1939 messages, but i'm not undestand the meaning of the can-mask and how I discorver…
Gabriel Lincoln
  • 155
  • 1
  • 10
2
votes
1 answer

CAN j1939 support in Linux Kernel 4.x

Any one have ported CAN J1939 stack on the kernel 4.x series? We had ported it into 3.10 kernel based on the link "http://elinux.org/J1939". Now I want to port it into the kernel version 4.1.15. I understand there was some changes happens in the 4.x…
shabeerb
  • 33
  • 1
  • 3
2
votes
1 answer

Python converting UINT8

I have some canbus string data (unit8) like: data: [24, 4, 0, 0, 191, 9, 146, 9] When I try to capture this data and print on the console it looks like ascii. payload = [x for x in data.data] print payload >>>['\x00', '\x00', '\x00', '\x00',…
Droter
  • 193
  • 1
  • 1
  • 8
1
vote
1 answer

How do I assign the J1939 standard to a message in a Cantools DBC file?

So i made a python script which can convert a DBC in an Excel and back using the library cantools. Turning the DBC-file into an Excel is no problem, but if i want to create a DBC out of the Excel-file and i assign the J1939 standard to a message, it…
1
vote
0 answers

CAN bus multiframe transport protocol always receive ABORT reason timeout

I'm attempting to use a simple processor and a MCP2515 CAN controller over SPI communication. I have no problems sending or receiving single frame CAN messages. However, when I try either global BAM messaging or using the Transport Protocol, I…
1
vote
1 answer

Python CAN filter and Mask does not filter messages

Trying to filter messages using can in python using the following: bus=can.Bus(interface="ixxat",channel=0, bitrate=250000) filter=[{"can_id":0x0629, "can_mask"=0xFFFF}] bus.setfilters(filter) while True: msg=bus.recv() …
1
vote
2 answers

Is there any module to parse CAN database (.dbc) files in python?

import cantoools can_db = cantools.database.load_file(path) above snippet shows error "signal_xx" over lapping in message "node_xx" please suggest other ways to parse this info. path ---> CAN BASE J1939
Appuchiyannan
  • 11
  • 1
  • 4
1
vote
1 answer

Python-CAN script receiving half of the expected CAN messages

I have written a Python script utilizing the Python-CAN library which records received CAN messages at a 1 second rate for 5 minutes, before logging all the messages into a file and exiting. The computer has a CAN module which is connecting to the…
1
vote
0 answers

J1939 Communication over CAN, J1939 Protocol Stack

I need some guidance on how to use the J1939 library for the Simulink Real-time toolbox. I am using the previous version which is 6.7 (R2017b). There is very little documentation or example on it. What I want to achieve is to send a CAN message on…
omarkdj
  • 11
  • 2
1
vote
3 answers

Does anyone know how to communicate with device that support SAE J1939 interface

We have a device that support SAE J1939 interface and having issue with finding out how to communicate with. Can someone point the direction. Thanks
baraban
  • 455
  • 1
  • 6
  • 18
1
vote
0 answers

Sending CAN-bus J1939 messages with no Data in linux

I need to send a CAN-bus J1939 message with no data using socketcan. The reason why the message needs to be sent with no data is to follow the spec J1939-73 DM11 (PGN=0x00FED3). The C code below works fine when sending data that is at least 1 byte…
1
vote
0 answers

Python socketcan interface for J1939 transport protocol

Using python with socketcan in the J1939 protocol, it seems that recvfrom() does not return the interface when the data is more than 8 bytes. In the J1939 protocl, when there is more than 8 data bytes, multiple CAN messages are sent since a CAN…
1
vote
2 answers

Sending a CAN J1939 message

I would like to get a code example to send a simple CAN message with the J1939 stack using Python. The following web site has a simple example to receive a J1939 message: https://justkding.me/thoughts/python-sae-j1939-socket-support The code on this…
1
vote
2 answers

J1939 vs CANBus

I know the general differences between J1939 and CANBus. Such as the ID bit count. Also I know J1939 lets you to send more than 8 bytes which CANBus cannot do. J1939 also provides point to point communcation between 2 nodes. This feature confuses my…
Raxian
  • 17
  • 1
  • 5
1
vote
1 answer

wrong DM1 multipacket

I have gathered the can Data of a Scania G380 Truck using stm32 mcu. there is a problem with DM1 faults. according to j1939-73 when dm1 data length is over than 8 bytes it would be packetized by TP.DT (pgn 0xebff) announced by a TP.CM (pgn 0xecff),…
MR A
  • 13
  • 3
1
2 3 4