Thread (6 messages) 6 messages, 4 authors, 2021-06-14

Re: How to statically set J1939 addresses and names

From: Oleksij Rempel <o.rempel@pengutronix.de>
Date: 2021-06-11 04:12:36

Hi Rémy,

On Tue, Jun 08, 2021 at 05:27:45PM +0200, Rémy DZIEMIASZKO wrote:
Hello,

I need that my applications do not care about J1939 node addresses but
directly bind / connect to socket based on node name only and the
kernel takes care of the conversion to addresses.

I know this is possible if addresses are dynamically assigned through
the Address Claiming protocol that is implemented in the kernel. The
kernel keeps track of its own address and name as well as the
addresses and names of other ECUs on the network and convert name to
adresse when requested by the applications.

But I don't want to use the Address Claiming protocol. I want to
statically set all addresses and names.

Is there a way to assign J1939 addresses and names to a CAN interface
without using the J1939 address claim protocol?
Current version do not have this functionality.
I found in old j1939 kernel documentation something like
ip addr add dev canX j1939 0xXX
ip addr add dev canX j1939 name 0xXX
See https://www.spinics.net/lists/netdev/msg162350.html

But in the latest j1939 kernel documentation I do not find any
reference to these commands.
Yes, it was pre mainline version. For mainlining we reduced UAPI to the
minimum to simplify reviewing, mainlining and testing process.

IF you need this option, you are welcome to send patches :)
Or you can contact us or other company to implement it.

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help