Just wanted to drop a note that we found the issue, and after playing with some configurations, are successfully sending ISO Request frames to the inverter and getting valid responses back.

Thank you all so much for your help; if another person comes along and needs help getting SocketCAN set up on a vanilla CentOS/RHEL system, please point them my way (if I'm not still on the mailing list) ...

On 7/8/11 3:10 AM, Oliver Hartkopp wrote:
Am 08.07.2011 11:36, schrieb Stu Statman:

On 7/8/11 1:59 AM, Oliver Hartkopp wrote:
How do I create a virtual CAN interface? (Sorry for the n00b question
...)

Always welcome :-)

Thank you!

http://lxr.linux.no/#linux+v2.6.39/Documentation/networking/can.txt#L607

There's also a script i personally use in /etc/init.d which creates
four vcans (vcan0 .. vcan3) by default:

http://svn.berlios.de/wsvn/socketcan/trunk/etc/can_if

Well, this is interesting :

    [wgn@dess-aopen1 ~]$ sudo ip link add dev vcan01 type vcan
    RTNETLINK answers: Operation not supported

If you're not using the script, you need to load the vcan module first:

modprobe vcan

And then try again :-)


However, that document pointed out some other interesting things to look
at. It looks like the connection is, itself, having deeper problems.
When I run the ip details command, then run the cansend command, the the
ip details command, it looks like the TX connection dies. (I modified
the cansend command to display the packet it thinks it's sending; it
just involved removing a comment.) I should point out that candump
continues to hum along, showing traffic from the connected device ...

    [wgn@dess-aopen1 ~]$ ip -details -statistics link show can0
    3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state
    UNKNOWN qlen 10
    link/can
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
    bitrate 250000 sample-point 0.875
    tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
    esd_usb2: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
    clock 60000000
    re-started bus-errors arbit-lost error-warn error-pass bus-off
    0 1 0 0 0 0
    RX: bytes packets errors dropped overrun mcast
    26639 3392 1 0 0 0
    TX: bytes packets errors dropped carrier collsns
    0 0 0 0 0 0

    [wgn@dess-aopen1 ~]$ cansend can0 18EA0001#03.F0.01
    18EA0001 [3] 03 F0 01

    [wgn@dess-aopen1 ~]$ ip -details -statistics link show can0
    3: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state
    DOWN qlen 10
    link/can
    can state ERROR-PASSIVE (berr-counter tx 0 rx 144) restart-ms 0
    bitrate 250000 sample-point 0.875
    tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
    esd_usb2: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
    clock 60000000
    re-started bus-errors arbit-lost error-warn error-pass bus-off
    0 4737 0 274 274 273
    RX: bytes packets errors dropped overrun mcast
    80703 10167 4737 0 0 0
    TX: bytes packets errors dropped carrier collsns
    0 0 0 0 0 0

Any thoughts on this? Any idea where to look next?

Obviously the CAN adapter as some problems to the the frame onto the bus. As you seem to have the correct bitrate (because you can receive msgs), i would check for correct CAN bus termination.

After that: Can you add a third CAN node on the bus? I personally had some problems with commercial tools, if they were the only counterpart for CAN communication. A third CAN node may send the CAN acknowledge in a way that your sending node get's it better. I know this is somehow strange but i got that problem with some commercial tools ...

Regards,
Oliver
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to