We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

My udev rule for my Jolla1 USB IP connection is not working

asked 2019-10-29 03:22:22 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2019-11-02 22:37:41 +0300

SebM gravatar image

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
edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-11-01 20:27:10 +0300

kan_ibal gravatar image

Have you checked ID_VENDOR and ID_VENDOR_ID?

sudo systemctl restart systemd-udevd

and plug or unplug device

edit flag offensive delete publish link more

Comments

@kan_ibal Please take a look at my EDIT 1.

SebM ( 2019-11-02 03:03:25 +0300 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2019-10-29 03:22:22 +0300

Seen: 148 times

Last updated: Nov 02 '19