How do I get the actual sample source code for J1939_logger.py?

Issue #88 closed
Rufus Smith created an issue

I wanted to start using the python-can library because of its multiple-device library. I tried to start slow, and just run the j1939_logger.py. After discovering -h for help and finding out the correct parameters, I was able to start it up with:

j1939_logger.py -i pcan -c PCAN_USBBUS1

I found that the bus got locked up (other devices are also scanning it). Come to find out the default bitrate for the interface is 500K, when actually J1939 bitrate is defined by spec to be 250K because of legacy devices. The help doesn't indicate an argument to set the bitrate to a different value, so I decided to look at the script. So when I look at the script, all I see is this:

pkg_resources.run_script('python-can==1.5.2', 'j1939_logger.py')

So where is the actual code for the logger?

Comments (3)

  1. Brian Thorne repo owner

    Hi Rufus,

    In this repository you will find the script itself in python-can / bin / j1939_logger.py

    However the j1939 protocol implementation and the accompanying j1939 logger script will no longer be part of this library. In fact the development for the python-can library has moved to github - https://github.com/hardbyte/python-can

    One of the J1939 users has agreed to take on maintenance of the J1939 portion here - https://github.com/milhead2/python-j1939

  2. Rufus Smith reporter

    Thanks for the quick response. It turned out to be a pebcak problem. I found the script where I had unzipped the egg, in this case it was in:

    python_can-1.5.2-py2.7\EGG-INFO\scripts
    

    Thanks for the info on the J1939 protocol. I work with J1939 all the time at work. I’ll look into that. (Wow, it JUST moved, didn’t it?)

    All I needed right now was the ability to set the baud rate (excuse me, bitrate) in the logger as I am taking baby steps.

  3. Log in to comment