receivetest does not work

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

receivetest does not work

Postby rehofman » Thu 17. Feb 2011, 23:46

I have ubuntu 10.04 installed as guest in virtualbox with windows7 as host. I have two PCAN-USB connected to my computer, one is connected to windows7 and one to ubuntu. The two PEAK-USB are connected so that it should be possible to send some CAN-Messages from Windows to ubuntu and the other way around. when i use transmitest under ubuntu with the transmit.txt file, then it works. that means that i receive messages in windows with pcan-view. but when i send messages with pcan-view in windows, i can't receive them with receivetest in ubuntu. i use "receivetest -f=/dev/pcan32" but they are not received.

what do the other options do? (-p, -i)? do i have to send the messages with a specific id?
rehofman
 
Posts: 7
Joined: Thu 17. Feb 2011, 23:30

Re: receivetest does not work

Postby M.Maidhof » Fri 18. Feb 2011, 10:24

Hello,

please send us the output of cat /proc/pcan. Please also see the info on our linux website, most of the time the problem ist very simple. You have builded the driver for NETDEV, but to use the receivetest tool you have to use the chardev interface of our driver. So please rebuild the driver with make NET=NO option and reload the driver again. There is an info available about that issue on page 7 of our linux driver manual:

Attention! When using the netdev driver interface, the chardev
driver test tools ("cat /dev/pcanXX", "receivetest",
"transmittest") will not work correctly (receiving of messages
won't be possible than).

best regards

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

Re: receivetest does not work

Postby rehofman » Fri 18. Feb 2011, 13:06

reto@reto-laptop:~$ cat /proc/pcan

*------------ PEAK-Systems CAN interfaces (www.peak-system.com) -------------
*-------------------------- Release_20110113_n ----------------------------
*------------- [mod] [isa] [pci] [dng] [par] [usb] [pcc] [net] --------------
*--------------------- 1 interfaces @ major 249 found -----------------------
*n -type- ndev --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb can0 ffffffff 255 0x001c 00000000 00000000 00000000 00000000 0x0000

how can i unload the netdev driver and load the charderv driver. i rebuilt the driver with net=no, but in cat /proc/pcan nothing changed. i think there should be a "-NA-" in the ndev-column.
rehofman
 
Posts: 7
Joined: Thu 17. Feb 2011, 23:30

Re: receivetest does not work

Postby M.Maidhof » Fri 18. Feb 2011, 14:46

Hi,

sudo rmmod pcan

cd
cd peak-linux-driver-6.24
make clean
make NET=NO
sudo make install

cd /driver
sudo insmod pcan.ko

cat /proc/pcan
and -NA- should be displayed in the netdev-column

regards

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

Re: receivetest does not work

Postby rehofman » Sun 20. Feb 2011, 18:39

Hi, thanks for the help, it worked. Now i want to cross-compile the driver for my APAD.

reto@reto-laptop:~/peak-linux-driver-6.24/driver$ make KERNEL_LOCATION=/home/reto/apad/common ARCH=arm CROSS_COMPILE=/home/reto/Desktopordner/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi- PCC=NO PCI=NO ISA=NO DNG=NO NET=NO
***
*** Host machine kernel version=2.6.32-28-generic
*** Driver kernel version=2.6.29
*** Path to kernel sources=/home/reto/apad/common
*** use KBUILD=yes
***
make -C /home/reto/apad/common SUBDIRS=/home/reto/peak-linux-driver-6.24/driver EXTRA_CFLAGS="-I/home/reto/peak-linux-driver-6.24/driver -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT " V=0 modules
make[1]: Betrete Verzeichnis '/home/reto/apad/common'
CC [M] /home/reto/peak-linux-driver-6.24/driver/src/pcan_main.o
CC [M] /home/reto/peak-linux-driver-6.24/driver/src/pcan_fops.o
In file included from /home/reto/peak-linux-driver-6.24/driver/src/pcan_main.h:116,
from /home/reto/peak-linux-driver-6.24/driver/src/pcan_fops.c:71:
/home/reto/peak-linux-driver-6.24/driver/pcan.h:120: error: expected identifier or '(' before numeric constant
/home/reto/peak-linux-driver-6.24/driver/pcan.h:121: warning: no semicolon at end of struct or union
make[2]: *** [/home/reto/peak-linux-driver-6.24/driver/src/pcan_fops.o] Fehler 1
make[1]: *** [_module_/home/reto/peak-linux-driver-6.24/driver] Fehler 2
make[1]: Verlasse Verzeichnis '/home/reto/apad/common'
make: *** [all] Fehler 2


Do you have any idea why it doesn't work?

regards
Reto
rehofman
 
Posts: 7
Joined: Thu 17. Feb 2011, 23:30

Re: receivetest does not work

Postby M.Maidhof » Mon 21. Feb 2011, 11:11

Hi Reto,

very interesting, never tested our LInux driver on an Android system.
Please have a look in the error messages which were displayed:

/home/reto/peak-linux-driver-6.24/driver/pcan.h:120: error: expected identifier or '(' before numeric constant
/home/reto/peak-linux-driver-6.24/driver/pcan.h:121: warning: no semicolon at end of struct or union

so have a look at those lines, and check if there is something wrong. Did you modify those files?

I would advice you to build the driver for the PCAN-USB hardware only, please disable all other options (NET, PCC, ISA, PCI, DNG, PAR).

regards

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

Re: receivetest does not work

Postby rehofman » Mon 21. Feb 2011, 12:06

I didn't modify those files. I took the same which I used for compiling it to Ubuntu, in which it worked. I think the Kernel-Sources which I have do not work.
rehofman
 
Posts: 7
Joined: Thu 17. Feb 2011, 23:30

Re: receivetest does not work

Postby M.Maidhof » Mon 21. Feb 2011, 13:02

Yes, possible....

regards

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


Return to Linux



cron