From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Michael Economides <mecono@gmail.com>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>, linux-can@vger.kernel.org
Subject: Re: read() question from newbie
Date: Wed, 18 Apr 2012 22:59:00 +0200 [thread overview]
Message-ID: <4F8F2B14.7060207@pengutronix.de> (raw)
In-Reply-To: <CABHoAvmwCbAUfNBocHiUOHypN1uHMi9BrSREG-Yt=K=i3Wfn_w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
On 04/18/2012 10:13 PM, Michael Economides wrote:
> Hi Oliver,
>
> Looking on my scope, it does seem like the baudrate is a little off.
>
> Here are the commands I use to set up my CAN interface on my Linux board:
>
> insmod -m candev;
> insmod -m mscan-mpc52xx;
> insmod -m can;
> insmod -m can-raw
> ifconfig can0 up;
With mainline it's not possible to ifup an interface without setting the
bitrate first.
> ./cantest can0 baud 1000000;
>
> This "cantest" program uses:
>
> ifr.ifr_ifru.ifru_ivalue = baudrate;
> ret = ioctl(s, SIOCSCANBAUDRATE, &ifr);
>
> to set the baudrate. But it seems from reading other discussions,
> that this is not the correct way to set baud rate.
This ioctl isn't supported anymore, as Wolfgang pointed out you're
probably not using a mainline socketcan.
> I am using the MPC5121 from Freescale, in case that is relevant.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2012-04-18 20:59 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
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 [this message]
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=4F8F2B14.7060207@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=mecono@gmail.com \
--cc=socketcan@hartkopp.net \
/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.