The free CAN Software API (Application Programming Interface) for Windows®
-
PEAK-Support
- Sales & Support

- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Post
by PEAK-Support » Sat 12. Nov 2016, 12:41
as Fabrice wrote:
..can you please return the output of the following commands:
Code: Select all
# outputs system message
dmesg | grep pcan
# call the "get_device_number" test script
python3 test.py
# call again the test script to generate an error
python3 test.py
# outputs system message
dmesg | grep pcan
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
S.Grosjean
- Software Development

- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Post
by S.Grosjean » Mon 14. Nov 2016, 11:01
Hello,
Well your post is pretty noisy to help. Could you please redo the test with only one PCAN-USB Pro FD please? The best would be to also to reboot your system before. Don't touch to the PCAN-USB Pro fd, then run (at least twice) the test.
For example:
Code: Select all
$ dmesg | grep pcan
[410460.432922] pcan: Release_20161108_n (le)
[410460.432926] pcan: driver config [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc]
...
[410460.570231] pcan: PCAN-USB Pro FD (01h PCB01h) fw v2.2.1
[410460.570727] pcan: PCAN-USB Pro FD channel 1 device number=21
[410460.570849] pcan: usb device minor 35 found
[410460.571350] pcan: PCAN-USB Pro FD channel 2 device number=22
[410460.571474] pcan: usb device minor 36 found
[410460.571525] usbcore: registered new interface driver pcan
[410460.572209] pcan: major 245.
Then:
Code: Select all
$ python3 test.py
(0, 21)
$ python3 test.py
(0, 21)
$ python3 test.py
(0, 21)
...
Finally:
Code: Select all
$ dmesg | grep pcan
[410460.432922] pcan: Release_20161108_n (le)
[410460.432926] pcan: driver config [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc]
...
What we need is to get some info about the (pcan) driver when the test successfully runs, then when it fails. In fact, the (65536, x) code says there's an error somewhere. We first have to try from where does it come.
Regards,
Stéphane
— Stéphane
-
altran
- Posts: 14
- Joined: Sat 5. Nov 2016, 07:11
Post
by altran » Mon 14. Nov 2016, 22:07
I've attached two screenshots. One with PCAN-USB Pro (Successful) and the other with PCAN-USB (Unsuccessful)

- PCAN-USB Pro
- Screenshot from 2016-11-14 12-02-19.png (161.16 KiB) Viewed 8209 times

- PCAN-USB
- Screenshot from 2016-11-14 13-00-47.png (120.56 KiB) Viewed 8209 times
-
S.Grosjean
- Software Development

- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Post
by S.Grosjean » Tue 15. Nov 2016, 10:20
Hi,
Ok, thanks, now it's clearer.
Please keep the PCAN-USB plugged only. In order to find where exactly the issue is, could you please go into the peak-linux-driver-x.y directory and type (several times would be better):
Code: Select all
$ test/pcan-settings -f=/dev/pcanusb32 -d
Thanks and regards,
Stéphane
— Stéphane
-
F.Vergnaud
- Software Development

- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Post
by F.Vergnaud » Tue 15. Nov 2016, 11:49
Hello,
In addition to Stephane's previous request, could you make the following changes to the python's test-script and copy-paste us the output (changes enable verbose mode).
Code: Select all
from PCANBasic import *
pcb = PCANBasic()
# enable pcanbasic verbose mode
pcb._PCANBasic__m_dllBasic.pcanlog_set(4, 0, 0)
pcb.Initialize(PCAN_USBBUS1, PCAN_BAUD_500K)
print("PCAN_DEVICE_NUMBER = " + str(pcb.GetValue(PCAN_USBBUS1, PCAN_DEVICE_NUMBER)))
print("PCAN_DEVICE_NUMBER = " + str(pcb.GetValue(PCAN_USBBUS1, PCAN_DEVICE_NUMBER)))
pcb.Uninitialize(PCAN_USBBUS1)
Thank you again.
Best regards,
Fabrice