usbmod: what is it for? (net access via USB-modem / UMTS)
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
usbmod: what is it for? (net access via USB-modem / UMTS)
I have problems with my net access (connects randomly with success, but is then okay). Recently I noted an error during boot up concerning usbmod. usbmod is not included in SuSE 11.2 but in 11.0. I copied it over to the new system, error is gone but problems stayed. I do not understand what it does. Anybody able to give me some clues?
This is usbmod:
Code:
#! /bin/bash
if [ "$1" == "remove" ]
then
# echo "remove pl2303"
if [ "$(/sbin/lsmod |grep pl2303)" != "" ]
then
/sbin/rmmod pl2303
fi
elif [ "$1" == "update" ]
then
if [ "$(/sbin/lsmod |grep option)" != "" ]
then
/sbin/rmmod option
fi
if [ "$(/sbin/lsmod |grep pl2303)" != "" ]
then
/sbin/rmmod pl2303
fi
if [ "$(/sbin/lsmod |grep usbserial)" != "" ]
then
/sbin/rmmod usbserial
fi
/sbin/modprobe usbserial vendor=0x12d1 product=$2
else
# echo "modprobe usb-storage"
if [ "$(/sbin/lsmod |grep usb-storage)" == "" ]
then
/sbin/modprobe usb-storage
fi
fi
The two systems use different kernels, and sometimes kernel modules have name changes.
You should post the exact kernel message. If it occurs during boot, look in /var/log/boot.msg. If it occurred later, look at /var/log/messages.
Don't mess with that module. It is for a different kernel. There is no option for it in the .config file.
This isn't a programming question. It might be suited for Linux-Kernel or Linux-Hardware, but I think you may be on a dead end and let's see where the evidence leads.
Please provide more information on what network device you have. Post the output of lsmod (before removing modules). Post the output of "lspci -v" and "lsusb". Some devices have more than one possible kernel module that can be used to control it. Installing support for the other, may require that you blacklist the one your system originally chose.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
I'll do that probably next week since I have to leave for a few days and no time right now to collect all the informations, so please hold the line . And thanks for answering jschiwal.
P.S.: what exactly does the command in your signature do? I can see that you call a man page in postscript format (not in "less" like usually) but what are you "teeing" it for? You could always create a new instance so there is no need to save it to the disk or what am I missing?
P.P.S.: When I print man pages from "less" they loose some formatting (like bold and italic). What would be the command to give the .ps file to a filter (for a non-postscript printer) and then to CUPS to print it like it looks originally?
The tee command simply creates a copy you can view in okular or a similar program at a later date. A few days ago my sig didn't have it until I used it once. Yes you could create a temporary file and then open the file. For some packages, such as sed & coreutils, I will install the source package and use "./configure && make pdf" to produce a print worthy version of the info documentation.
I find the postscript version of manpages to be much easier to read than in the console. I find I can remember more of the information as well.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
I found in /var/log/boot.msg
Code:
...
<notice -- Apr 5 11:50:32.4853000> service smartd startsh: /sbin/usbmod: No such file or directory
<notice -- Apr 5 11:50:34.157517000> service smartd doneStarting smartd done
<notice -- Apr 5 11:50:34.158712000> service splash start<notice -- Apr 5 11:50:34.257644000> service splash done<notice -- Apr 5 11:50:34.258085000> service splash_early start<notice -- Apr 5 11:50:34.329291000> service splash_early doneStarting mail service (Postfix)done
<notice -- Apr 5 11:50:35.764190000> service postfix done<notice -- Apr 5 11:50:35.767512000> service cron startStarting CRON daemon
<notice -- Apr 5 11:50:35.978163000> startproc: execve (/usr/sbin/cron) [ /usr/sbin/cron ], [ DO_FASTBOOT=no CONSOLE=/dev/console SELINUX_INIT=YES ROOTFS_FSTYPE=ext4 SHELL=/bin/sh TERM=linux ROOTFS_FSCK=0 LC_ALL=POSIX INIT_VERSION=sysvinit-2.86 DO_BLOGD=yes REDIRECT=/dev/tty1 COLUMNS=96 PATH=/bin:/sbin:/usr/bin:/usr/sbin vga=0x314 DO_CONFIRM=no RUNLEVEL=5 PWD=/ SPLASHCFG=/etc/bootsplash/themes/openSUSE/config/bootsplash-800x600.cfg DO_QUIET=no lang=de CPUFREQ=no PREVLEVEL=N LINES=33 HOME=/ SHLVL=2 DO_FORCEFSCK=no splash=verbose SPLASH=yes ROOTFS_BLKDEV=/dev/disk/by-id/scsi-SATA_Maxtor_6L250R0_L607SAMG-part11 _=/sbin/startproc DAEMON=/usr/sbin/cron ]
done
<notice -- Apr 5 11:50:36.164872000> service cron done<notice -- Apr 5 11:50:36.165311000> service SuSEfirewall2_setup startStarting Firewall Initialization (phase 2 of 2) SuSEfirewall2: Warning: no interface active
sh: /sbin/usbmod: No such file or directory
<notice -- Apr 5 11:50:37.888845000> service SuSEfirewall2_setup donedone
<notice -- Apr 5 11:50:37.893275000> service stoppreload start<notice -- Apr 5 11:50:38.5683000> service stoppreload donedone
Master Resource Control: runlevel 5 has been reached
...
Then the login screen comes up and later KDE is running. If I return to the console output with <Ctrl><Alt><F1> I see about every 5 seconds a new line printed, saying "/sbin/usbmod: No such file or directory".
linux-m0v2:/ # lspci -v
00:00.0 Host bridge: VIA Technologies, Inc. VT8371 [KX133] (rev 02)
Flags: bus master, medium devsel, latency 0
Memory at d0000000 (32-bit, prefetchable) [size=64M]
Capabilities: [a0] AGP version 2.0
Kernel driver in use: agpgart-via
00:01.0 PCI bridge: VIA Technologies, Inc. VT8371 [KX133 AGP] (prog-if 00 [Normal decode])
Flags: bus master, 66MHz, medium devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
Memory behind bridge: d4000000-d5ffffff
Prefetchable memory behind bridge: d6000000-d7ffffff
Capabilities: [80] Power Management version 2
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 22)
Subsystem: VIA Technologies, Inc. VT82C686/A PCI to ISA Bridge
Flags: bus master, stepping, medium devsel, latency 0
Kernel driver in use: parport_pc
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 10) (prog-if 8a [Master SecP PriP])
Flags: bus master, medium devsel, latency 32
[virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 000003f0 (type 3, non-prefetchable) [size=1]
[virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 00000370 (type 3, non-prefetchable) [size=1]
I/O ports at d000 [size=16]
Capabilities: [c0] Power Management version 2
Kernel driver in use: pata_via
00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 10) (prog-if 00 [UHCI])
Subsystem: First International Computer, Inc. VA-502 Mainboard
Flags: bus master, medium devsel, latency 32, IRQ 5
I/O ports at d400 [size=32]
Capabilities: [80] Power Management version 2
Kernel driver in use: uhci_hcd
00:07.4 Host bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 30)
Flags: medium devsel, IRQ 9
Capabilities: [68] Power Management version 2
00:07.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 20)
Subsystem: VIA Technologies, Inc. Onboard Audio on EP7KXA
Flags: medium devsel, IRQ 10
I/O ports at dc00 [size=256]
I/O ports at e000 [size=4]
I/O ports at e400 [size=4]
Capabilities: [c0] Power Management version 2
Kernel driver in use: VIA 82xx Audio
00:08.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 62) (prog-if 00 [UHCI])
Subsystem: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
Flags: bus master, medium devsel, latency 32, IRQ 11
I/O ports at e800 [size=32]
Capabilities: [80] Power Management version 2
Kernel driver in use: uhci_hcd
00:08.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 62) (prog-if 00 [UHCI])
Subsystem: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
Flags: bus master, medium devsel, latency 32, IRQ 12
I/O ports at ec00 [size=32]
Capabilities: [80] Power Management version 2
Kernel driver in use: uhci_hcd
00:08.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 65) (prog-if 20 [EHCI])
Subsystem: VIA Technologies, Inc. USB 2.0
Flags: bus master, medium devsel, latency 32, IRQ 10
Memory at d8000000 (32-bit, non-prefetchable) [size=256]
Capabilities: [80] Power Management version 2
Kernel driver in use: ehci_hcd
01:00.0 VGA compatible controller: nVidia Corporation NV5M64 [RIVA TNT2 Model 64/Model 64 Pro] (rev 15) (prog-if 00 [VGA controller])
Subsystem: Elsa AG Erazor III LT
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 11
Memory at d4000000 (32-bit, non-prefetchable) [size=16M]
Memory at d6000000 (32-bit, prefetchable) [size=32M]
[virtual] Expansion ROM at d5000000 [disabled] [size=64K]
Capabilities: [60] Power Management version 1
Capabilities: [44] AGP version 2.0
And this from lsusb:
Code:
linux-m0v2:/ # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 12f7:0285 Memorex Products, Inc.
Bus 001 Device 006: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0d46:2012 Kobil Systems GmbH KAAN Standard Plus (Smartcard reader)
Bus 002 Device 003: ID 062a:0000 Creative Labs Optical mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Quote:
Originally Posted by JZL240I-U
...P.P.S.: When I print man pages from "less" they loose some formatting (like bold and italic). What would be the command to give the .ps file to a filter (for a non-postscript printer) and then to CUPS to print it like it looks originally?
Not necessary, one can print it directly from okular (I just have to find the place where to change the page size from legal to DIN A4 but that is a minor concern). That command is an absolute beauty, thanks jschiwal.
For anybody else trying it
man -Tps <topic> | okular -
the "-" at the end is absolutely necessary, else okular stays empty.
Back to the original issue: This might have something to do with problems of updating the kernel, since I had three times error messages there and had to create some links in /lib/modules by hand to keep problems at bay. Links to the pertinent threads:
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Quote:
Originally Posted by JZL240I-U
...This might have something to do with problems of updating the kernel...
No, that was the wrong assumption. The kernel problems arose from an error on my part, i.e. how I organized my /boot partition(s).
I know in the meantime that the /sbin/usbmod script is called by a job called /sbin/HWActivator. It is part of a package of Huawei which switches my wireless USB-stick from memory to modem state. That much is clear now but I won't mark this thread as [SOLVED] as I still do not understand what /sbin/usbmod does or rather how it works. In particular how it assigns its option "$1" a value.
The usbmod is available in the computer for using the internet through the USB modem. Net access could be affected if there is an error in the usbmod. The Called.com connection is established with low success rates. The problem is that the SuSE 11.2 does not have the usbmod. If it is manually added to the 11.0 version, then also this problem exists. Both the systems have different kernels. So the kernel message should be checked first.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Usbmod comes with the software on the stick's memory. I'm using 11.2 now, so I could simply try to deactivate HWActivator and see what happens. Thanks for your post, but my original question is still not answered: what does /sbin/usbmod do or rather how does it work and in particular how is the value assigned to the option "$1". Anybody savvy with scripts here?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.