My udev rule for my Jolla1 USB IP connection is not working
asked 2019-10-29 03:22:22 +0200
This post is a wiki. Anyone with karma >75 is welcome to improve it.
I've typed the following commands on my Ubuntu :
$ cat /etc/udev/rules.d/98-jolla.rules
SUBSYSTEM=="net", ACTION=="add|change", ENV{ID_VENDOR}=="Jolla", ENV{ID_VENDOR_ID}=="2931", RUN+="/sbin/ip address add 192.168.3.14/31 dev $env{INTERFACE}"
$ sudo udevadm control --reload
$ ifconfig usb0 | grep inet.addr
$
This rule is not working when I plug my Jolla through USB.
But if I type the sudo /sbin/ip address add ...
command manually, it works and I get :
$ ifconfig usb0 | grep inet.addr
inet addr:192.168.3.14 Bcast:0.0.0.0 Mask:255.255.255.254
EDIT 1 : Here is some udevadm info
output :
$ find /dev/bus/usb/ ! -type d -mmin -5
/dev/bus/usb/001/076
$ udevadm info /dev/bus/usb/001/076 | grep ID_VENDOR
E: ID_VENDOR=Jolla
E: ID_VENDOR_ENC=Jolla
E: ID_VENDOR_FROM_DATABASE=Advanced Micro Devices, Inc.
E: ID_VENDOR_ID=2931