Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb_modeswitch udev-rules doesn't work in Rasbian Lite #47

Closed
mcgurk opened this issue Nov 10, 2016 · 5 comments
Closed

usb_modeswitch udev-rules doesn't work in Rasbian Lite #47

mcgurk opened this issue Nov 10, 2016 · 5 comments

Comments

@mcgurk
Copy link

mcgurk commented Nov 10, 2016

(Raspbian Jessie Lite, Version:September 2016, Release date:2016-09-23, Kernel version:4.4)

Huawei 3G modem doesn't automatically trigger succesfully usb_modeswitch in Raspbian Lite.

I tracked down problem to udev-rule parameters.
%b is interpreted differently in /lib/udev/rules.d/40-usb_modeswitch.rules.
Line:
ATTRS{idVendor}=="12d1", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"
/var/log/syslog (after sudo udevadm control --log-priority=debug):
Lite: Oct 19 17:10:40 raspberrypi systemd-udevd[705]: starting 'usb_modeswitch '1-1.4/1-1.4:1.0''
Desktop: Oct 19 19:22:26 raspberrypi systemd-udevd[910]: starting 'usb_modeswitch '/1-1.4:1.0''

If I start same command by hand with same parameter as in desktop, it works:
sudo /lib/udev/usb_modeswitch /1-1.4:1.0

I can solve problem by changing '%b/%k' to '%k' in /lib/udev/rules.d/40-usb_modeswitch.rule, but I'm not sure if that it is right solution.

@XECDesign
Copy link
Member

Is this the behaviour the same as reported in #12 or are they separate issues?

@mcgurk
Copy link
Author

mcgurk commented Nov 10, 2016

I think that this is separate issue. This issue comes before any network connection attempt or dhcp stuff.

@leolobato
Copy link

This issue means that when a Huawei 3G modem (which is fairly common) is plugged in, it is not recognized as a modem.

I can confirm that changing %b/%k to %k on /lib/udev/rules.d/40-usb_modeswitch.rule for Huawei fixes the issue. After a reboot, the modem is recognized.

@ralienpp
Copy link

ralienpp commented Feb 15, 2017

I encountered the same situation and changing %b/%k to %k did the trick; I found that out after trying many other things.

This is very unlikely to be related to dhcpd because I disabled dhcpd on the system where I dealt with this problem.

@XECDesign
Copy link
Member

Seems to work without problem on stretch lite and desktop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants