From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Abdul Khan <akhan@symboticware.com>
Cc: linux-can@vger.kernel.org
Subject: Re: Strange error with jspy utility
Date: Fri, 25 May 2012 04:16:39 +0200 [thread overview]
Message-ID: <4FBEEB87.4060902@hartkopp.net> (raw)
In-Reply-To: <CA+cPUuTm72nWUcoK5QBEqZdKq9EjcSHcZrR1Z0s=pVV2gK25Ow@mail.gmail.com>
Hi Abdul,
i've already seen from your answer to Kurt that you have also tested the CAN
connection with 'cansend' and 'candump' - which was a really good idea :-)
The CAN state going from "can state STOPPED ----> can state ERROR-ACTIVE" is a
correct behaviour.
In your shown examples you only send ONE single frame.
It can be that ONLY ONE single frame can pass the bus and then e.g. the
interrupt line is not processed correctly which does not re-arm the interrupt.
Can you please confirm that you can send MORE that ONE CAN frame from can0 to
can1 and that you also can send more than one frame from can1 to can0?
Regards,
Oliver
On 24.05.2012 22:30, Abdul Khan wrote:
> Hi Oliver,
>
> Please see my findings in-line.
>
>> Are you sure that at least your CAN interfaces are running properly?
>
> I can able to send packet from can0 to can1 and vice versa.
>
> #./cansend can0 123#1122334455667788
>
> #./candump can1
>
> Output:
> =====
> can1 123 [8] 11 22 33 44 55 66 77 88
>
>> The sja1000 interfaces usually tell you when the are set in dmesg.
>> This is definitely missing in this grep'ed output.
>
> I am getting following dmesg.
> [ 4.629951] can: controller area network core (rev 20090105 abi 8)
> [ 4.630072] NET: Registered protocol family 29
> [ 4.631864] can: raw protocol (rev 20090105)
> [ 4.642162] CAN device driver interface
> [ 4.644036] sja1000 CAN netdevice driver
> [ 4.646370] sja1000_isa: platform device 0: port=0x600, mem=0x0, irq=10
> [ 4.647973] sja1000_isa: platform device 1: port=0x680, mem=0x0, irq=10
> [ 4.648073] sja1000_isa sja1000_isa.0: probing idx=0: port=0x600,
> mem=0x0, irq=10
> [ 4.651991] sja1000_isa sja1000_isa.0: sja1000_isa device
> registered (reg_base=0x00000600, irq=10)
> [ 4.652063] sja1000_isa sja1000_isa.1: probing idx=1: port=0x680,
> mem=0x0, irq=10
> [ 4.662256] sja1000_isa sja1000_isa.1: sja1000_isa device
> registered (reg_base=0x00000680, irq=10)
> [ 4.665633] Legacy sja1000_isa driver for max. 8 devices registered
> [ 4.672009] sja1000_isa sja1000_isa.0: can0: bit-timing not yet defined
> [ 4.673968] sja1000_isa sja1000_isa.1: can1: bit-timing not yet defined
>
> on loading can-j1939.ko module
> # modprobe can-j1939
>
> dmesg output:
> ==========
> [ 76.791667] can: SAE J1939
>
> on setting bit-rate using below command.
> #./ip link set can0 type can bitrate 125000
> #./ip link set can1 type can bitrate 125000
>
> dmesg output:
> ==========
> [ 168.014338] sja1000_isa sja1000_isa.0: can0: setting BTR0=0x03 BTR1=0x1c
> [ 173.198542] sja1000_isa sja1000_isa.1: can1: setting BTR0=0x03 BTR1=0x1c
>
>
> on setting link using below command
> #./ip link set can0 j1939 on
> #./ip link set can1 j1939 on
>
> dmesg output:
> ==========
> [ 187.406173] j1939-4: register
> [ 190.325970] j1939-5: register
>
>> E.g
>>
>> # ip -details link show
>>
>
> # ip -details link show ( Before: ifconfig can0/1 up )
>
> Output:
> ======================
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
> state DOWN qlen 1000
> link/ether 00:01:05:0b:58:7e brd ff:ff:ff:ff:ff:ff
> 3: sit0: <NOARP> mtu 1480 qdisc noop state DOWN
> link/sit 0.0.0.0 brd 0.0.0.0
> 4: can0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN qlen 10
> link/can
> can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
> bitrate 125000 sample-point 0.875
> tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
> sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
> clock 8000000
> j1939 on
> 5: can1: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN qlen 10
> link/can
> can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
> bitrate 125000 sample-point 0.875
> tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
> sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
> clock 8000000
> j1939 on
> ======================
>
>
> # ip -details link show ( After: ifconfig can0/1 up )
>
> Output:
> ======================
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
> state DOWN qlen 1000
> link/ether 00:01:05:0b:58:7e brd ff:ff:ff:ff:ff:ff
> 3: sit0: <NOARP> mtu 1480 qdisc noop state DOWN
> link/sit 0.0.0.0 brd 0.0.0.0
> 4: 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 125000 sample-point 0.875
> tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
> sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
> clock 8000000
> j1939 on
> 5: can1: <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 125000 sample-point 0.875
> tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
> sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
> clock 8000000
> j1939 on
> ======================
>
>
> #./ifconfig
>
> Output:
> ======================
> 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:1 errors:0 dropped:0 overruns:0 frame:0
> TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:10
> RX bytes:8 (8.0 B) TX bytes:8 (8.0 B)
> Interrupt:10 Base address:0x600
>
> can1 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:1 errors:0 dropped:0 overruns:0 frame:0
> TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:10
> RX bytes:8 (8.0 B) TX bytes:8 (8.0 B)
> Interrupt:10 Base address:0x680
> ======================
>
>
> # ./ip address show
>
> Output:
> ======================
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
> inet6 ::1/128 scope host
> valid_lft forever preferred_lft forever
> 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
> state DOWN qlen 1000
> link/ether 00:01:05:0b:58:7e brd ff:ff:ff:ff:ff:ff
> inet 192.168.1.2/24 brd 192.168.1.255 scope global eth0
> 3: sit0: <NOARP> mtu 1480 qdisc noop state DOWN
> link/sit 0.0.0.0 brd 0.0.0.0
> 4: can0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN qlen 10
> link/can
> can-j1939 0x20 scope link
> 5: can1: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN qlen 10
> link/can
> can-j1939 0x40 scope link
> ======================
>
> Observation:
> =========
> After ifconfig up command, it's state changes from "STOPPED" to "ERROR-ACTIVE"
>
> can state STOPPED ----> can state ERROR-ACTIVE
>
> I am not sure, its a normal behaviour or there is some kind of error.
>
> Thanks
> Abdul.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-05-25 2:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 21:50 Strange error with jspy utility Abdul Khan
2012-05-19 5:15 ` Kurt Van Dijck
2012-05-24 19:52 ` Abdul Khan
2012-05-29 7:37 ` Strange error with jspy utility: solved? Kurt Van Dijck
2012-05-19 9:06 ` Strange error with jspy utility Oliver Hartkopp
2012-05-24 20:30 ` Abdul Khan
2012-05-25 2:16 ` Oliver Hartkopp [this message]
2012-05-25 22:46 ` Abdul Khan
2012-05-26 6:21 ` Oliver Hartkopp
2012-05-26 6:57 ` Oliver Hartkopp
2012-05-29 7:40 ` Strange error with jspy utility: Bus problems Kurt Van Dijck
2012-05-26 18:29 ` Strange error with jspy utility Kurt Van Dijck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FBEEB87.4060902@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=akhan@symboticware.com \
--cc=linux-can@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox