Search found 8 matches

by molberg
Wed 12. Nov 2014, 13:22
Forum: Linux
Topic: failure to read from PCAN USB
Replies: 9
Views: 14211

Re: failure to read from PCAN USB

Seems to work now, don't ask why ;)
by molberg
Wed 12. Nov 2014, 12:33
Forum: Linux
Topic: failure to read from PCAN USB
Replies: 9
Views: 14211

Re: failure to read from PCAN USB

Some more info:

If I put the reading part in a separate program and start this before I do the write from my test program, I can see the expected resonses being dumped in my terminal. So does this mean that CAN_write and CAN_read calls need to be run in different programs/threads? All I want is to ...
by molberg
Wed 12. Nov 2014, 11:26
Forum: Linux
Topic: failure to read from PCAN USB
Replies: 9
Views: 14211

Re: failure to read from PCAN USB

I rebuilt the driver with "make NET=NO", here is the new output from /proc/pcan

$ cat /proc/pcan

*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20140723_n (7.12.0) Nov 12 2014 11:18:03 --------------
*---------------- [mod] [isa] [pci] [dng ...
by molberg
Wed 12. Nov 2014, 10:36
Forum: Linux
Topic: failure to read from PCAN USB
Replies: 9
Views: 14211

Re: failure to read from PCAN USB

I re-compiled my small test program with logging enabled, here is the output:

$ cat PCANBasic.log
Wed Nov 12 10:42:51 2014 - «____________________________________»
Wed Nov 12 10:42:51 2014 - « PCAN-Basic Log »
Wed Nov 12 10:42:51 2014 - «____________________________________»
Wed Nov 12 10:42:51 ...
by molberg
Wed 12. Nov 2014, 09:22
Forum: Linux
Topic: failure to read from PCAN USB
Replies: 9
Views: 14211

Re: failure to read from PCAN USB

So I can see from /proc/pcan that I have carried out reads, and the read counter increases by one every time I run my little test application, just as expected.
So why can't I retrieve the byte I am reading, but keep getting PCAN_ERROR_QRCVEMPTY errors?
by molberg
Wed 12. Nov 2014, 09:11
Forum: Linux
Topic: failure to read from PCAN USB
Replies: 9
Views: 14211

Re: failure to read from PCAN USB

Ok, so here is my output from dmesg and /proc/pcan:

$ dmesg
[48411.774544] pcan: Release_20140723_n (le)
[48411.774550] pcan: driver config [mod] [isa] [pci] [dng] [par] [usb] [pcc] [net]
[48411.778081] pcan: new usb adapter with 1 CAN controller(s) detected
[48411.778097] pcan: usb hardware ...
by molberg
Mon 10. Nov 2014, 14:24
Forum: Linux
Topic: failure to read from PCAN USB
Replies: 9
Views: 14211

Re: failure to read from PCAN USB

OK, I will do that. But it will have to wait until Wednesday this week, that's when I will have access to the hardware and test environment again. Thanks!
by molberg
Mon 10. Nov 2014, 10:58
Forum: Linux
Topic: failure to read from PCAN USB
Replies: 9
Views: 14211

failure to read from PCAN USB

I am using a PCAN USB interface under Linux for communication with an external device. I have written a small test program based on the c++ code (pcanread.cpp) that comes with the PCAN_Basic_Linux-2.0.2 API. Whereas init and write calls always report PCAN_ERROR_OK (i.e. no error), my attempts to ...