Hi Wolfgang!

Wolfgang Grandegger wrote:
> 
> Hi Ulrich,
> ...
> You could handle the errno ENOBUFS and simply retry after some short
> delay without printing a message.
> 

My fault, I thought it was a driver message, but it came from my sources...


Wolfgang Grandegger wrote:
> 
>> I configured the bus with 
>> 
>>         ifconfig $1 down
>>         echo "$1: Setting bitrate $BITRATE, restart $RESTART"
>>         ip link set $1 type can bitrate $BITRATE triple-sampling on
> 
> BTW, triple-sampling with 125 kb/s is pretty unusual.
> 

You're right, just forgot to remove that line in the setup script.


Wolfgang Grandegger wrote:
> 
> What does "ip -d -s link" display? What type of errors and state changes
> do you see?
> 
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen
10
    link/can
    can state ERROR-PASSIVE restart-ms 100
    bitrate 125000 sample-point 0.875
    tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
    flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
    clock 24000000
    re-started bus-errors arbit-lost error-warn error-pass bus-off
    0          0          0          5          7          0
    RX: bytes  packets  errors  dropped overrun mcast
    9358       1360     0       0       0       0
    TX: bytes  packets  errors  dropped carrier collsns
    5537       795      0       0       0       0

So I see the bus is in ERROR_PASSIVE and that is my problem I think.
The 'virtual' slave is running, but the master does not start as the slave
filled up the buffers.

I did an "ip link set can0 type can loopback on" and it worked. But then I
connected an external CAN device (debugger) and cannot see the messages from
the slave. (The master gets them). 

with ifconfig down, ip link set can0 type can loopback off, ifconfig up the
messages are going in and out perfectly.

So it must run with and without having any physical slaves connected. 

Any idea of how to get that in a row?

Ulrich


-----
Best regards
Ulrich
-- 
View this message in context: 
http://old.nabble.com/On-Linux-two-applications-use-the-same-bus--tp30728796p32184356.html
Sent from the Socket-CAN Users mailing list archive at Nabble.com.

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

Reply via email to