Hi
II have a PCAN-USB-Adapter attached to my Linux-Virtual Machine and another USB-Adapter attached to my Windows 7, so I can use the PCAN-Viewer to see whats happening on the BUS. In between there is the hardware part, that is target of my CAN-Messages (so the second PCAN-USB-Adapter is just for debugging purpose).
To wake up the target and keep it alive I have to send 2 different messages in a permanent loop. So i built a background thread which is sending these messages every 100 (or 200) milliseconds.
Now comes the interesting part. To flash a new Software onto the target i have to send CAN-Messages read out of a binary file to it. This is done in an alternate thread. The CAN-Messages should be sent using the ISO-TP-Standard.
Therefore it should send a block of messages, wait for a Response, interpret the response and then send the next block. It does so for the first block. I see the sent Request and the corresponding response. But when I try to get that response via CAN_Read, it tells me the Receive Queue is empty. But As i said I need this response to trigger the next Request. And because I do not get this response I end up in a Timeout and my Program shuts own.
Has anybody an idea about that? I saw another thread about a pretty similar problem, but it doesn't quite fit my needs, therefore I opened another thread.
Thanks in advance
Best regards
Alex
PCAN_Read results in PCAN_ERROR_QRCVEMPTY
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: PCAN_Read results in PCAN_ERROR_QRCVEMPTY
First of all you have checked the communication between the 2 CAN Interfaces with PCAN-View - that should be work (sending and receiving).
You talk about ISO-TP - do you use our ISO-TP Implementation? We need more Information to solve your problem - maybe best way is to send the request to our support team --> support@peak-system.com
You talk about ISO-TP - do you use our ISO-TP Implementation? We need more Information to solve your problem - maybe best way is to send the request to our support team --> support@peak-system.com
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: PCAN_Read results in PCAN_ERROR_QRCVEMPTY
Hi
Thanks for your reply
I don't think it is because of the ISO-TP-Implementation. In the meantime I tried to execute a simple read with the examples offered by Peak Systems. I tried all of the Combination (as Read in Windows + write in Linux; Read in Windows + Write in windows; etc).
The final result is:
I have no problem reading in the windows examples, even if combined with the "Write" example running under Linux. I only have the problems the other way round. So I think I may have an error in the Peak-Driver installation or something, as I don't think there are such errors in the Peak implementation of the examples.
Do you have any suggestions what possibly could go wrong during the installation?
The write works fine under linux I only have the problems during the reading process.
By the way what is remarkable is that I do not have an "BUSHEAVY" Message while the reading is in Progress but the Error is still there.
Thanks for your support
Best regards
Alex
Thanks for your reply
I don't think it is because of the ISO-TP-Implementation. In the meantime I tried to execute a simple read with the examples offered by Peak Systems. I tried all of the Combination (as Read in Windows + write in Linux; Read in Windows + Write in windows; etc).
The final result is:
I have no problem reading in the windows examples, even if combined with the "Write" example running under Linux. I only have the problems the other way round. So I think I may have an error in the Peak-Driver installation or something, as I don't think there are such errors in the Peak implementation of the examples.
Do you have any suggestions what possibly could go wrong during the installation?
The write works fine under linux I only have the problems during the reading process.
By the way what is remarkable is that I do not have an "BUSHEAVY" Message while the reading is in Progress but the Error is still there.
Thanks for your support
Best regards
Alex
Re: PCAN_Read results in PCAN_ERROR_QRCVEMPTY
Hi Alex,
please post the output of the cat /proc/pcan of the linux driver, for me it looks like you have setup the driver for netdev, while you want to use the chardev driver interface under Linux.
regards
Michael
please post the output of the cat /proc/pcan of the linux driver, for me it looks like you have setup the driver for netdev, while you want to use the chardev driver interface under Linux.
regards
Michael
Re: PCAN_Read results in PCAN_ERROR_QRCVEMPTY
Hi
Here the output:
Thank you very much!
Best regards
Alex
Here the output:
As I see it you are right about the Netdev. I'm installing it the right way now and trying again. I will post the outcome of my test in the next post.*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20141219_n (7.14.0) Jun 16 2015 08:30:32 --------------
*------------- [mod] [isa] [pci] [dng] [par] [usb] [pcc] [net] --------------
*--------------------- 1 interfaces @ major 250 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb can0 ffffffff 001 0x001c 00000072 00006f53 00000786 00000000 0x0000
Thank you very much!
Best regards
Alex
Re: PCAN_Read results in PCAN_ERROR_QRCVEMPTY
Hi
I tried it again with the reading thing and it works perfectly. Thank you very much!
Kinda happy right now
Best regards
Alex
I tried it again with the reading thing and it works perfectly. Thank you very much!
Kinda happy right now

Best regards
Alex