You are not logged in.

#1 2017-04-05 17:20:16

baba_svoza
Member
Registered: 2017-04-05
Posts: 5

Loading on boot - usbserial driver and 3G Novatel MC679 [SOLVED]

Hi,
I am trying to make 'usbserial' driver boot automaticly on boot or similair
how-to on wiki https://wiki.archlinux.org/index.php/USB_3G_Modem

When executing manually..

 >sudo modprob usbserial vendor=0x1410 product=0x7031 

it works as expected, driver is inserted, my modem Novatel MC679 is detected and configured properly, and seen thru gnome network manager applet

what I'm trying to do is to make the proccess automatic without needing to manually execute this command

 >sudo modprob usbserial vendor=0x1410 product=0x7031 

everytime I'd like to use my modem.   It seems like the most convinient approch is to add driver to kernel while the OS booting procees via /etc/modprobe.d/. Somehow it does NOT work for me. So far this is what I've tried:

Inserting 'usbserial' driver thru /etc/modprobe.d/, so I did creat file in this directory (btw, the dirctory  /etc/modprobe.d does not exist in the system by default so I do create it - as of my undestanding the reason it's not exist is it knod way to manage modules) file with the following context

 options usbserial vendor=0x1410 product=0x7031 

refrence is here - https://wiki.archlinux.org/index.php/Kernel_modules
Did NOT work, no 'usbserial' driver was inserted after reboot.

 lsmod | grep usbserial 

reveals nothing as usbserial driver
I tried also create the same context file in this directory as well /lib/modprobe.d/, same results it did NOT work
btw the HOOK 'modconf' is exist in my config file in mkinitcpio.conf

Next, I have tried to build udev rule to detect and load the driver while the modem is inserted - here is how it looks like refrence - https://wiki.archlinux.org/index.php/ZT … the_device

 
# This is the Modem part of the card, loading usbserial with the correct vendor and product IDs  geting  usb serial devices
 ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1410", ATTRS{idProduct}=="7031", RUN+="/sbin/modprobe usbserial vendor=0x1410 product=0x7031", MODE="660", GROUP="network"

added the rule to /lib/udev/rules.d/90-novatel-modem.rules directory - did not work as well

Then, I tried to make it thru GRUB load on boot editing 'linux' line appending

modprobe=usbserial vendor=0x1410 product=0x7031 

- refrence https://wiki.archlinux.org/index.php/Kernel_parameters

DId NOT work either..

So, what do I miss here??

When the modem is inseted to USB slot

us 002 Device 037: ID 1410:5059 Novatel Wireless 
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 17ef:1003 Lenovo Integrated Smart Card Reader
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

when the command usbserial is inseted to kernel

sudo modprobe usbserial vendor=0x1410 product=0x7031

[linux]$ lsmod | grep usb
usbserial              40960  0
usbnet                 36864  1 cdc_ether
mii                    16384  1 usbnet
usb_storage            65536  1 uas
scsi_mod              159744  5 sd_mod,usb_storage,libata,uas,sg
usbcore               208896  9 usbnet,usb_storage,ehci_hcd,cdc_ether,usbserial,xhci_pci,uas,xhci_hcd,ehci_pci
usb_common             16384  1 usbcore

When it works with the usbserial driver loaded

usb_modeswitch[11445]: switch device 1410:5059 on 002/039
usb 2-1.5: generic converter now attached to ttyUSB3
kernel: cdc_ether 2-1.5:1.6 enp0s29u1u5i6: renamed from eth0
cdc_ether 2-1.5:1.6 enp0s29u1u5i6: kevent 12 may have been dropped
NetworkManager[460]: <info>  [1491411903.5369] (ttyUSB0): modem state changed, 'enabling' --> 'registered' (reason: user-requested)

If 'usbserial' is not inserted prior the modem is connected

NetworkManager[460]: <info>  [1491412256.4749] device (eth0): interface index 26 renamed iface from 'eth0' to 'enp0s29u1u5i6'
etworkManager[460]: <info>  [1491412256.4802] device (enp0s29u1u5i6): link connected
dc_ether 2-1.5:1.6 enp0s29u1u5i6: kevent 12 may have been dropped
cdc_ether 2-1.5:1.6 enp0s29u1u5i6: CDC: unexpected notification 01!
ModemManager[462]: <info>  Couldn't check support for device at '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5': not supported by any plugin

Last edited by baba_svoza (2017-04-06 18:40:23)

Offline

#2 2017-04-05 19:18:21

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Loading on boot - usbserial driver and 3G Novatel MC679 [SOLVED]

I wonder if

alias   usb:v1410p7031*   usbserial

in addition to "options usbeserial ..." would do it.

EDIT:

Wait,

ID 1410:5059 Novatel Wireless

what are the IDs of this device? Where did you get 7031 from?

Last edited by mich41 (2017-04-05 19:24:36)

Offline

#3 2017-04-05 19:36:48

baba_svoza
Member
Registered: 2017-04-05
Posts: 5

Re: Loading on boot - usbserial driver and 3G Novatel MC679 [SOLVED]

Hi mich41
here we go


linux@arch 2-1.5]$ pwd
/sys/bus/usb/devices/usb2/2-1/2-1.5

