Queue is empty with peak CAN USB

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
kiminhan
Posts: 2
Joined: Thu 21. Apr 2022, 14:45

Queue is empty with peak CAN USB

Post by kiminhan » Thu 21. Apr 2022, 14:52

Hello,
I am trying to use the peak CAN USB.
Firstly, I installed the driver peak-linux-driver-8.10.0, and PCAN-Basic_Linux-4.3.4.
When I check with pcan View (on windows), CAN signal is visualized on the viewer.
However, when I take CAN signal using the PCANBasic examples, the result is printed
'The receive queue is empty'
Please tell me the problem.


==================================================================
The result of "pcaninfo" at terminal is

Code: Select all

PCAN driver version: 8.10.0

  * pcanusb32: (/sys/class/pcan/pcanusb32)
  	- file: /dev/pcan32
  	- dev: "511:32"
  	- dev_name: "/dev/pcan32"
  	- minor: 32
  	- base: 0
  	- irq: 0
  	-----------------
  	- adapter_name: "PCAN-USB"
  	- adapter_number: 0
  	- adapter_version: "8.4"
  	- type: "usb"
  	- hwtype: 11
  	- devid: 0x00
  	- ctrlr_number: 0
  	- mass_storage_mode: 0
  	-----------------
  	- clock: 8 MHz
  	- nom_bitrate: 500 kBit/s
  	- btr0btr1: 0x1c
  	- init_flags: 0
  	- clk_drift: 0
  	- ts_fixed: 0
  	-----------------
  	- nom_brp: 1
  	- nom_sample_point: 0.00%
  	- nom_sjw: 1
  	- nom_tseg1: 13
  	- nom_tseg2: 2
  	- nom_tq: 0
  	-----------------
  	- bus_state: Closed / Unknown (0)
  	- rx_error_counter: 0
  	- tx_error_counter: 0
  	- tx_fifo_ratio: 0%
  	-----------------
  	- irqs: 754
  	- status: 0
  	- errors: 0
  	- read: 5661
  	- write: 0
  	-----------------
  	- TPCANHandle: "PCAN_USBBUS1" (0x051)
  	-----------------
---------------------------------------------------------------------------
And the result of cat /proc/pcan

Code: Select all

*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20200311_n (8.10.0) Apr 20 2022 16:45:04 --------------
*---------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net] -----------
*--------------------- 1 interfaces @ major 511 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32    usb   can0 ffffffff 000 0x001c 0000161d 00000000 000002f2 00000000 0x0000
Last edited by M.Gerber on Thu 21. Apr 2022, 15:33, edited 1 time in total.
Reason: Inserted code tags for improved readability

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: Queue is empty with peak CAN USB

Post by M.Maidhof » Thu 21. Apr 2022, 17:29

Hi,

please build the driver in chardev mode to be able to use the PCANBasic API (I can see can0 in cat /proc/pcan, which means you have build a Netdev driver). Please also use the latest version 8.14 from our linux website:

http://www.peak-system.com/fileadmin/me ... /index.htm

regards

Michael

kiminhan
Posts: 2
Joined: Thu 21. Apr 2022, 14:45

Re: Queue is empty with peak CAN USB

Post by kiminhan » Fri 22. Apr 2022, 10:05

M.Maidhof wrote:
Thu 21. Apr 2022, 17:29
Hi,

please build the driver in chardev mode to be able to use the PCANBasic API (I can see can0 in cat /proc/pcan, which means you have build a Netdev driver). Please also use the latest version 8.14 from our linux website:

http://www.peak-system.com/fileadmin/me ... /index.htm

regards

Michael
Thank you so much Michael ;)
Everything is working well as following your answer.

Post Reply