Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
joef
Posts: 2
Joined: 23 Aug 2019, 19:04

Huawei K5150 - /dev/ttyUSB missing

Post by joef » 23 Aug 2019, 20:04

Hi Forum,
i got a Huawei K5150 on a RB3 with Debian10, somehow i'm missing the excpected /dev/ttyUSB device.
Anyone has a hint please?

This is what i got:

dmesg

Code: Select all


[   12.551953] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
[   12.683137] usb 1-1.5: New USB device found, idVendor=12d1, idProduct=15ec, bcdDevice= 1.02
[   12.683149] usb 1-1.5: New USB device strings: Mfr=6, Product=5, SerialNumber=8
[   12.683154] usb 1-1.5: Product: Vodafone Mobile
[   12.683158] usb 1-1.5: Manufacturer: Vodafone (Huawei)
[   12.683163] usb 1-1.5: SerialNumber: FFFFFFFFFFFFFFFF
[   12.686028] usb-storage 1-1.5:1.0: USB Mass Storage device detected
[   12.687125] scsi host0: usb-storage 1-1.5:1.0
[   13.004275] usbcore: registered new interface driver uas
[   13.869360] usbcore: registered new interface driver cdc_ncm
[   13.876800] usbcore: registered new interface driver cdc_wdm
[   13.902509] cdc_mbim 1-1.5:2.0: setting rx_max = 16384
[   13.902776] cdc_mbim 1-1.5:2.0: setting tx_max = 16384
[   13.902787] cdc_mbim 1-1.5:2.0: NDP will be placed at end of frame for this device.
[   13.903270] cdc_mbim 1-1.5:2.0: cdc-wdm0: USB WDM device
[   13.903816] cdc_mbim 1-1.5:2.0 wwan0: register 'cdc_mbim' at usb-3f980000.usb-1.5, CDC MBIM, ee:23:18:8e:12:49
[   13.904728] usbcore: registered new interface driver cdc_mbim

/lib/udev/rules.d/40-usb_modeswitch.rules

Code: Select all

ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="15ec", RUN+="usb_modeswitch '%b/%k'"
/var/log/syslog

Code: Select all

Aug 23 18:34:46 rb-xx01 kernel: [   12.551953] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
Aug 23 18:34:46 rb-xx01 kernel: [   12.683137] usb 1-1.5: New USB device found, idVendor=12d1, idProduct=15ec, bcdDevice= 1.02
Aug 23 18:34:46 rb-xx01 kernel: [   12.683149] usb 1-1.5: New USB device strings: Mfr=6, Product=5, SerialNumber=8
Aug 23 18:34:46 rb-xx01 kernel: [   12.683154] usb 1-1.5: Product: Vodafone Mobile
Aug 23 18:34:46 rb-xx01 kernel: [   12.683158] usb 1-1.5: Manufacturer: Vodafone (Huawei)
Aug 23 18:34:46 rb-xx01 kernel: [   12.683163] usb 1-1.5: SerialNumber: FFFFFFFFFFFFFFFF
Aug 23 18:34:46 rb-xx01 kernel: [   12.686028] usb-storage 1-1.5:1.0: USB Mass Storage device detected
Aug 23 18:34:46 rb-xx01 kernel: [   12.687125] scsi host0: usb-storage 1-1.5:1.0
Aug 23 18:34:46 rb-xx01 mtp-probe: checking bus 1, device 4: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5"
Aug 23 18:34:46 rb-xx01 mtp-probe: bus: 1, device: 4 was not an MTP device
Aug 23 18:34:46 rb-xx01 systemd[1]: Created slice system-usb_modeswitch.slice.
Aug 23 18:34:46 rb-xx01 systemd[1]: Starting USB_ModeSwitch_1-1.5...
Aug 23 18:34:46 rb-xx01 systemd[1]: Starting USB_ModeSwitch_1-1.5:1.0...
Aug 23 18:34:46 rb-xx01 kernel: [   13.004275] usbcore: registered new interface driver uas
Aug 23 18:34:46 rb-xx01 systemd[1]: Starting USB_ModeSwitch_host0...
Aug 23 18:34:46 rb-xx01 systemd[1]: usb_modeswitch@host0.service: Succeeded.
Aug 23 18:34:46 rb-xx01 systemd[1]: Started USB_ModeSwitch_host0.
Aug 23 18:34:46 rb-xx01 systemd[1]: Starting USB_ModeSwitch_host0...
Aug 23 18:34:46 rb-xx01 systemd[1]: usb_modeswitch@host0.service: Succeeded.
Aug 23 18:34:46 rb-xx01 systemd[1]: Started USB_ModeSwitch_host0.
Aug 23 18:34:46 rb-xx01 systemd[1]: Starting USB_ModeSwitch_host0...
Aug 23 18:34:46 rb-xx01 systemd[1]: usb_modeswitch@host0.service: Succeeded.
Aug 23 18:34:46 rb-xx01 systemd[1]: Started USB_ModeSwitch_host0.
Aug 23 18:34:46 rb-xx01 systemd[1]: Starting USB_ModeSwitch_host0...
Aug 23 18:34:47 rb-xx01 systemd[1]: usb_modeswitch@host0.service: Succeeded.
Aug 23 18:34:47 rb-xx01 systemd[1]: Started USB_ModeSwitch_host0.
Aug 23 18:34:47 rb-xx01 mtp-probe: checking bus 1, device 4: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5"
Aug 23 18:34:47 rb-xx01 mtp-probe: bus: 1, device: 4 was not an MTP device
Aug 23 18:34:47 rb-xx01 usb_modeswitch: switch device 12d1:15ec on 001/004
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_host0...
Aug 23 18:34:47 rb-xx01 systemd[1]: usb_modeswitch@host0.service: Succeeded.
Aug 23 18:34:47 rb-xx01 systemd[1]: Started USB_ModeSwitch_host0.
Aug 23 18:34:47 rb-xx01 systemd[1]: usb_modeswitch@1-1.5:1.0.service: Succeeded.
Aug 23 18:34:47 rb-xx01 systemd[1]: Started USB_ModeSwitch_1-1.5:1.0.
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_host0...
Aug 23 18:34:47 rb-xx01 systemd[1]: usb_modeswitch@host0.service: Succeeded.
Aug 23 18:34:47 rb-xx01 systemd[1]: Started USB_ModeSwitch_host0.
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_1-1.5:1.0...
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_1-1.5:2.1...
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_1-1.5:2.0...
Aug 23 18:34:47 rb-xx01 kernel: [   13.869360] usbcore: registered new interface driver cdc_ncm
Aug 23 18:34:47 rb-xx01 kernel: [   13.876800] usbcore: registered new interface driver cdc_wdm
Aug 23 18:34:47 rb-xx01 systemd-udevd[512]: Using default interface naming scheme 'v240'.
Aug 23 18:34:47 rb-xx01 kernel: [   13.902509] cdc_mbim 1-1.5:2.0: setting rx_max = 16384
Aug 23 18:34:47 rb-xx01 kernel: [   13.902776] cdc_mbim 1-1.5:2.0: setting tx_max = 16384
Aug 23 18:34:47 rb-xx01 kernel: [   13.902787] cdc_mbim 1-1.5:2.0: NDP will be placed at end of frame for this device.
Aug 23 18:34:47 rb-xx01 kernel: [   13.903270] cdc_mbim 1-1.5:2.0: cdc-wdm0: USB WDM device
Aug 23 18:34:47 rb-xx01 kernel: [   13.903816] cdc_mbim 1-1.5:2.0 wwan0: register 'cdc_mbim' at usb-3f980000.usb-1.5, CDC MBIM, ee:23:18:8e:12:49
Aug 23 18:34:47 rb-xx01 kernel: [   13.904728] usbcore: registered new interface driver cdc_mbim
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_wwan0...
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_cdc-wdm0...
Aug 23 18:34:47 rb-xx01 systemd[1]: usb_modeswitch@wwan0.service: Succeeded.
Aug 23 18:34:47 rb-xx01 systemd[1]: Started USB_ModeSwitch_wwan0.
Aug 23 18:34:47 rb-xx01 systemd[1]: usb_modeswitch@cdc-wdm0.service: Succeeded.
Aug 23 18:34:47 rb-xx01 systemd[1]: Started USB_ModeSwitch_cdc-wdm0.
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_wwan0...
Aug 23 18:34:47 rb-xx01 systemd[1]: usb_modeswitch@wwan0.service: Succeeded.
Aug 23 18:34:47 rb-xx01 systemd[1]: Started USB_ModeSwitch_wwan0.
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_cdc-wdm0...
Aug 23 18:34:47 rb-xx01 systemd[1]: usb_modeswitch@cdc-wdm0.service: Succeeded.
Aug 23 18:34:47 rb-xx01 systemd[1]: Started USB_ModeSwitch_cdc-wdm0.
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_rx-0...
Aug 23 18:34:47 rb-xx01 systemd[1]: Starting USB_ModeSwitch_tx-0...
Aug 23 18:34:48 rb-xx01 systemd[1]: usb_modeswitch@rx-0.service: Succeeded.
Aug 23 18:34:48 rb-xx01 systemd[1]: Started USB_ModeSwitch_rx-0.
Aug 23 18:34:48 rb-xx01 systemd[1]: usb_modeswitch@tx-0.service: Succeeded.
Aug 23 18:34:48 rb-xx01 systemd[1]: Started USB_ModeSwitch_tx-0.
Aug 23 18:34:48 rb-xx01 systemd[1]: Starting USB_ModeSwitch_tx-0...
Aug 23 18:34:48 rb-xx01 systemd[1]: Starting USB_ModeSwitch_rx-0...
Aug 23 18:34:48 rb-xx01 systemd[1]: usb_modeswitch@tx-0.service: Succeeded.
Aug 23 18:34:48 rb-xx01 systemd[1]: Started USB_ModeSwitch_tx-0.
Aug 23 18:34:48 rb-xx01 usb_modeswitch: switch device 12d1:15ec on 001/004
Aug 23 18:34:48 rb-xx01 systemd[1]: usb_modeswitch@rx-0.service: Succeeded.
Aug 23 18:34:48 rb-xx01 systemd[1]: Started USB_ModeSwitch_rx-0.
Aug 23 18:34:48 rb-xx01 systemd[1]: usb_modeswitch@1-1.5:1.0.service: Succeeded.
Aug 23 18:34:48 rb-xx01 systemd[1]: Started USB_ModeSwitch_1-1.5:1.0.
Aug 23 18:34:48 rb-xx01 usb_modeswitch: switch device 12d1:15ec on 001/004
Aug 23 18:34:48 rb-xx01 systemd[1]: usb_modeswitch@1-1.5:2.1.service: Succeeded.
Aug 23 18:34:48 rb-xx01 systemd[1]: Started USB_ModeSwitch_1-1.5:2.1.
Aug 23 18:34:48 rb-xx01 systemd[1]: apt-daily-upgrade.service: Succeeded.
Aug 23 18:34:48 rb-xx01 systemd[1]: Started Daily apt upgrade and clean activities.
Aug 23 18:34:48 rb-xx01 usb_modeswitch: switch device 12d1:15ec on 001/004
Aug 23 18:34:48 rb-xx01 systemd[1]: usb_modeswitch@1-1.5:2.0.service: Succeeded.
Aug 23 18:34:48 rb-xx01 systemd[1]: Started USB_ModeSwitch_1-1.5:2.0.
Aug 23 18:34:48 rb-xx01 root: usb_modeswitch: switched to 12d1:15ec on 001/004
Aug 23 18:34:48 rb-xx01 systemd[1]: usb_modeswitch@1-1.5.service: Succeeded.
Aug 23 18:34:48 rb-xx01 systemd[1]: Started USB_ModeSwitch_1-1.5.
Aug 23 18:34:48 rb-xx01 systemd[1]: Startup finished in 1.825s (kernel) + 13.393s (userspace) = 15.219s.
Aug 23 18:34:50 rb-xx01 systemd[1]: systemd-rfkill.service: Succeeded.
Aug 23 18:35:09 rb-xx01 systemd[1]: systemd-fsckd.service: Succeeded.
Aug 23 18:35:16 rb-xx01 systemd[1]: systemd-hostnamed.service: Succeeded.
Aug 23 18:39:43 rb-xx01 systemd[1]: Created slice User Slice of UID 0.
Aug 23 18:39:43 rb-xx01 systemd[1]: Starting User Runtime Directory /run/user/0...
Aug 23 18:39:43 rb-xx01 systemd[1]: Started User Runtime Directory /run/user/0.
Aug 23 18:39:43 rb-xx01 systemd[1]: Starting User Manager for UID 0...
Aug 23 18:39:44 rb-xx01 systemd[1075]: Reached target Paths.
Aug 23 18:39:44 rb-xx01 systemd[1075]: Reached target Timers.
Aug 23 18:39:44 rb-xx01 systemd[1075]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Aug 23 18:39:44 rb-xx01 systemd[1075]: Listening on GnuPG cryptographic agent and passphrase cache.
Aug 23 18:39:44 rb-xx01 systemd[1075]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Aug 23 18:39:44 rb-xx01 systemd[1075]: Listening on GnuPG network certificate management daemon.
Aug 23 18:39:44 rb-xx01 systemd[1075]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Aug 23 18:39:44 rb-xx01 systemd[1075]: Reached target Sockets.
Aug 23 18:39:44 rb-xx01 systemd[1075]: Reached target Basic System.
Aug 23 18:39:44 rb-xx01 systemd[1075]: Reached target Default.
Aug 23 18:39:44 rb-xx01 systemd[1075]: Startup finished in 273ms.
Aug 23 18:39:44 rb-xx01 systemd[1]: Started User Manager for UID 0.
Aug 23 18:39:44 rb-xx01 systemd[1]: Started Session c1 of user root.


/var/log/usb_modeswitch_1-1.5

Code: Select all

USB_ModeSwitch log from Fri Aug 23 18:34:47 CEST 2019

Use global config file: /etc/usb_modeswitch.conf
Raw parameters: {--switch-mode} {1-1.5:2.0}
Device may have an MBIM configuration, check driver ...
Use top device dir /sys/bus/usb/devices/1-1.5
Check class of first interface ...
 driver for MBIM devices is available
Find MBIM configuration number ...
 Interface 0 class is 02.

----------------
USB values from sysfs:
  manufacturer  Vodafone (Huawei)
  product       Vodafone Mobile
  serial        FFFFFFFFFFFFFFFF
----------------
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
ConfigList: /usr/share/usb_modeswitch/12d1:15ec pack/12d1:15ec pack/
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/12d1:15ec
! matched. Read config data
Device may have an MBIM configuration, check driver ...
 driver for MBIM devices is available
Find MBIM configuration number ...
Command line:
usb_modeswitch -W -D  -b 1 -g 4 -v 12d1 -p 15ec -f $flags(config)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Read long config from command line

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.5.2 (C) Josua Dietze 2017
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x15ec
Configuration=0x02
System integration mode enabled

Use given bus/device number: 001/004 ...
Look for default devices ...
 bus/device number matched
  found USB ID 12d1:15ec
   vendor ID matched
   product ID matched
 Found devices in default mode (1)
Get the current device configuration ...
Current configuration number is 2
Use interface number 0
 with class 2

USB description data (for identification)
-------------------------
Manufacturer: Vodafone (Huawei)
     Product: Vodafone Mobile
  Serial No.: FFFFFFFFFFFFFFFF
-------------------------
Target configuration 2 already active. Nothing to do. Bye!

--------------------------------
(end of usb_modeswitch output)


Core program reported switching failure. Exit

Command line:
usb_modeswitch -W -D  -b 1 -g 4 -v 12d1 -p 15ec -f $flags(config)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Read long config from command line

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.5.2 (C) Josua Dietze 2017
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x15ec
Configuration=0x02
System integration mode enabled

Use given bus/device number: 001/004 ...
Look for default devices ...
 bus/device number matched
  found USB ID 12d1:15ec
   vendor ID matched
   product ID matched
 Found devices in default mode (1)
Get the current device configuration ...
Current configuration number is 2
Use interface number 0
 with class 2

USB description data (for identification)
-------------------------
Manufacturer: Vodafone (Huawei)
     Product: Vodafone Mobile
  Serial No.: FFFFFFFFFFFFFFFF
-------------------------
Target configuration 2 already active. Nothing to do. Bye!

--------------------------------
(end of usb_modeswitch output)


Core program reported switching failure. Exit

Command line:
usb_modeswitch -W -D  -b 1 -g 4 -v 12d1 -p 15ec -f $flags(config)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Read long config from command line

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.5.2 (C) Josua Dietze 2017
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x15ec
Configuration=0x02
System integration mode enabled

Use given bus/device number: 001/004 ...
Look for default devices ...
 bus/device number matched
  found USB ID 12d1:15ec
   vendor ID matched
   product ID matched
 Found devices in default mode (1)
Get the current device configuration ...
Current configuration number is 2
Use interface number 0
 with class 2

USB description data (for identification)
-------------------------
Manufacturer: Vodafone (Huawei)
     Product: Vodafone Mobile
  Serial No.: FFFFFFFFFFFFFFFF
-------------------------
Target configuration 2 already active. Nothing to do. Bye!

--------------------------------
(end of usb_modeswitch output)


Core program reported switching failure. Exit

 Read attributes ...
 All attributes matched

Mode switching was successful, found 12d1:15ec (Vodafone (Huawei): Vodafone Mobile)
Logger is /usr/bin/logger
Check for AVOID_RESET_QUIRK kernel attribute
 AVOID_RESET_QUIRK activated

All done, exit


lsusb -v

Code: Select all

Bus 001 Device 004: ID 12d1:15ec Huawei Technologies Co., Ltd.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol       255
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x15ec
  bcdDevice            1.02
  iManufacturer           6 Vodafone (Huawei)
  iProduct                5 Vodafone Mobile
  iSerial                 8 FFFFFFFFFFFFFFFF
  bNumConfigurations      2
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0020
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          1 configuration 0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x005f
    bNumInterfaces          2
    bConfigurationValue     2
    iConfiguration          9 configuration 1
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass      14
      bFunctionProtocol       0
      iFunction               3 K5150
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass     14
      bInterfaceProtocol      0
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      CDC MBIM:
        bcdMBIMVersion       1.00
        wMaxControlMessage   1024
        bNumberFilters       16
        bMaxFilterSize       20
        wMaxSegmentSize      1500
        bmNetworkCapabilities 0x20
          8-byte ntb input size
      CDC MBIM Extended:
        bcdMBIMExtendedVersion           1.00
        bMaxOutstandingCommandMessages     16
        wMTU                             1500
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0
      bInterfaceProtocol      2
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0
      bInterfaceProtocol      2
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)


lsmod

Code: Select all

Module                  Size  Used by
cdc_mbim               16384  0
cdc_wdm                20480  1 cdc_mbim
cdc_ncm                28672  1 cdc_mbim
uas                    24576  0
bnep                   20480  2
hci_uart               40960  1
btbcm                  16384  1 hci_uart
serdev                 20480  1 hci_uart
bluetooth             389120  24 hci_uart,bnep,btbcm
ecdh_generic           28672  1 bluetooth
brcmfmac              311296  0
brcmutil               16384  1 brcmfmac
sha256_generic         20480  0
raspberrypi_hwmon      16384  0
hwmon                  16384  1 raspberrypi_hwmon
cfg80211              614400  1 brcmfmac
snd_bcm2835            24576  1
rfkill                 28672  4 bluetooth,cfg80211
snd_pcm               102400  1 snd_bcm2835
bcm2835_codec          36864  0
snd_timer              32768  1 snd_pcm
v4l2_mem2mem           24576  1 bcm2835_codec
bcm2835_v4l2           45056  0
snd                    73728  5 snd_timer,snd_bcm2835,snd_pcm
bcm2835_mmal_vchiq     32768  2 bcm2835_codec,bcm2835_v4l2
v4l2_common            16384  1 bcm2835_v4l2
videobuf2_dma_contig    20480  1 bcm2835_codec
videobuf2_vmalloc      16384  1 bcm2835_v4l2
videobuf2_memops       16384  2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2         24576  3 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common       45056  4 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
videodev              200704  6 bcm2835_codec,v4l2_common,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
media                  36864  2 videodev,v4l2_mem2mem
vc_sm_cma              36864  1 bcm2835_mmal_vchiq
uio_pdrv_genirq        16384  0
fixed                  16384  0
uio                    20480  1 uio_pdrv_genirq
ip_tables              24576  0
x_tables               32768  1 ip_tables
ipv6                  450560  22




lsb_release -a

Code: Select all

No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

Maybe i'm fully wrong but shouldnt there a USB device comming up in order to continiue with wvdial?
Any help would be grat thx

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Huawei K5150 - /dev/ttyUSB missing

Post by LOM » 24 Aug 2019, 04:20

joef wrote:

Code: Select all

[   13.869360] usbcore: registered new interface driver cdc_ncm
[   13.876800] usbcore: registered new interface driver cdc_wdm
[   13.902509] cdc_mbim 1-1.5:2.0: setting rx_max = 16384
[   13.902776] cdc_mbim 1-1.5:2.0: setting tx_max = 16384
[   13.902787] cdc_mbim 1-1.5:2.0: NDP will be placed at end of frame for this device.
[   13.903270] cdc_mbim 1-1.5:2.0: cdc-wdm0: USB WDM device
[   13.903816] cdc_mbim 1-1.5:2.0 wwan0: register 'cdc_mbim' at usb-3f980000.usb-1.5, CDC MBIM, ee:23:18:8e:12:49
[   13.904728] usbcore: registered new interface driver cdc_mbim

K5150 is not a dial-up modm, it is a direct net connection device and after driver binding (cdc-mbim, cdc-wdm) will appear as a linux wwan device.
NetworkManager will see it and can use it for WAN connection.

joef
Posts: 2
Joined: 23 Aug 2019, 19:04

Re: Huawei K5150 - /dev/ttyUSB missing

Post by joef » 24 Aug 2019, 21:44

Thank you !!!, that was the bit i was missing since it's a long time ago that i had setup USB modems and i was not aware about the new MBIM protocol yet.

For those one in the Forum who have similar issues, this is the very manual way how to setup the K5150 on my Raspberry:

Get the MBIM libs: apt-get install libmbim-utils

Setup the APN, in my case there was no PIN set - /etc/mbim-network.conf

Code: Select all

APN=web.vodafone.de
#APN_USER=
#APN_PASS=
#APN_AUTH=
#PROXY=yes
I've set the global cloudflare DNS, makes it easier to go on: /etc/resolv.conf

Code: Select all

nameserver 1.2.3.4
Then start the WWAN dialup:

Code: Select all

root@rb-test ~ # mbim-network /dev/cdc-wdm0 start
Loading profile at /etc/mbim-network.conf...
    APN: web.vodafone.de
    APN auth protocol: unset
    APN user: unset
    APN password: unset
    mbim-proxy: no
Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close '...
[/dev/cdc-wdm0] Subscriber ready status retrieved: Ready state: 'initialized' Subscriber ID: '262022407XXXXXX' SIM ICCID: '8949202418510XXXXXX' Ready info: 'none' Telephone numbers: (1) '00172XXXXXX' [/dev/cdc-wdm0] Session not closed: TRID: '3'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 3)
Querying registration state 'mbimcli -d /dev/cdc-wdm0 --query-registration-state --no-open=3 --no-close '...
[/dev/cdc-wdm0] Registration status: Network error: 'unknown' Register state: 'home' Register mode: 'automatic' Available data classes: 'lte' Current cellular class: 'gsm' Provider ID: '26202' Provider name: 'Vodafone.de' Roaming text: 'unknown' Registration flags: 'packet-service-automatic-attach' [/dev/cdc-wdm0] Session not closed: TRID: '4'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 4)
Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0 --attach-packet-service --no-open=4 --no-close '...
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 5)
Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect=apn='web.vodafone.de' --no-open=5 --no-close '...
Network started successfully
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 7)

Get the IP address details - sample

Code: Select all

root@rb-test # mbimcli -d /dev/cdc-wdm0 -p --query-ip-configuration=0

[/dev/cdc-wdm0] IPv4 configuration available: 'address, gateway, dns, mtu'
     IP [0]: '100.116.241.74/30'
    Gateway: '100.116.241.73'
    DNS [0]: '139.7.30.126'
    DNS [1]: '139.7.30.125'
        MTU: '1500'

[/dev/cdc-wdm0] IPv6 configuration available: 'none'

Now adapt the above ip information to your adapter (wwan01)

Code: Select all

root@rb-test # ip link set dev wwan0 up
root@rb-test # ip addr add 100.116.241.74/30 dev wwan0
root@rb-test # ip route add default via 100.116.241.73 dev wwan0
Test:

Code: Select all

root@rb-test /etc # curl ipconfig.io
109.40.xxx.yyy
root@rb-test /etc # whois 109.40.xxx.yyy
.....
netname:        DE-D2VODAFONE
This is just the manual way, no scripts or tools involved yet but good to see how this can work.

Credits to:
https://techship.com/faq/how-to-set-up- ... -in-linux/
https://gist.github.com/Juul/e42c5b6ec7 ... 36d3f1cb2c

joannaylor
Posts: 2
Joined: 15 Jun 2024, 05:49

Re: Huawei K5150 - /dev/ttyUSB missing

Post by joannaylor » 15 Jun 2024, 06:11

joef wrote: 23 Aug 2019, 20:04 Hi Forum,
i got a Huawei K5150 on a RB3 with Debian10, somehow i'm missing the excpected /dev/ttyUSB device.
Anyone has a hint please?
Maybe i'm fully wrong but shouldnt there a USB device comming up in order to continiue with wvdial?
Any help would be grat thx slope
Sometimes, additional drivers or firmware packages are needed for certain modems to work correctly. Check if there are any specific drivers required for the Huawei K5150 modem on Debian 10.

Post Reply