All of lore.kernel.org
 help / color / mirror / Atom feed
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: Mon, 05 Mar 2012 23:19:06 +0100	[thread overview]
Message-ID: <4F553BDA.8060106@hartkopp.net> (raw)
In-Reply-To: <CABHoAvmiu2JY70zJ8K20n8b=ahCDe8owRRWaSLMJoTd36ub7iw@mail.gmail.com>

On 05.03.2012 18:49, Michael Economides wrote:

> On Sat, Mar 3, 2012 at 1:05 AM, Oliver Hartkopp <socketcan@hartkopp.net> wrote:
>> On 02.03.2012 23:09, Michael Economides wrote:
>>
>>> I am trying to use the cantest program to read.  It just blocks on the
>>> read, and stays there forever.
>>>
>>>  I can see on my scope there are can messages coming across the bus (from a
>>> different microcontroller attached to the bus).
>>>
>>> I have already verified I can write using cantest.
>>>
>>> In other words, this works:  ./cantest can0 1F334455#1122334455667788
>>>
>>> But this doesn't:  ./cantest can0
>>>
>>
>>
>> Hello Mike,
>>
>> where is this tool 'cantest' from?
>>
>> I don't know it either from the SocketCAN utils
>>
>> https://gitorious.org/linux-can/can-utils
>>
>> nor from the Pengutronix canutils
>>
>> http://git.pengutronix.de/?p=tools/canutils.git;a=summary
>>
>> Maybe you can alternatively try the SocketCAN utils to test.
>>
>> Regards,
>> Oliver
> 
> Hi Oliver,
> 
> Thanks for your reply.
> 
> "cantest" is a slightly modified version of cansend.c from the link
> above.  it does a read() as well as a write().
> 
>   basically what i'm seeing is CAN frames (standard format) coming
> across the bus, but read() call just blocks as if nothing is there.
> 
> A coworker of mine reports that the read() is responding only to
> extended frame format.
> 
> Can you provide any insight into this?  Specifically, how do we
> configure our CAN socket to respond to extended vs. standard frames?
> We would like to use standard, not extended.


Please just type

	candump any

to check whether you really get anything in your system.

Using 'candump any' without any additional provided filter definitions
displays anything (EFF&SFF) which is received on the host.

Don't know what you've 'slightly modified' :-)

Therefore check with a unmodified candump first.

Regards,
Oliver

  reply	other threads:[~2012-03-05 22:19 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 [this message]
2012-03-05 22:22         ` Oliver Hartkopp
2012-03-06 18:53           ` Michael Economides
2012-03-06 20:14             ` Oliver Hartkopp
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=4F553BDA.8060106@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.