Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
spole340
Posts: 2
Joined: 10 Oct 2021, 21:56

Install Huawei E3372h - 320 trouble

Post by spole340 » 10 Oct 2021, 22:20

Hello,
I'm beginner at Linux and I had idea to have mobile internet on server Ubuntu 20.04.2 LTS through Huawei e3372h-320. I have studied that I must switch mode from USB storage to modem, but on the internet is many different topics how can I fix it. I would like to ask you if someone can help me.
I did: lsusb

Code: Select all

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 009: ID 12d1:14db Huawei Technologies Co., Ltd. E353/E3131
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
then

Code: Select all

Bus 001 Device 009: ID 12d1:14db Huawei Technologies Co., Ltd. E353/E3131
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x14db E353/E3131
  bcdDevice            1.02
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0058
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower                2mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass       6 Ethernet Networking
      bFunctionProtocol       0 
      iFunction               8 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      6 Ethernet Networking
      bInterfaceProtocol      0 
      iInterface              5 
      CDC Header:
        bcdCDC               1.10
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      CDC Ethernet:
        iMacAddress                      7 (??)
        bmEthernetStatistics    0x00000000
        wMaxSegmentSize               1514
        wNumberMCFilters            0x0000
        bNumberPowerFilters              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               5
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              6 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        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     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval  
        
I tried to do command: usb_modeswitch -v 0x12d1 -p 0x14db -V 0x12d1 -P 0x1506
and it replies:

Look for target devices ...
No devices in target mode or class found
Look for default devices ...
Found devices in default mode (1)
Access device 009 on bus 001
Error opening the device. Abort

when I tried to: sudo usb_modeswitch -v 0x12d1 -p 0x14db -V 0x12d1 -P 0x1506 -J

It replies:
Look for target devices ...
No devices in target mode or class found
Look for default devices ...
Found devices in default mode (1)
Access device 011 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 2
Error: can't use storage command in MessageContent with interface 0; interface class is 2, expected 8. Abort


I'm not sure that switched number 0x1506 is correct....
then tried to do command mmcli -L but it replied that no modem was found...
but something was done:

Code: Select all

[  758.314716] usb 1-8: USB disconnect, device number 2
[  758.314813] cdc_ether 1-8:1.0 enx001e101f0000: unregister 'cdc_ether' usb-0000:00:14.0-8, CDC Ethernet Device
[  778.261872] usb 1-8: new high-speed USB device number 3 using xhci_hcd
[  778.411293] usb 1-8: New USB device found, idVendor=12d1, idProduct=1f01, bcdDevice= 1.02
[  778.411299] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  778.411302] usb 1-8: Product: HUAWEI_MOBILE
[  778.411305] usb 1-8: Manufacturer: HUAWEI_MOBILE
[  778.411308] usb 1-8: SerialNumber: 0123456789ABCDEF
[  778.430892] usb-storage 1-8:1.0: USB Mass Storage device detected
[  778.434203] scsi host4: usb-storage 1-8:1.0
[  778.434458] usbcore: registered new interface driver usb-storage
[  778.436249] usbcore: registered new interface driver uas
[  779.482603] usb 1-8: USB disconnect, device number 3
[  780.061881] usb 1-8: new high-speed USB device number 4 using xhci_hcd
[  780.210932] usb 1-8: New USB device found, idVendor=12d1, idProduct=14db, bcdDevice= 1.02
[  780.210938] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  780.210941] usb 1-8: Product: HUAWEI_MOBILE
[  780.210944] usb 1-8: Manufacturer: HUAWEI_MOBILE
[  780.290105] cdc_ether 1-8:1.0 eth0: register 'cdc_ether' at usb-0000:00:14.0-8, CDC Ethernet Device, 00:1e:10:1f:00:00
[  780.300802] cdc_ether 1-8:1.0 enx001e101f0000: renamed from eth0
[  781.546600] usbcore: registered new interface driver usbserial_generic
[  781.546604] usbserial: USB Serial support registered for generic
[  781.550118] usbcore: registered new interface driver option
[  781.550122] usbserial: USB Serial support registered for GSM modem (1-port)
and after command sudo ip addr:
6: enx001e101f0000: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:1e:10:1f:00:00 brd ff:ff:ff:ff:ff:ff
this connection was found, but modem was not found by modem manager... I need to configure SIM card etc.

Thank you very much for your help!

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

Re: Install Huawei E3372h - 320 trouble

Post by LOM » 11 Oct 2021, 05:36

spole340 wrote: 10 Oct 2021, 22:20 Hello,
I'm beginner at Linux and I had idea to have mobile internet on server Ubuntu 20.04.2 LTS through Huawei e3372h-320. I have studied that I must switch mode from USB storage to modem, but on the internet is many different topics how can I fix it. I would like to ask you if someone can help me.
I did: lsusb

