Re: newbie question to atu baudrate detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux