3

I've connected a '3G Dongle' to my PC and I've wondered how it automatically connected in Ubuntu 14.04 without installing any supporting software of the Dongle manually, but I've installed that while I was working in Windows .

lsusb

Bus 001 Device 004: ID 05c6:6001 Qualcomm, Inc.

usb-devices | awk '/6001/' RS=

Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  4 Spd=480 MxCh= 0> Ver= 2.00
Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
Vendor=05c6 ProdID=6001 Rev=00.00
Manufacturer=Qualcomm, Incorporated
Product=Qualcomm mobile device
#Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=06 Prot=00 Driver=rndis_host

What is the reason?

Can we edit/view that file and also give some additional details regarding that?

Madhusudhanan
  • 833
  • 2
  • 15
  • 34
  • 1
    Can't explain everything, but AFAIK main job is done by ['usb_modswitch'](http://www.draisberghof.de/usb_modeswitch/) and ['ModemManager'](http://www.freedesktop.org/wiki/Software/ModemManager/) – Ron Aug 17 '15 at 07:28
  • You could start by telling us the actual device/chip model. – xangua Aug 17 '15 at 07:39
  • 1
    Please add output of `usb-devices | awk '/6001/' RS=` terminal command. – Pilot6 Aug 21 '15 at 16:15

4 Answers4

6

Linux (and therefore Ubuntu) works with "generic" devices. "Generic" means 1 module (A.k.a. "driver") that supports many devices. Not every manufacturer of these dongles have their own chip inside these dongles. They tend to purchase these in large quantities from the same manufacturer so internally they are identical to other dongles using the same chip.

For Linux/Ubuntu that normally means someone used a dongle with Linux with the same chipset as you have, figured out how to get it to work and someone updated that generic driver so it got support for that chipset. That means that that device is supported out of the box on Linux.

In Windows each seller of that dongle will have its own software with that dongle and also their own (but maybe just slightly different) driver to go along with it.

Fabby
  • 34,341
  • 38
  • 97
  • 191
Rinzwind
  • 293,910
  • 41
  • 570
  • 710
  • Thanks @Rinzwind. But Still I can't able to understand. will you explain it a bit in an easy way? – Madhusudhanan Aug 17 '15 at 08:25
  • 1
    The usb basically says "hi i m a 3g dongle" and the linux kernel automatically loads the generic driver for that device type (3g dongle). That driver could work (that is the plan at least) with basically all 3g dongles that are supported (or the chips inside of them are), so instead of you installing a driver for each 3g dongle you have, the kernel has 1 built-in. That obviously cuts the size and the complexity of said installation (which is automatic) – Νίκος Φυτίλης Aug 21 '15 at 13:14
  • I've a USB wifi dongle with rtl8192 chipset; it works out of the box, no installation necessary. If you look through `/lib/modules/$(uname -r)/kernel/drivers/staging/` folder, you will see two folders there, for rtl8192e and rtl8192cu chipsets. So Linux kernel comes *already packaged* with those drivers. Now , there's cases where Linux kernels says "OK, you have this rtl8192 chipset , but I have rtl8192cu. This may work". It also depends on linux distribution. For instance, I've had Puppy Linux on my usb drive somewhere, and wifi wouldn't work with it. Because their kernel doesnt have driver – Sergiy Kolodyazhnyy Aug 21 '15 at 18:13
2

If you run lsusb terminal command, you will see what chip is installed in your dongle. Your device is

05c6:6001 Qualcomm, Inc.

In most cases Linux identifies the dongle by the chip code 12d1:1506.

Some of devices are implicitly defined in the option kernel module by vendor and product ids, but some are identified by some other parameters.

Your device works as a network card, not as a serial modem and it is identified differently.

You can see in your output Cls=e0(wlcon) this means that the device is a USB_CLASS_WIRELESS_CONTROLLER. That is defined in /include/uapi/linux/usb/ch9.h.

It is managed by rndis_host driver. It is linked to it because Sub=01 Prot=03.

That is defined in the /drivers/net/usb/rndis_host.c in

USB_INTERFACE_INFO(USB_CLASS_WIRELESS_CONTROLLER, 1, 3),
.driver_info = (unsigned long) &rndis_info,

Do not look for these files in your computer. They are in the Linux source tree. E.g. rndis_host.c

Pilot6
  • 88,764
  • 91
  • 205
  • 313
  • Thanks, but each device will have `some Chip Code` respectively and how the system knows that it is `USB-Modem` or not? How to disconnect\Connect it via Terminal? Is there any Specific Code for that? @Pilot6 – Madhusudhanan Aug 21 '15 at 14:10
  • 1
    The system knows that it is a modem, because someone has added the code to the list of modems. Regarding how to connect/disconnect using command line it is better to ask a separate question. Short answer is `nmcli nm wifi off` ;-) – Pilot6 Aug 21 '15 at 14:12
  • Again thanks! May i Know where the file is situated ? @Pilot6 – Madhusudhanan Aug 21 '15 at 14:18
  • 1
    I added it to the answer. – Pilot6 Aug 21 '15 at 14:22
  • +1 Thanks Again, There are so many files in it. Hence how to find it? @Pilot6 – Madhusudhanan Aug 21 '15 at 14:29
  • You need to identify your chip by `lsusb`. But I can't get what do you want to change there if it works OK. Do you want to disable it or what? – Pilot6 Aug 21 '15 at 14:31
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/27239/discussion-between-sridhar-and-pilot6). – Madhusudhanan Aug 21 '15 at 14:33
1

Linux already contains all the necessary generic drivers that are required by most of the devices out there. This is possible because Linux is powered by a huge community of open source developers (which surprisingly nowadays include Microsoft too.)

It does not mean that you an not install your own drivers, you most certainly can.

akxer
  • 2,016
  • 6
  • 21
  • 38
0

I have identical behaviour with my 3G dongle. Ubuntu has support already built-in while Windows OS doesn't. When you plug in the dongle in Windows the OS installs the drivers which is on the dongle automatically.

nobody
  • 4,342
  • 17
  • 24
  • Your answer could do with a little more detail. Not saying it doesn't answer the question, but it doesn't really go in depth at all and is likely to be downvoted. – RolandiXor Aug 21 '15 at 21:33