linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* newbie question to atu baudrate detection
@ 2021-03-19  7:44 Wadepohl, Wolfram
  2021-03-19  8:07 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Wadepohl, Wolfram @ 2021-03-19  7:44 UTC (permalink / raw)
  To: linux-can

Is it possible to automatically detect baudrate via socketCAN? How can I set the CAN controller to "silent mode" not generating any ACK or error frames?
help would be appreciated. thanks.

--
Wolfram Wadepohl
Plattformtechnologien & Datenmanagement
Storopack
Deutschland GmbH & Co. KG

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: newbie question to atu baudrate detection
  2021-03-19  7:44 newbie question to atu baudrate detection Wadepohl, Wolfram
@ 2021-03-19  8:07 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2021-03-19  8:07 UTC (permalink / raw)
  To: Wadepohl, Wolfram; +Cc: linux-can

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

On 19.03.2021 07:44:23, Wadepohl, Wolfram wrote:
> Is it possible to automatically detect baudrate via socketCAN?

There is ready to use code for this. Contributions are welcome :)

> How can I set the CAN controller to "silent mode" not generating any
> ACK or error frames? help would be appreciated. thanks.

If your CAN controller and driver support silent mode, you can use
netlink to configure it. You probably don't want to code netlink "by
hand". In the shell use "ip":

| ip link set dev can0 down
| ip link set can0 up type can bitrate 500000 listen-only on

In C, you can use libsocketcan:

| https://git.pengutronix.de/cgit/tools/libsocketcan

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-19  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19  7:44 newbie question to atu baudrate detection Wadepohl, Wolfram
2021-03-19  8:07 ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).