Problem compiling peak linux driver 8.7.0

This forum covers PCAN-Linux and Linux development issues concerning our products

Problem compiling peak linux driver 8.7.0

Postby Mario » Sat 19. Jan 2019, 21:26

Hello,

because the pcan_usb driver delivered with Debian 9 does not work properly I want to compile the peak linux driver 8.7.0.

First: clean the world.
Code: Select all
root@i7:/home/bnutzer/peak-linux-driver-8.7.0# make clean
make[1]: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/driver“ wird betreten
rm -f src/*o src/*~ src/.*cmd *o *ko *~ .*cmd  pcan.mod.c Module.symvers modules.order .cache.mk
make[1]: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/driver“ wird verlassen
make[1]: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/lib“ wird betreten
rm -f src/*~
rm -rf obj lib obj32 lib32
make[1]: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/lib“ wird verlassen
make[1]: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/test“ wird betreten
rm -f src/*~ src/*.o *~ receivetest transmitest bitratetest filtertest pcanfdtst pcan-settings
make[1]: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/test“ wird verlassen

Seems to be OK.

I do not need realtime and I use an IPEH2022 (USB device) only:
Code: Select all
root@i7:/home/bnutzer/peak-linux-driver-8.7.0# make -C driver PCC=NO_PCCARD_SUPPORT ISA=NO_ISA_SUPPORT PCIEC=NO_PCIEC_SUPPORT PCI=NO_PCI_SUPPORT DNG=NO_DONGLE_SUPPORT
make: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/driver“ wird betreten
***
*** Host machine kernel version=4.9.0-8-amd64
*** Driver kernel version=4.9.0-8-amd64 (4.9.0)
*** Path to kernel sources=/usr/src/linux-headers-4.9.0-8-amd64
*** use KBUILD=yes
*** cc version=6.3.0
***
make -C /usr/src/linux-headers-4.9.0-8-amd64  SUBDIRS=/home/bnutzer/peak-linux-driver-8.7.0/driver EXTRA_CFLAGS="-I/home/bnutzer/peak-linux-driver-8.7.0/driver -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DNO_PCI_SUPPORT -DNO_PCIEC_SUPPORT -DNO_ISA_SUPPORT -DNO_DONGLE_SUPPORT -DNO_PCCARD_SUPPORT -DNO_NETDEV_SUPPORT -DNO_RT  -Wno-date-time" V=0 modules
make[1]: Verzeichnis „/usr/src/linux-headers-4.9.0-8-amd64“ wird betreten
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_main.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_fops.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_fifo.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_filter.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_parse.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_sja1000.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_common.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_timing.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcanfd_core.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcanfd_ucan.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_usb_core.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_usb.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcan_usbpro.o
  CC [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/src/pcanfd_usb.o
  LD [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/pcan.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/bnutzer/peak-linux-driver-8.7.0/driver/pcan.mod.o
  LD [M]  /home/bnutzer/peak-linux-driver-8.7.0/driver/pcan.ko
make[1]: Verzeichnis „/usr/src/linux-headers-4.9.0-8-amd64“ wird verlassen
make: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/driver“ wird verlassen

Seems to be OK, too.

Now I am ready to install:
Code: Select all
root@i7:/home/bnutzer/peak-linux-driver-8.7.0# make install
make[1]: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/driver“ wird betreten
Info: /lib/modules/4.9.0-8-amd64/misc exists.
Info: Copied 45-pcan.rules to /etc/udev/rules.d.
Info: mainline drivers removed and blacklisted in
      /etc/modprobe.d/blacklist-peak.conf
make[1]: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/driver“ wird verlassen
make[1]: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/lib“ wird betreten
mkdir -p /usr/lib
cp -d lib/* /usr/lib
cp: der Aufruf von stat für 'lib/*' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
Makefile:191: die Regel für Ziel „install“ scheiterte
make[1]: *** [install] Fehler 1
make[1]: Verzeichnis „/home/bnutzer/peak-linux-driver-8.7.0/lib“ wird verlassen
Makefile:92: die Regel für Ziel „install“ scheiterte
make: *** [install] Fehler 2


This does not work :(

I think I got the issue, but I am not sure, if I am right:
We are standing inside /home/bnutzer/peak-linux-driver-8.7.0/lib and want to copy the files inside this folder (namely libpcan.h and libpcanfd.h) to /usr/lib/.
Is this right?


My system:
Code: Select all
bnutzer@i7:~$ uname -a
Linux i7 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux


Best wishes,

Mario
Mario
 
Posts: 7
Joined: Sat 19. Jan 2019, 20:00

Re: Problem compiling peak linux driver 8.7.0

Postby M.Maidhof » Mon 21. Jan 2019, 15:25

Hi,

you have created the driver only (make -C driver, why?), and not the libs. So please build the driver completely with libraries:

make clean
make
make install

regards

Michael
M.Maidhof
Support
Support
 
Posts: 1127
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Re: Problem compiling peak linux driver 8.7.0

Postby Mario » Sat 2. Feb 2019, 15:55

Hello,

yes, after reading the manual again some days later I see my mistake :oops:

Thanks!


I restarted the machine and tried to use the CAN-USB-device from python.
Python shows me:

Code: Select all
OSError: libpcanbasic.so: cannot open shared object file: No such file or directory


OK, lets check some things:

dmesg:
Code: Select all
[ 3500.518217] usb 1-1.5.4: new full-speed USB device number 8 using ehci-pci
[ 3500.631924] usb 1-1.5.4: New USB device found, idVendor=0c72, idProduct=000c
[ 3500.631929] usb 1-1.5.4: New USB device strings: Mfr=0, Product=3, SerialNumber=0
[ 3500.631932] usb 1-1.5.4: Product: VER1:PEAK   
               VER2:02.8.01       
               DAT :06.05.2004
               TIME:09:35:37
                                            ...
[ 3500.684708] pcan: PCAN-USB channel device number=255
[ 3500.684711] pcan: usb device minor 32 found


The device to connect:
Code: Select all
root@i7:/home/bnutzer# ls -l /dev/pcan* | grep "^c"
crw-rw-rw- 1 root root 244, 32 Feb  2 14:57 /dev/pcanusb32


/proc/pcan:
Code: Select all
root@i7:/home/bnutzer# cat /proc/pcan

*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20181116_n (8.7.0) Jan 21 2019 18:01:37 --------------
*---------------------------- [mod] [par] [usb] -----------------------------
*--------------------- 1 interfaces @ major 244 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32    usb   -NA- ffffffff 000 0x001c 00000000 00000000 00000000 00000000 0x0000

Something seems to be wrong.


Does this mean, that the driver did not found the can device?

Best wishes,

Mario
Mario
 
Posts: 7
Joined: Sat 19. Jan 2019, 20:00

Re: Problem compiling peak linux driver 8.7.0

Postby M.Maidhof » Mon 4. Feb 2019, 14:04

Hi,

which device do you want to open by your python script? Which API do you use? Please send some code, otherwise it will be impossible to help you with your problem

regards

Michael
M.Maidhof
Support
Support
 
Posts: 1127
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Re: Problem compiling peak linux driver 8.7.0

Postby Mario » Sun 10. Feb 2019, 17:16

Hello,

I do not use any API in comparison to PCANBasicExample.
The PCANBasicExample won't work for me. I could not install tix, I think I have to build it myself or modify the example.

This is the code which I am using under Windows 10 and Debian both with python 3 (Anaconda):

Code: Select all
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 19 21:45:13 2019

@author: https://github.com/christiansandberg/canopen

Modified for Win10 Python 3.7.0 by Mario
"""

import canopen
import time

# Start with creating a network representing one CAN bus
network = canopen.Network()

# Add some nodes with corresponding Object Dictionaries
node = canopen.RemoteNode(1, '750-348_08.eds') #Wago 750-348
network.add_node(node)

# Connect to the CAN bus
# Arguments are passed to python-can's can.interface.Bus() constructor
# (see https://python-can.readthedocs.io/en/latest/bus.html).
# network.connect()
# network.connect(bustype='socketcan', channel='can0')
# network.connect(bustype='kvaser', channel=0, bitrate=250000)
# network.connect(bustype='ixxat', channel=0, bitrate=250000)
# network.connect(bustype='vector', app_name='CANalyzer', channel=0, bitrate=250000)
# network.connect(bustype='nican', channel='CAN0', bitrate=250000)

# following line for Windows 10
network.connect(bustype='pcan', channel='PCAN_USBBUS1', bitrate=125000)

# following line for Debian
#network.connect(bustype='pcan', channel='/dev/pcanusb32', bitrate=125000)


# Reset network
node.nmt.state = 'RESET COMMUNICATION'

time.sleep(5)

# Read a variable using SDO
device_name = node.sdo['manufacturer device name'].raw
vendor_id = node.sdo[0x1018][1].raw
print("Device name: ", device_name)
print("Vendor ID: ", vendor_id)

# Change state to operational (NMT start)
node.nmt.state = 'OPERATIONAL'

time.sleep(5)

# Change state to stopped (NMT stop)
node.nmt.state = 'PRE-OPERATIONAL'

# Disconnect from CAN bus
network.disconnect()


The code works under Windows 10.
The output (IPhyton console from Spyder 3.3.1) is:
Code: Select all
Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 6.5.0 -- An enhanced Interactive Python.

runfile('D:/Daten/Zwischenspeicher/00_Projekte/01_Prüfstand/03_Python/CANtest-Win10.py', wdir='D:/Daten/Zwischenspeicher/00_Projekte/01_Prüfstand/03_Python')
Device name:  750-348
Vendor ID:  33


On Debian Linux (again Anaconda) I get:

Code: Select all
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

runfile('/home/bnutzer/python/CANtest-Debian.py', wdir='/home/bnutzer/python')
Traceback (most recent call last):

  File "<ipython-input-1-bc252302081c>", line 1, in <module>
    runfile('/home/bnutzer/python/CANtest-Debian.py', wdir='/home/bnutzer/python')

  File "/usr/lib/python3/dist-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
    execfile(filename, namespace)

  File "/usr/lib/python3/dist-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/home/bnutzer/python/CANtest-Debian.py", line 34, in <module>
    network.connect(bustype='pcan', channel='/dev/pcanusb32', bitrate=125000)

  File "/usr/local/lib/python3.5/dist-packages/canopen/network.py", line 109, in connect
    self.bus = can.interface.Bus(*args, **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/can/interface.py", line 128, in __new__
    return cls(channel, *args, **config)

  File "/usr/local/lib/python3.5/dist-packages/can/interfaces/pcan/pcan.py", line 97, in __init__
    self.m_objPCANBasic = PCANBasic()

  File "/usr/local/lib/python3.5/dist-packages/can/interfaces/pcan/basic.py", line 334, in __init__
    self.__m_dllBasic = cdll.LoadLibrary("libpcanbasic.so")

  File "/usr/lib/python3.5/ctypes/__init__.py", line 425, in LoadLibrary
    return self._dlltype(name)

  File "/usr/lib/python3.5/ctypes/__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)

OSError: libpcanbasic.so: cannot open shared object file: No such file or directory



Now I did the steps described in the manual for checking the installation of the driver again:

Code: Select all
bnutzer@i7:~$ sudo dmesg | grep pcan
[    4.922756] pcan: Release_20181116_n (le)
[    4.922758] pcan: driver config [mod] [par] [usb]
[    5.043621] pcan: PCAN-USB channel device number=255
[    5.043623] pcan: usb device minor 32 found
[    5.043677] usbcore: registered new interface driver pcan
[    5.043682] pcan: major 245.


The devices:
Code: Select all
ls -l /dev/pcan* | grep "^c"
crw-rw-rw- 1 root root 245, 32 Feb  6 20:45 /dev/pcanusb32


/dev/pcan*:
Code: Select all
ls -l /dev/pcan*
lrwxrwxrwx 1 root root       9 Feb  6 20:45 /dev/pcan32 -> pcanusb32
crw-rw-rw- 1 root root 245, 32 Feb  6 20:45 /dev/pcanusb32

/dev/pcan-usb:
insgesamt 0
drwxr-xr-x 2 root root 60 Feb  6 20:45 0


tree /dev/pcan-usb:
Code: Select all
bnutzer@i7:~$ tree /dev/pcan-usb
/dev/pcan-usb
└── 0
    └── can0 -> ../../pcanusb32

1 directory, 1 file


Code: Select all
bnutzer@i7:~$ cat /proc/pcan

*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20181116_n (8.7.0) Feb  8 2019 21:21:45 --------------
*------------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] --------------
*--------------------- 1 interfaces @ major 244 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32    usb   -NA- ffffffff 000 0x001c 00000000 00000000 00000000 00000000 0x0000


Code: Select all
bnutzer@i7:~$ cat /sys/class/pcan/version
8.7.0
bnutzer@i7:~$ tree -a /sys/class/pcan
/sys/class/pcan
├── pcanusb32 -> ../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/pcan/pcanusb32
└── version

1 directory, 1 file


Code: Select all
bnutzer@i7:~$ ls -l /sys/class/pcan/pcanusb32/
insgesamt 0
-r--r--r-- 1 root root 4096 Feb 10 16:31 adapter_name
-r--r--r-- 1 root root 4096 Feb 10 16:16 adapter_number
-r--r--r-- 1 root root 4096 Feb 10 16:31 adapter_version
-r--r--r-- 1 root root 4096 Feb 10 16:31 base
-r--r--r-- 1 root root 4096 Feb 10 16:31 btr0btr1
-r--r--r-- 1 root root 4096 Feb 10 16:31 bus_state
-r--r--r-- 1 root root 4096 Feb 10 16:31 clk_drift
-r--r--r-- 1 root root 4096 Feb 10 16:31 clock
-r--r--r-- 1 root root 4096 Feb 10 16:16 ctrlr_number
-r--r--r-- 1 root root 4096 Feb 10 16:31 dev
lrwxrwxrwx 1 root root    0 Feb 10 16:31 device -> ../../../2-1.2:1.0
-rw-r--r-- 1 root root 4096 Feb 10 16:16 devid
-r--r--r-- 1 root root 4096 Feb 10 16:31 errors
-r--r--r-- 1 root root 4096 Feb 10 16:16 hwtype
-r--r--r-- 1 root root 4096 Feb 10 16:31 init_flags
-r--r--r-- 1 root root 4096 Feb 10 16:31 irq
-r--r--r-- 1 root root 4096 Feb 10 16:31 irqs
-r--r--r-- 1 root root 4096 Feb 10 16:31 minor
-r--r--r-- 1 root root 4096 Feb 10 16:31 nom_bitrate
-r--r--r-- 1 root root 4096 Feb 10 16:31 nom_brp
-r--r--r-- 1 root root 4096 Feb 10 16:31 nom_sample_point
-r--r--r-- 1 root root 4096 Feb 10 16:31 nom_sjw
-r--r--r-- 1 root root 4096 Feb 10 16:31 nom_tq
-r--r--r-- 1 root root 4096 Feb 10 16:31 nom_tseg1
-r--r--r-- 1 root root 4096 Feb 10 16:31 nom_tseg2
drwxr-xr-x 2 root root    0 Feb 10 16:31 power
-r--r--r-- 1 root root 4096 Feb 10 16:31 read
-r--r--r-- 1 root root 4096 Feb 10 16:31 rx_error_counter
-r--r--r-- 1 root root 4096 Feb 10 16:31 rx_fifo_ratio
-r--r--r-- 1 root root 4096 Feb 10 16:31 status
lrwxrwxrwx 1 root root    0 Feb 10 16:31 subsystem -> ../../../../../../../../../class/pcan
-r--r--r-- 1 root root 4096 Feb 10 16:31 ts_fixed
-r--r--r-- 1 root root 4096 Feb 10 16:31 tx_error_counter
-r--r--r-- 1 root root 4096 Feb 10 16:31 tx_fifo_ratio
-r--r--r-- 1 root root 4096 Feb 10 16:31 type
-rw-r--r-- 1 root root 4096 Feb 10 16:16 uevent
-r--r--r-- 1 root root 4096 Feb 10 16:31 write


For the next step I prepared the script test.sh containing the commands, because they did not work direcly typed into the terminal.
Code: Select all
#!/bin/sh
# PCAN-Driver-Linux_UserMan_eng.pdf
# Seite 21
for f in /sys/class/pcan/pcanusb32/*
do
   [ -f $f ] && echo -n "`basename $f` =" && cat $f
done


The result:
Code: Select all
bnutzer@i7:~$ ./test.sh
adapter_name =PCAN-USB
adapter_number =0
adapter_version =2.8
base =0x0
btr0btr1 =0x001c
bus_state =0
clk_drift =0
clock =8000000
ctrlr_number =0
dev =244:32
devid =255
errors =0
hwtype =11
init_flags =0x00000000
irq =0
irqs =0
minor =32
nom_bitrate =500000
nom_brp =1
nom_sample_point =8750
nom_sjw =1
nom_tq =125
nom_tseg1 =13
nom_tseg2 =2
read =0
rx_error_counter =0
rx_fifo_ratio =0.00
status =0x0000
ts_fixed =0
tx_error_counter =0
tx_fifo_ratio =0.00
type =usb
uevent =MAJOR=244
MINOR=32
DEVNAME=pcanusb32
write =0


Code: Select all
bnutzer@i7:~/peak-linux-driver-8.7.0/driver$ ./lspcan -T -t -i
dev name   port   irq   clock   btrs   bus
[PCAN-USB 0]
|_ pcanusb32   CAN1   -   8MHz   500k   CLOSED


And now the receivetest.
The receivetest is startet and the Wago 750-348 field bus coupler is powered up.
Code: Select all
bnutzer@i7:~/peak-linux-driver-8.7.0/driver$ receivetest -f=/dev/pcanusb32 -b=0x031c -e

receivetest Version "Release_20150611_n"  (www.peak-system.com)
------- Copyright (C) 2004-2009 PEAK System-Technik GmbH ------
receivetest comes with ABSOLUTELY NO WARRANTY.     This is free
software  and you are welcome  to redistribute it under certain
conditions.   For   details   see    attached   COPYING   file.

receivetest: device node="/dev/pcanusb32"
             Extended frames are accepted, init with BTR0BTR1=0x031c
receivetest: driver version = Release_20181116_n
3625672273.844 receivetest: x - 0x00000001 4 00 00 00 00
receivetest: pending CAN status 0x0020 read.
3625680369.895 receivetest: m s 0x00000701 1 00
3625680371.4 receivetest: m s 0x00000081 8 00 50 81 00 01 00 00 00
^Creceivetest: type            = usb
             Serial Number   = 0xffffffff
             Device Number   = 0
             count of reads  = 3
             count of writes = 0
             count of errors = 1
             count of irqs   = 33
             last CAN status = 0x0000
             last error      = 0
             open paths      = 1
             driver version  = Release_20181116_n
receivetest: finished (0): 3 message(s) received

The receivetest is working fine. I get the same result with PCAN-View under Windows.

Thank you up to here.


Best wishes,

Mario
Mario
 
Posts: 7
Joined: Sat 19. Jan 2019, 20:00

Re: Problem compiling peak linux driver 8.7.0

Postby M.Maidhof » Mon 11. Feb 2019, 10:21

Hi,

ok, you are using the PCANBasic examples, so the API you are using is the PCANBasic API. Looks like everyting is working now.

regards

Michael
M.Maidhof
Support
Support
 
Posts: 1127
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Re: Problem compiling peak linux driver 8.7.0

Postby Mario » Sun 17. Feb 2019, 10:50

Hello,

sorry but it is still not working.

The receivetest is working so far.

But if I try to use the python code above I get "no sdo response" with Debian Linux.
With Windows 10 it is working but I want to use Linux.

I tried out Python 2.7 because the website says that the Basic-API is made for Python 2.x - and got the same result.
So it should have nothing to do with Python 2.x versus 3.x.

Now I hooked up my oscilloscope to the CAN-bus and send out different commands.
Then I used PCAN-View running on Windows sending out the same commands to have a reference.

Here the result for SDO1008 (this delivers the manufacturer name on Wago 750-348).

PCAN-View-Message.gif
PCAN-View message (the blue marked one)
PCAN-View-Message.gif (3.06 KiB) Viewed 355 times


sdo1008-PCAN-View-TransmitAndResponse.png
SDO1008 with PCAN-View Transmit and Response
sdo1008-PCAN-View-TransmitAndResponse.png (49.06 KiB) Viewed 355 times


sdo1008-PCANView.png
SDO1008 with PCAN-View Windows Transmit
sdo1008-PCANView.png (50 KiB) Viewed 355 times


SDO1008-PCAN-View-Response.png
SDO1008 PCAN-View Windows Response from Wago
SDO1008-PCAN-View-Response.png (49.65 KiB) Viewed 355 times


sdo1008-python-linux.png
SDO1008 with Python 2.7 Linux Transmit
sdo1008-python-linux.png (42.14 KiB) Viewed 355 times


Well - there is a difference in what is transmitted.
And I should get an logic analyzer. It will do better than an oscilloscope.

Does anyone have an idea what is wrong here?
It confuses me, that the same Python-code is running on Windows properly.


Best wishes,

Mario
Mario
 
Posts: 7
Joined: Sat 19. Jan 2019, 20:00

Re: Problem compiling peak linux driver 8.7.0

Postby M.Maidhof » Tue 19. Feb 2019, 16:33

please post the output of cat /proc/pcan

regards

Michael
M.Maidhof
Support
Support
 
Posts: 1127
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Re: Problem compiling peak linux driver 8.7.0

Postby Mario » Tue 19. Feb 2019, 19:01

Hello,

this is the output:
Code: Select all
bnutzer@i7:~$ cat /proc/pcan

*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20181116_n (8.7.0) Feb  8 2019 21:21:45 --------------
*------------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] --------------
*--------------------- 1 interfaces @ major 244 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32    usb   -NA- ffffffff 000 0x001c 00000000 00000000 00000000 00000000 0x0000



Best wishes,

Mario
Mario
 
Posts: 7
Joined: Sat 19. Jan 2019, 20:00

Re: Problem compiling peak linux driver 8.7.0

Postby M.Maidhof » Tue 26. Feb 2019, 10:07

Hi,

do you use a VM or is it a native Linux? Next, can you please send a message by using transmittest or the echo command, as written in the manual. You can also use pcanview for linux, which is available from our Linux website as deb package.

regards

Michael
M.Maidhof
Support
Support
 
Posts: 1127
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Next

Return to Linux



This website uses cookies for analytics, for logins to the online shop and the forum, and for the handling of an order. By browsing this website you agree to the use of cookies. Detailed information on their use can be found in our privacy policy.

OKPrivacy Policy