Code: Select all

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 009: ID 12d1:14db Huawei Technologies Co., Ltd. E353/E3131
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
usb_modeswitch is included in Ubuntu, it will switch mobile internet devices without user intervention and the USB Id 12d1:14db is an Id after switching, the interface composition after switching only contains a direct net device, there are no serial modem interfaces so ModemManager can't do anything with it.
Net devices like this are handled by NetworkManager and that is where you enable it.
There are no SIM card, APN, or password configurations to be made, your device has read all it needs to know from the SIM card, from linux point of view it behaves exactly the same as a USB Ethernet adapter.

spole340
Posts: 2
Joined: 10 Oct 2021, 21:56

Re: Install Huawei E3372h - 320 trouble

Post by spole340 » 11 Oct 2021, 22:13

Thank you very much for your help! It seems that it works, but I made connection in Network Manager, but I can't connect to the internet.
I know that is not theme for this forum but I would like to ask you if you can help me that you know something about it.

Code: Select all

~$ sudo nmcli connection show
NAME                UUID                                  TYPE      DEVICE     >
Wired connection 1  2cb5fe2d-c5d2-3108-b581-5870e9c01987  ethernet  eno1       >
Wired connection 2  e09c8284-a75c-3b88-a291-4ba7984ba9f9  ethernet  enx001e101f>
docker0             48bebdd6-c471-4899-844e-d4f551ed6899  bridge    docker0    >
I want to connect to the internet through "Wired connection 2" with device enx001e101f

it seems that is local IP adress but not from internet

Code: Select all

4: enx001e101f0000: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1e:10:1f:00:00 brd ff:ff:ff:ff:ff:ff
    inet 192.168.8.100/24 brd 192.168.8.255 scope global dynamic noprefixroute enx001e101f0000
       valid_lft 84300sec preferred_lft 84300sec
    inet6 fe80::9cf3:a595:1fad:1df3/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
I tried to connect SIM card in cell phone and it works....
Here is properties of connection

Code: Select all

~$ sudo nmcli -p connection show "Wired connection 2" 
===============================================================================
                Connection profile details (Wired connection 2)
===============================================================================
connection.id:                          Wired connection 2
connection.uuid:                        e09c8284-a75c-3b88-a291-4ba7984ba9f9
connection.stable-id:                   --
connection.type:                        802-3-ethernet
connection.interface-name:              enx001e101f0000
connection.autoconnect:                 yes
connection.autoconnect-priority:        -999
connection.autoconnect-retries:         -1 (default)
connection.multi-connect:               0 (default)
connection.auth-retries:                -1
connection.timestamp:                   1633982840
connection.read-only:                   no
connection.permissions:                 --
connection.zone:                        --
connection.master:                      --
connection.slave-type:                  --
connection.autoconnect-slaves:          -1 (default)
connection.secondaries:                 --
connection.gateway-ping-timeout:        0
connection.metered:                     unknown
connection.lldp:                        default
connection.mdns:                        -1 (default)
connection.llmnr:                       -1 (default)
connection.wait-device-timeout:         -1
-------------------------------------------------------------------------------
802-3-ethernet.port:                    --
802-3-ethernet.speed:                   0
802-3-ethernet.duplex:                  --
802-3-ethernet.auto-negotiate:          no
802-3-ethernet.mac-address:             --
802-3-ethernet.cloned-mac-address:      --
802-3-ethernet.generate-mac-address-mask:--
802-3-ethernet.mac-address-blacklist:   --
802-3-ethernet.mtu:                     auto
802-3-ethernet.s390-subchannels:        --
802-3-ethernet.s390-nettype:            --
802-3-ethernet.s390-options:            --
802-3-ethernet.wake-on-lan:             default
802-3-ethernet.wake-on-lan-password:    --
-------------------------------------------------------------------------------
ipv4.method:                            auto
ipv4.dns:                               --
ipv4.dns-search:                        --
ipv4.dns-options:                       --
ipv4.dns-priority:                      0
ipv4.addresses:                         --
ipv4.gateway:                           --
ipv4.routes:                            --
ipv4.route-metric:                      -1
ipv4.route-table:                       0 (unspec)
ipv4.routing-rules:                     --
ipv4.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    --
ipv4.dhcp-iaid:                         --
ipv4.dhcp-timeout:                      2147483647 (infinity)
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     --
ipv4.dhcp-fqdn:                         --
ipv4.dhcp-hostname-flags:               0x0 (none)
ipv4.never-default:                     no
ipv4.may-fail:                          yes
ipv4.dad-timeout:                       -1 (default)
-------------------------------------------------------------------------------
ipv6.method:                            auto
ipv6.dns:                               --
ipv6.dns-search:                        --
ipv6.dns-options:                       --
ipv6.dns-priority:                      0
ipv6.addresses:                         --
ipv6.gateway:                           --
ipv6.routes:                            --
ipv6.route-metric:                      -1
ipv6.route-table:                       0 (unspec)
ipv6.routing-rules:                     --
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.addr-gen-mode:                     stable-privacy
ipv6.ra-timeout:                        0 (default)
ipv6.dhcp-duid:                         --
ipv6.dhcp-iaid:                         --
ipv6.dhcp-timeout:                      0 (default)
ipv6.dhcp-send-hostname:                yes
ipv6.dhcp-hostname:                     --
ipv6.dhcp-hostname-flags:               0x0 (none)
ipv6.token:                             --
-------------------------------------------------------------------------------
proxy.method:                           none
proxy.browser-only:                     no
proxy.pac-url:                          --
proxy.pac-script:                       --
-------------------------------------------------------------------------------
===============================================================================
      Activate connection details (e09c8284-a75c-3b88-a291-4ba7984ba9f9)
===============================================================================
GENERAL.NAME:                           Wired connection 2
GENERAL.UUID:                           e09c8284-a75c-3b88-a291-4ba7984ba9f9
GENERAL.DEVICES:                        enx001e101f0000
GENERAL.IP-IFACE:                       enx001e101f0000
GENERAL.STATE:                          activated
GENERAL.DEFAULT:                        no
GENERAL.DEFAULT6:                       no
GENERAL.SPEC-OBJECT:                    --
GENERAL.VPN:                            no
GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/3
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/4
GENERAL.ZONE:                           --
GENERAL.MASTER-PATH:                    --
-------------------------------------------------------------------------------
IP4.ADDRESS[1]:                         192.168.8.100/24
IP4.GATEWAY:                            192.168.8.1
IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.8.1, mt = 101
IP4.ROUTE[2]:                           dst = 192.168.8.0/24, nh = 0.0.0.0, mt = 101
IP4.DNS[1]:                             192.168.8.1
-------------------------------------------------------------------------------
DHCP4.OPTION[1]:                        dhcp_lease_time = 86400
DHCP4.OPTION[2]:                        domain_name_servers = 192.168.8.1
DHCP4.OPTION[3]:                        expiry = 1634065651
DHCP4.OPTION[4]:                        ip_address = 192.168.8.100
DHCP4.OPTION[5]:                        requested_broadcast_address = 1
DHCP4.OPTION[6]:                        requested_domain_name = 1
DHCP4.OPTION[7]:                        requested_domain_name_servers = 1
DHCP4.OPTION[8]:                        requested_domain_search = 1
DHCP4.OPTION[9]:                        requested_host_name = 1
DHCP4.OPTION[10]:                       requested_interface_mtu = 1
DHCP4.OPTION[11]:                       requested_ms_classless_static_routes = 1
DHCP4.OPTION[12]:                       requested_nis_domain = 1
DHCP4.OPTION[13]:                       requested_nis_servers = 1
DHCP4.OPTION[14]:                       requested_ntp_servers = 1
DHCP4.OPTION[15]:                       requested_rfc3442_classless_static_routes = 1
DHCP4.OPTION[16]:                       requested_root_path = 1
DHCP4.OPTION[17]:                       requested_routers = 1
DHCP4.OPTION[18]:                       requested_static_routes = 1
DHCP4.OPTION[19]:                       requested_subnet_mask = 1
DHCP4.OPTION[20]:                       requested_time_offset = 1
DHCP4.OPTION[21]:                       requested_wpad = 1
DHCP4.OPTION[22]:                       routers = 192.168.8.1
DHCP4.OPTION[23]:                       subnet_mask = 255.255.255.0
-------------------------------------------------------------------------------
IP6.ADDRESS[1]:                         fe80::9cf3:a595:1fad:1df3/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 101
IP6.DNS[1]:                             fe80::210:20ff:fe30:4050
-------------------------------------------------------------------------------
DHCP6.OPTION[1]:                        dhcp6_name_servers = fe80::210:20ff:fe30:4050
-------------------------------------------------------------------------------


Thank you very much for your kindness!

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

Re: Install Huawei E3372h - 320 trouble

Post by LOM » 12 Oct 2021, 03:16

Your device is a mini router with the mobile connection as WAN side and USB tether on the LAN side so you will get a private IP address from it. (The E8372h is almost the same device except that it also has a WiFi AP on its LAN side that can serve 10 clients.)

There is probably a built-in web server which you can browse at 192.168.8.1, maybe there is an APN setting there or a setting for starting/stopping the mobile link. Everything else looks ok on your tethered LAN side, you've got IP address, gateway, and the interface is up.

Post Reply