On 03/14/2011 05:02 PM, Jorge Fernandez Monteagudo wrote: > > Hi, I have something running... > > I've installed the last iproute2: > > # cd /opt/iproute2-2.6.37/ip > # ./ip link set can0 type can bitrate 1000000 > # ifconfig can0 up > can0 Link encap:UNSPEC HWaddr > 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 > UP RUNNING NOARP MTU:16 Metric:1 > RX packets:8061 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:10 > RX bytes:8061 (7.8 KiB) TX bytes:0 (0.0 B) > Interrupt:21 >
What does "./ip -d -s link show can0" report? > # dmesg > ... > device 0000:01:03.0: setting BTR0=0x00 BTR1=0x14 OK, that's the BTR0/1 for a 16 MHz oscillator. > > # cat /proc/net/can/stats > > 0 transmitted frames (TXF) > 7410 received frames (RXF) > 4 matched frames (RXMF) > > 0 % total match ratio (RXMR) > 0 frames/s total tx rate (TXR) > 0 frames/s total rx rate (RXR) > > 0 % current match ratio (CRXMR) > 0 frames/s current tx rate (CTXR) > 9 frames/s current rx rate (CRXR) > > 27 % max match ratio (MRXMR) > 0 frames/s max tx rate (MTXR) > 11 frames/s max rx rate (MRXR) > > 0 current receive list entries (CRCV) > 1 maximum receive list entries (MRCV) > > # cd /opt/socketcan/can-utils > # ./candump can0 0:0,#FFFFFFFF > SIOCGIFINDEX: No such device Try ./candump can0,0:0,#FFFFFFF or even better ./candump any,0:0,#FFFFFFFF > The can0 device is up and receiving frames? but I can read them. > Maybe the /dev/can0 is not set properly, because I'm using the > old one: > > # ls -al /dev/can0 > crw-rw-rw- 1 root root 91, 0 2011-03-11 14_39 /dev/can0 SocketCAN is a *network* driver (and not a character device driver). Wolfgang. _______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
