From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Michael Economides <mecono@gmail.com>
Cc: linux-can@vger.kernel.org
Subject: Re: read() question from newbie
Date: Tue, 06 Mar 2012 21:14:22 +0100 [thread overview]
Message-ID: <4F56701E.3020104@hartkopp.net> (raw)
In-Reply-To: <CABHoAv=WuK0WZWNyi7jgBTNUbHub8AuGtPzbjL4dYaQ1ZGpu_g@mail.gmail.com>
On 06.03.2012 19:53, Michael Economides wrote:
> Yes, we removed that line of code with the filtering in cansend.c
fine.
> I ran "candump any", it just sits there, nothing is printed to the
> screen. So it looks like it thinks nothing is coming across on the
> CAN bus(?) But like I already stated, on the scope I can see some CAN
> frames being sent to me.
You can check either
cat /proc/net/dev
and
cat /proc/net/can/stats
to see if really any CAN frame entered your system.
I assume there is a CAN bus problem:
- wiring (CAN_L/CAN_H)
- correct CAN termination (2x 120 Ohms)
- different bitrate
>
> I will be using a Can analyzer tools today, to further my investigation.
Adding some more CAN nodes can help too - so adding another tool and testing
is always a good idea.
>
> Bascially, all I was asking of you is what could cause read() to wait
> forever... or candump to just sit there and wait?
Well yes. It does a blocking read to get and print receive CAN frames. What do
you expect?
> Maybe the CAN data being sent is not valid (garbage)?
Yes. Please check the three points mentioned above.
Best regards,
Oliver
next prev parent reply other threads:[~2012-03-06 20:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CABHoAvngDnUfh6w7NXQksrmeLq52_cRp809rFZ+HriwYpZqo9w@mail.gmail.com>
2012-03-02 22:09 ` read() question from newbie Michael Economides
2012-03-03 9:05 ` Oliver Hartkopp
2012-03-05 17:49 ` Michael Economides
2012-03-05 22:19 ` Oliver Hartkopp
2012-03-05 22:22 ` Oliver Hartkopp
2012-03-06 18:53 ` Michael Economides
2012-03-06 20:14 ` Oliver Hartkopp [this message]
2012-04-17 4:16 ` Michael Economides
2012-04-17 6:08 ` Oliver Hartkopp
2012-04-18 20:13 ` Michael Economides
2012-04-18 20:32 ` Wolfgang Grandegger
2012-04-18 23:10 ` Michael Economides
2012-04-19 8:39 ` Wolfgang Grandegger
2012-04-18 20:59 ` Marc Kleine-Budde
2012-04-18 21:21 ` Michael Economides
2012-04-19 7:27 ` Marc Kleine-Budde
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=4F56701E.3020104@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=mecono@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.