I am attempting to create a program that can read DTC codes from CAN-Bus devices connected to a Raspberry Pi via a USB to Serial connection. I am testing with a NeoVi Fire that I have hooked up, and currently I am able to send and read serial signals to the device to control car seat heating and cooling units I have attached to it via said serial port.
Now I need to expand what I have into requesting codes from the CAN unit so I am seeing if Python-CAN can do what I need it to (since the rest of my program is all written in Python).
I also went and installed the PyNeoVi library since I am using the NeoVi unit, and I am running into a problem while attempting to use one of the test files with the PyNeoVi repository. This is the code for the test file:
import neovi.neodevice as neodevice import neovi.ecu as ecu import neovi.spec as spec import neovi.neovi as neovi import json neodevice.init_api() dev = neodevice.find_devices(neovi.NEODEVICE_FIRE) dev.open() input_file = open('vehicle.spec', 'rt') data = json.load(input_file, object_hook = spec.from_json) hvac = ecu.ECU(data['ECUs']['HVAC'], dev) wanted_values = ['Blower Speed Output', 'External Ambient Temperature', 'Left Solar Radiation Sensor', 'Cabin Temperature'] for value_name in wanted_values: result = hvac.read_data_by_id(value_name)['value'] print("%s = %.1f %s" % (value_name, result, result)) dev.close()
The error I am getting is:
OSError: libicsneoAPI.so.0.1.3: cannot open shared object file: No such file or directory
It sounds like I am missing a dependency, but I am not sure where do download said dependency from.
EDIT: Going off of the API page for Python-Can, under the NeoVi Interface section it mentions the following:
This interface is not supported on Linux, however on Linux neoVI devices are supported via Socketcan with ICS Kernel-mode SocketCAN module for Intrepid devices and icsscand
As such I have been attempting to implement the ICS Kernel-mode SocketCAN module, as well as icsscand. My problem with that at the moment is with the kernel-mode SocketCAN module.
$ git clone https://github.com/intrepidcs/intrepid-socketcan-kernel-module $ cd intrepid/socketcan-kernel-module $ make
I am getting an error on the
$ make command which reads:
make -C /lib/modules/4.9.35-v7+/build M=/home/pi/intrepid-socketcan-kernel-module modules make: *** /lib/modules/4.9.35-v7+/build: No such file or directory. Stop. Makefile:4 recipe for target 'all' failed make: *** [all] Error 2
I am not sure if I should just make the directory it is looking for, or if it not being there is a problem I shouldn't have in the first place.