* Renaming can devices interfaces names with udev
@ 2021-08-25 18:44 Jasper Wallace
2021-08-25 19:50 ` Gediminas Simanskis
0 siblings, 1 reply; 2+ messages in thread
From: Jasper Wallace @ 2021-08-25 18:44 UTC (permalink / raw)
To: linux-can
Hi all,
I'm going to be using a number of the Korlan/8devices usb2can
interfaces and I want to make sure they have persistent interface
names. Thankfully they all have unique serial numbers that are printed
on the devices so I can match a physical device with a linux interface
name.
In theory I should be able to do something like add a file at
/etc/udev/rules.d/10-usb2can.rules containing something like:
SUBSYSTEM=="net", ACTION=="add", ATTR{ID_VENDOR_ENC}=="8Devices",
ATTR{ID_MODEL}=="USB2CAN_converter", NAME="can$attr{ID_SERIAL_SHORT}"
But I've not been able to get anything to work.
Has anyone been able to get something like this to work?
I'm on Debian Buster.
Thanks,
Jasper
--
Your hydrogen & fuel cell partner
Arcola Energy Ltd, 24 Ashwin Street,
London E8 3DL. www.arcolaenergy.com <https://www.arcolaenergy.com/> / +44
20 7503 1386
Registered in England and Wales, Company Number 7257863, VAT
Number 110085273. Copyright 2020. Confidential and Proprietary. Not to be
disseminated or copied in full or in part.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Renaming can devices interfaces names with udev
2021-08-25 18:44 Renaming can devices interfaces names with udev Jasper Wallace
@ 2021-08-25 19:50 ` Gediminas Simanskis
0 siblings, 0 replies; 2+ messages in thread
From: Gediminas Simanskis @ 2021-08-25 19:50 UTC (permalink / raw)
To: Jasper Wallace, linux-can
Hi,
I use similar method for net interface name from serial number of Rusoku
TouCAN converters.It works for me.
https://github.com/rusoku/TouCAN-SocketCAN_DKMS/blob/master/95-toucan.rules
gedsim@PC:~$ ifconfig -a
TouCAN_5211: flags=128<NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
txqueuelen 10 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Gediminas
On 2021-08-25 21:44, Jasper Wallace wrote:
> Hi all,
>
> I'm going to be using a number of the Korlan/8devices usb2can
> interfaces and I want to make sure they have persistent interface
> names. Thankfully they all have unique serial numbers that are printed
> on the devices so I can match a physical device with a linux interface
> name.
>
> In theory I should be able to do something like add a file at
> /etc/udev/rules.d/10-usb2can.rules containing something like:
>
> SUBSYSTEM=="net", ACTION=="add", ATTR{ID_VENDOR_ENC}=="8Devices",
> ATTR{ID_MODEL}=="USB2CAN_converter", NAME="can$attr{ID_SERIAL_SHORT}"
>
> But I've not been able to get anything to work.
>
> Has anyone been able to get something like this to work?
>
> I'm on Debian Buster.
>
> Thanks,
>
> Jasper
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-25 20:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 18:44 Renaming can devices interfaces names with udev Jasper Wallace
2021-08-25 19:50 ` Gediminas Simanskis
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).