[linux@arch 2-1.5]$ ls
2-1.5:1.0  2-1.5:1.6          bcdDevice            bDeviceSubClass  bNumConfigurations  descriptors  driver     ltm_capable   power      remove     uevent
2-1.5:1.1  2-1.5:1.7          bConfigurationValue  bmAttributes     bNumInterfaces      dev          ep_00      manufacturer  product    serial     urbnum
2-1.5:1.2  authorized         bDeviceClass         bMaxPacketSize0  busnum              devnum       idProduct  maxchild      quirks     speed      version
2-1.5:1.3  avoid_reset_quirk  bDeviceProtocol      bMaxPower        configuration       devpath      idVendor   port          removable  subsystem

[linux@arch 2-1.5]$ 
[linux@arch 2-1.5]$ cat idProduct
7031
[linux@arch]$ cat idVendor
1410
[linux@arch] 2-1.5]$ cat manufacturer
Novatel Wireless, Inc.

[linux@ach 2-1.5]$ 

Last edited by baba_svoza (2017-04-05 19:49:40)

Offline

#4 2017-04-05 19:39:49

baba_svoza
Member
Registered: 2017-04-05
Posts: 5

Re: Loading on boot - usbserial driver and 3G Novatel MC679 [SOLVED]

mich41 wrote:

I wonder if

alias   usb:v1410p7031*   usbserial

in addition to "options usbeserial ..." would do it.

EDIT:

Wait,

ID 1410:5059 Novatel Wireless

what are the IDs of this device? Where did you get 7031 from?

it's actualy USB stick with modem and flash memory with windows drivers on it, so initialy it's recognazied as

ID 1410:5059 Novatel Wireless

when you inserting it, after initial detection it seems like usb_modswitch rule from udev is detecting and switching it as modem with the parameters I set in below

Last edited by baba_svoza (2017-04-05 20:11:16)

Offline

#5 2017-04-05 20:09:31

baba_svoza
Member
Registered: 2017-04-05
Posts: 5

Re: Loading on boot - usbserial driver and 3G Novatel MC679 [SOLVED]

mich41 wrote:

I wonder if

alias   usb:v1410p7031*   usbserial

in addition to "options usbeserial ..." would do it.

BTW, which alias are you talking about pls?
myalias.conf file in /etc/modprobe.d/ ? or about udev rule for modalias file (usb:v1410p7031*)

Offline

#6 2017-04-05 20:31:05

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Loading on boot - usbserial driver and 3G Novatel MC679 [SOLVED]

baba_svoza wrote:

when you inserting it, after initial detection it seems like usb_modswitch rule from udev is detecting and switching it as modem with the parameters I set in below

OK, that's fine. I thought that modeswitch is faster and you wouldn't be able to catch the CD variant with lsusb before it switches to modem.

The alias can be in any file in /etc/modprobe.d. I would just put it together with options, on the next line. This should work as soon as the device is reconnected and modeswitch switches it to modem (no need for reboot).

Offline

#7 2017-04-06 01:00:24

baba_svoza
Member
Registered: 2017-04-05
Posts: 5

Re: Loading on boot - usbserial driver and 3G Novatel MC679 [SOLVED]

Apparently, it did the trick, it's working, wondering how did you guess alias could work? thanks btw.

Offline

#8 2017-04-06 08:49:32

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Loading on boot - usbserial driver and 3G Novatel MC679 [SOLVED]

I noticed that modules have similar aliases hardcoded in them (see modinfo ftdi_sio for example). So I figured that they must be used for something, apparently udev uses them to find drivers for devices. Never tested it though, glad to know it really works.

Now edit the first post and add [solved] to the title tongue

Offline

Board footer

Powered by FluxBB