Automatic Activation, Hotplug and UDEV, Configuration
bmork
Posts: 167
Joined: Thu Mar 15, 2012 10:47 pm
Location: Oslo, Norway

Re: Huawei K5160

Post by bmork » Fri Feb 26, 2016 4:19 pm

hippo_arch wrote:Hi,

thanks!

Now adding module working as should :) but (actually, I already forget what should work now..)
The idea was to test if the "NDP at end of frame" quirk would make a difference. But it doesn't look like that was the problem. Or at least not the only problem.

Code: Select all

Feb 25 20:04:18 arch kernel: cdc_mbim 3-2:2.0: NDP will be placed at end of frame for this device.
That's good. Your changes to the driver did what they were supposed to do.


Code: Select all

Feb 25 20:04:34 arch NetworkManager[412]: <info>  (cdc-wdm0): IPv4 static configuration:
Feb 25 20:04:34 arch NetworkManager[412]: <info>    address 10.167.148.109/30
Feb 25 20:04:34 arch NetworkManager[412]: <info>    gateway 10.167.148.110
Feb 25 20:04:34 arch NetworkManager[412]: <info>    DNS 217.77.165.81
Feb 25 20:04:34 arch NetworkManager[412]: <info>    DNS 217.77.165.211
So all this looks good, but you still cannot get any packets through? Not even pinging the DNS servers? Do the interface counters show anything odd? I guess they won't, but it's easy to verify with ifconfig.

I'm sorry, but I don't have any good ideas at the moment. We are in blind guessing land as far as I can understand. Anyone else?

bmork
Posts: 167
Joined: Thu Mar 15, 2012 10:47 pm
Location: Oslo, Norway

Re: Huawei K5160

Post by bmork » Wed Mar 02, 2016 11:43 pm

bmork wrote:

Code: Select all

Feb 25 20:04:18 arch kernel: cdc_mbim 3-2:2.0: NDP will be placed at end of frame for this device.
That's good. Your changes to the driver did what they were supposed to do.
OK, so I just got an E3372 today with the exact same problem. It requires the NDP-to-end quirk (which is already applied since the device ID is 12d1:157d), but it also needs the attached patch. Please try that on top of your NDP-to-end change, and see if this works for you as well.
Attachments
0001-cdc_ncm-toggle-altsetting-to-force-reset-before-setu.patch
(1.57 KiB) Downloaded 379 times

hippo_arch
Posts: 13
Joined: Mon Feb 15, 2016 11:35 pm

Re: Huawei K5160

Post by hippo_arch » Thu Mar 03, 2016 1:04 am

Hi,

patched, recompiled, loaded.. but again I connect to carrier, but no ping at all to nothing (internet, gw, dns).

Code: Select all

Mar 02 23:59:14 arch kernel: usb 3-3: new high-speed USB device number 5 using xhci_hcd
Mar 02 23:59:15 arch kernel: usb-storage 3-3:1.0: USB Mass Storage device detected
Mar 02 23:59:15 arch kernel: scsi host9: usb-storage 3-3:1.0
Mar 02 23:59:15 arch usb_modeswitch[6140]: switch device 12d1:1f1e on 003/005
Mar 02 23:59:16 arch kernel: cdc_mbim 3-3:2.0: setting rx_max = 16384
Mar 02 23:59:16 arch kernel: cdc_mbim 3-3:2.0: NDP will be placed at end of frame for this device.
Mar 02 23:59:16 arch kernel: cdc_mbim 3-3:2.0: cdc-wdm0: USB WDM device
Mar 02 23:59:16 arch kernel: cdc_mbim 3-3:2.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-3, CDC MBIM, 86:5c:76:e0:b4:60
Mar 02 23:59:16 arch kernel: usb-storage 3-3:2.2: USB Mass Storage device detected
Mar 02 23:59:16 arch kernel: scsi host10: usb-storage 3-3:2.2
Mar 02 23:59:16 arch kernel: cdc_mbim 3-3:2.0 wwp0s20u3c2: renamed from wwan0
Mar 02 23:59:16 arch ModemManager[388]: opening device...
Mar 02 23:59:16 arch ModemManager[388]: cannot connect to proxy: Could not connect: Connection refused
Mar 02 23:59:16 arch ModemManager[388]: spawning new mbim-proxy (try 1)...
Mar 02 23:59:16 arch ModemManager[388]: [/dev/cdc-wdm0] Read max control message size from descriptors file: 1024
Mar 02 23:59:17 arch kernel: scsi 10:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
Mar 02 23:59:17 arch kernel: sd 10:0:0:0: [sdb] Attached SCSI removable disk
Mar 02 23:59:17 arch root[6162]: usb_modeswitch: switched to 12d1:1f1e on 003/005
Mar 02 23:59:18 arch ModemManager[388]: <info>  Creating modem with plugin 'Huawei' and '2' ports
Mar 02 23:59:18 arch ModemManager[388]: <info>  Modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3' successfully created
Mar 02 23:59:18 arch ModemManager[388]: opening device...
Mar 02 23:59:18 arch ModemManager[388]: [/dev/cdc-wdm0] Read max control message size from descriptors file: 1024
Mar 02 23:59:20 arch ModemManager[388]: <info>  Modem: state changed (unknown -> disabled)
Mar 02 23:59:20 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state changed, 'disabled' --> 'enabling' (reason: user preference)
Mar 02 23:59:20 arch NetworkManager[375]: <info>  (cdc-wdm0): new Broadband device (carrier: UNKNOWN, driver: 'cdc_mbim', ifindex: 0)
Mar 02 23:59:20 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Mar 02 23:59:20 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state 'enabling'
Mar 02 23:59:20 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Mar 02 23:59:20 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (disabled -> enabling)
Mar 02 23:59:20 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> registering)
Mar 02 23:59:20 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (registering -> home)
Mar 02 23:59:21 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> registered)
Mar 02 23:59:21 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state changed, 'enabling' --> 'registered' (reason: user-requested)
Mar 02 23:59:30 arch NetworkManager[375]: <info>  (cdc-wdm0): Activation: starting connection 'Vodafone Default' (d36e0a6c-190f-4352-87b2-4e9240022564)
Mar 02 23:59:30 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Mar 02 23:59:30 arch NetworkManager[375]: <info>  NetworkManager state is now CONNECTING
Mar 02 23:59:30 arch ModemManager[388]: <info>  Simple connect started...
Mar 02 23:59:30 arch ModemManager[388]: <info>  Simple connect state (4/8): Wait to get fully enabled
Mar 02 23:59:30 arch ModemManager[388]: <info>  Simple connect state (5/8): Register
Mar 02 23:59:30 arch ModemManager[388]: <info>  Simple connect state (6/8): Bearer
Mar 02 23:59:30 arch ModemManager[388]: <info>  Simple connect state (7/8): Connect
Mar 02 23:59:30 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)
Mar 02 23:59:30 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Mar 02 23:59:31 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
Mar 02 23:59:31 arch ModemManager[388]: <info>  Simple connect state (8/8): All done
Mar 02 23:59:31 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state changed, 'connecting' --> 'connected' (reason: user-requested)
Mar 02 23:59:31 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: prepare -> config (reason 'none') [40 50 0]
Mar 02 23:59:31 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: config -> ip-config (reason 'none') [50 70 0]
Mar 02 23:59:31 arch NetworkManager[375]: <info>  (cdc-wdm0): IPv6 configuration disabled
Mar 02 23:59:31 arch NetworkManager[375]: <info>  (cdc-wdm0): IPv4 static configuration:
Mar 02 23:59:31 arch NetworkManager[375]: <info>    address 10.162.84.89/30
Mar 02 23:59:31 arch NetworkManager[375]: <info>    gateway 10.162.84.90
Mar 02 23:59:31 arch NetworkManager[375]: <info>    DNS 217.77.165.81
Mar 02 23:59:31 arch NetworkManager[375]: <info>    DNS 217.77.165.211
Mar 02 23:59:31 arch avahi-daemon[391]: Joining mDNS multicast group on interface wwp0s20u3c2.IPv4 with address 10.162.84.89.
Mar 02 23:59:31 arch avahi-daemon[391]: New relevant interface wwp0s20u3c2.IPv4 for mDNS.
Mar 02 23:59:31 arch avahi-daemon[391]: Registering new address record for 10.162.84.89 on wwp0s20u3c2.IPv4.
Mar 02 23:59:31 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
Mar 02 23:59:31 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
Mar 02 23:59:31 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: secondaries -> activated (reason 'none') [90 100 0]
Mar 02 23:59:31 arch NetworkManager[375]: <info>  NetworkManager state is now CONNECTED_LOCAL
Mar 02 23:59:31 arch NetworkManager[375]: <info>  NetworkManager state is now CONNECTED_GLOBAL
Mar 02 23:59:31 arch NetworkManager[375]: <info>  Policy set 'Vodafone Default' (wwp0s20u3c2) as default for IPv4 routing and DNS.
Mar 02 23:59:31 arch NetworkManager[375]: <info>  Writing DNS information to /usr/bin/resolvconf
Mar 02 23:59:31 arch NetworkManager[375]: <info>  (cdc-wdm0): Activation: successful, device activated.

bmork
Posts: 167
Joined: Thu Mar 15, 2012 10:47 pm
Location: Oslo, Norway

Re: Huawei K5160

Post by bmork » Thu Mar 03, 2016 9:15 am

hippo_arch wrote:Hi,

patched, recompiled, loaded.. but again I connect to carrier, but no ping at all to nothing (internet, gw, dns).
Shit. I was really hoping that this was the last piece of the puzzle. Well, thanks a lot for the quick testing.

Don't know what else to test.

EDIT: One thing just occured to me: The instructions I gave you earlier was for a cdc_mbim rebuild only. Note that the additional patch I posted requires you to rebuild and reload *both* cdc_ncm and cdc_mbim, since the last fix is in the cdc_ncm code. Did you do this?

If not, then please try (with both your and mine patch applied):

Code: Select all

make -C /lib/modules/`uname -r`/build/ SUBDIRS=/home/hippo/Downloads/linux-4.5-rc5/drivers/net/usb cdc_ncm.ko
make -C /lib/modules/`uname -r`/build/ SUBDIRS=/home/hippo/Downloads/linux-4.5-rc5/drivers/net/usb cdc_mbim.ko
rmmod cdc_mbim
rmmod cdc_ncm
insmod /home/hippo/Downloads/linux-4.5-rc5/drivers/net/usb/cdc_ncm.ko
insmod /home/hippo/Downloads/linux-4.5-rc5/drivers/net/usb/cdc_mbim.ko

hippo_arch
Posts: 13
Joined: Mon Feb 15, 2016 11:35 pm

Re: Huawei K5160

Post by hippo_arch » Thu Mar 03, 2016 9:47 am

Hi,

oh, I should see that yesterday.. my fault also :)

What it should do now? Should I be able to connect via normal LTE or it should be do ethernet bridge even if DisableSwitching=0? (because it did eth bridge)

Code: Select all

Mar 03 08:44:39 arch kernel: usb 3-2: new high-speed USB device number 11 using xhci_hcd
Mar 03 08:44:39 arch kernel: usb-storage 3-2:1.0: USB Mass Storage device detected
Mar 03 08:44:39 arch kernel: scsi host15: usb-storage 3-2:1.0
Mar 03 08:44:40 arch usb_modeswitch[7941]: switch device 12d1:1f1e on 003/011
Mar 03 08:44:40 arch kernel: usb 3-2: USB disconnect, device number 11
Mar 03 08:44:40 arch kernel: usb 3-2: new high-speed USB device number 12 using xhci_hcd
Mar 03 08:44:41 arch kernel: cdc_ether 3-2:1.0 eth0: register 'cdc_ether' at usb-0000:00:14.0-2, CDC Ethernet Device, 0c:5b:8f:27:9a:64
Mar 03 08:44:41 arch kernel: usb-storage 3-2:1.2: USB Mass Storage device detected
Mar 03 08:44:41 arch kernel: scsi host16: usb-storage 3-2:1.2
Mar 03 08:44:41 arch NetworkManager[375]: <warn>  (eth0): failed to find device 7 'eth0' with udev
Mar 03 08:44:41 arch NetworkManager[375]: <info>  (eth0): new Ethernet device (carrier: OFF, driver: 'cdc_ether', ifindex: 7)
Mar 03 08:44:42 arch root[7947]: usb_modeswitch: switched to 12d1:157f on 003/012
Mar 03 08:44:42 arch kernel: cdc_ether 3-2:1.0 enp0s20u2: renamed from eth0
Mar 03 08:44:42 arch NetworkManager[375]: <info>  (eth0): interface index 7 renamed iface from 'eth0' to 'enp0s20u2'
Mar 03 08:44:42 arch NetworkManager[375]: <info>  (enp0s20u2): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Mar 03 08:44:42 arch NetworkManager[375]: <info>  (enp0s20u2): link connected
Mar 03 08:44:42 arch kernel: IPv6: ADDRCONF(NETDEV_UP): enp0s20u2: link is not ready
Mar 03 08:44:42 arch kernel: cdc_ether 3-2:1.0 enp0s20u2: kevent 12 may have been dropped
Mar 03 08:44:42 arch kernel: cdc_ether 3-2:1.0 enp0s20u2: kevent 12 may have been dropped
Mar 03 08:44:42 arch NetworkManager[375]: <info>  keyfile: add connection in-memory (97400f45-1759-493d-af94-cee8451c3a6a,"Wired connection 2")
Mar 03 08:44:42 arch NetworkManager[375]: <info>  (enp0s20u2): created default wired connection 'Wired connection 2'
Mar 03 08:44:42 arch NetworkManager[375]: <info>  (enp0s20u2): link disconnected
Mar 03 08:44:42 arch kernel: scsi 16:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
Mar 03 08:44:42 arch kernel: sd 16:0:0:0: [sdb] Attached SCSI removable disk
Mar 03 08:44:44 arch ModemManager[388]: <info>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2': not supported by any plugin
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): link connected
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Mar 03 08:44:50 arch kernel: cdc_ether 3-2:1.0 enp0s20u2: kevent 12 may have been dropped
Mar 03 08:44:50 arch NetworkManager[375]: <info>  Auto-activating connection 'Wired connection 2'.
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): Activation: starting connection 'Wired connection 2' (97400f45-1759-493d-af94-cee8451c3a6a)
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Mar 03 08:44:50 arch NetworkManager[375]: <info>  NetworkManager state is now CONNECTING
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): device state change: prepare -> config (reason 'none') [40 50 0]
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): device state change: config -> ip-config (reason 'none') [50 70 0]
Mar 03 08:44:50 arch NetworkManager[375]: <info>  Activation (enp0s20u2) Beginning DHCPv4 transaction (timeout in 45 seconds)
Mar 03 08:44:50 arch NetworkManager[375]: <info>  dhclient started with pid 7975
Mar 03 08:44:50 arch dhclient[7975]: DHCPDISCOVER on enp0s20u2 to 255.255.255.255 port 67 interval 6
Mar 03 08:44:50 arch dhclient[7975]: DHCPREQUEST on enp0s20u2 to 255.255.255.255 port 67
Mar 03 08:44:50 arch dhclient[7975]: DHCPOFFER from 192.168.9.1
Mar 03 08:44:50 arch dhclient[7975]: DHCPACK from 192.168.9.1
Mar 03 08:44:50 arch NetworkManager[375]: <info>    address 192.168.9.100
Mar 03 08:44:50 arch NetworkManager[375]: <info>    plen 24 (255.255.255.0)
Mar 03 08:44:50 arch NetworkManager[375]: <info>    gateway 192.168.9.1
Mar 03 08:44:50 arch NetworkManager[375]: <info>    server identifier 192.168.9.1
Mar 03 08:44:50 arch NetworkManager[375]: <info>    lease time 86400
Mar 03 08:44:50 arch NetworkManager[375]: <info>    nameserver '192.168.9.1'
Mar 03 08:44:50 arch NetworkManager[375]: <info>    nameserver '192.168.9.1'
Mar 03 08:44:50 arch NetworkManager[375]: <info>    domain name 'VodafoneMobile.vmbvodafonemobile.api'
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): DHCPv4 state changed unknown -> bound
Mar 03 08:44:50 arch avahi-daemon[391]: Joining mDNS multicast group on interface enp0s20u2.IPv4 with address 192.168.9.100.
Mar 03 08:44:50 arch avahi-daemon[391]: New relevant interface enp0s20u2.IPv4 for mDNS.
Mar 03 08:44:50 arch avahi-daemon[391]: Registering new address record for 192.168.9.100 on enp0s20u2.IPv4.
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): device state change: secondaries -> activated (reason 'none') [90 100 0]
Mar 03 08:44:50 arch NetworkManager[375]: <info>  NetworkManager state is now CONNECTED_LOCAL
Mar 03 08:44:50 arch dhclient[7975]: bound to 192.168.9.100 -- renewal in 35613 seconds.
Mar 03 08:44:50 arch NetworkManager[375]: <info>  NetworkManager state is now CONNECTED_GLOBAL
Mar 03 08:44:50 arch NetworkManager[375]: <info>  Policy set 'Wired connection 2' (enp0s20u2) as default for IPv4 routing and DNS.
Mar 03 08:44:50 arch NetworkManager[375]: <info>  Writing DNS information to /usr/bin/resolvconf
Mar 03 08:44:50 arch NetworkManager[375]: <info>  (enp0s20u2): Activation: successful, device activated.
Mar 03 08:44:50 arch dbus[376]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Mar 03 08:44:50 arch systemd[1]: Starting Network Manager Script Dispatcher Service...
Mar 03 08:44:50 arch dbus[376]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Mar 03 08:44:50 arch systemd[1]: Started Network Manager Script Dispatcher Service.
Mar 03 08:44:51 arch avahi-daemon[391]: Joining mDNS multicast group on interface enp0s20u2.IPv6 with address fe80::e5b:8fff:fe27:9a64.
Mar 03 08:44:51 arch avahi-daemon[391]: New relevant interface enp0s20u2.IPv6 for mDNS.
Mar 03 08:44:51 arch avahi-daemon[391]: Registering new address record for fe80::e5b:8fff:fe27:9a64 on enp0s20u2.*.
Mar 03 08:44:53 arch NetworkManager[375]: <info>  Activation (enp0s20u2) Beginning DHCPv6 transaction (timeout in 45 seconds)
Mar 03 08:44:53 arch NetworkManager[375]: <info>  dhclient started with pid 8025
Mar 03 08:44:53 arch dhclient[8025]: XMT: Info-Request on enp0s20u2, interval 1010ms.
Mar 03 08:44:53 arch dhclient[8025]: RCV: Reply message on enp0s20u2 from fe80::b8ab:beff:fe34:0.
Mar 03 08:44:53 arch NetworkManager[375]: <info>    nameserver 'fe80::b8ab:beff:fe34:0'
Mar 03 08:44:53 arch NetworkManager[375]: <info>  (enp0s20u2): DHCPv6 state changed unknown -> bound
Mar 03 08:44:53 arch NetworkManager[375]: <info>  Policy set 'Wired connection 2' (enp0s20u2) as default for IPv6 routing and DNS.
Mar 03 08:44:53 arch NetworkManager[375]: <info>  Writing DNS information to /usr/bin/resolvconf
Mar 03 08:44:53 arch NetworkManager[375]: <info>  (enp0s20u2): DHCPv6 client pid 8025 exited with status 0
Mar 03 08:44:53 arch NetworkManager[375]: <info>  (enp0s20u2): DHCPv6 state changed bound -> done

bmork
Posts: 167
Joined: Thu Mar 15, 2012 10:47 pm
Location: Oslo, Norway

Re: Huawei K5160

Post by bmork » Thu Mar 03, 2016 11:35 am

hippo_arch wrote:Hi,

oh, I should see that yesterday.. my fault also :)

What it should do now? Should I be able to connect via normal LTE or it should be do ethernet bridge even if DisableSwitching=0? (because it did eth bridge)

Code: Select all

Mar 03 08:44:39 arch kernel: usb 3-2: new high-speed USB device number 11 using xhci_hcd
Mar 03 08:44:39 arch kernel: usb-storage 3-2:1.0: USB Mass Storage device detected
Mar 03 08:44:39 arch kernel: scsi host15: usb-storage 3-2:1.0
Mar 03 08:44:40 arch usb_modeswitch[7941]: switch device 12d1:1f1e on 003/011
Mar 03 08:44:40 arch kernel: usb 3-2: USB disconnect, device number 11
Mar 03 08:44:40 arch kernel: usb 3-2: new high-speed USB device number 12 using xhci_hcd
Mar 03 08:44:41 arch kernel: cdc_ether 3-2:1.0 eth0: register 'cdc_ether' at usb-0000:00:14.0-2, CDC Ethernet Device, 0c:5b:8f:27:9a:64
Mar 03 08:44:41 arch kernel: usb-storage 3-2:1.2: USB Mass Storage device detected
Mar 03 08:44:41 arch kernel: scsi host16: usb-storage 3-2:1.2
Mar 03 08:44:41 arch NetworkManager[375]: <warn>  (eth0): failed to find device 7 'eth0' with udev
Mar 03 08:44:41 arch NetworkManager[375]: <info>  (eth0): new Ethernet device (carrier: OFF, driver: 'cdc_ether', ifindex: 7)
Mar 03 08:44:42 arch root[7947]: usb_modeswitch: switched to 12d1:157f on 003/012
Oh, that was an unexpected side effect of the usb_modeswitch MBIM logic. I guess usb_modeswitch failed to detect that cdc_mbim was available, and decided to switch the modem into "legacy mode". Make sure cdc_mbim is loaded before the modem is plugged in and see if you can make usb_modeswitch select cfg #2 again.

(this unexpected change isn't directly related to the driver patching)

hippo_arch
Posts: 13
Joined: Mon Feb 15, 2016 11:35 pm

Re: Huawei K5160

Post by hippo_arch » Thu Mar 03, 2016 11:55 am

Damn.. it was my fault. I changed DisableSwitching=0 instead of DisableMBIMGlobal=0 :)

But now.. it's ... wait for it... wait for it.. working! Even I can ping the internet :)

What is bad on this way is, that http://vodafonemobile.vmb doesnt work (there is nice statictic about which network are you using and how much data is gone from FUP).

I tried also reach 10.175.63.40, but it doesnt listen on port 80.

Code: Select all

Mar 03 10:50:30 arch kernel: usb 3-2: new high-speed USB device number 16 using xhci_hcd
Mar 03 10:50:31 arch kernel: usb-storage 3-2:1.0: USB Mass Storage device detected
Mar 03 10:50:31 arch kernel: scsi host20: usb-storage 3-2:1.0
Mar 03 10:50:31 arch usb_modeswitch[9404]: switch device 12d1:1f1e on 003/016
Mar 03 10:50:32 arch kernel: cdc_mbim 3-2:2.0: setting rx_max = 16384
Mar 03 10:50:32 arch kernel: cdc_mbim 3-2:2.0: NDP will be placed at end of frame for this device.
Mar 03 10:50:32 arch kernel: cdc_mbim 3-2:2.0: cdc-wdm0: USB WDM device
Mar 03 10:50:32 arch kernel: cdc_mbim 3-2:2.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-2, CDC MBIM, 86:5c:76:e0:b4:60
Mar 03 10:50:32 arch kernel: usb-storage 3-2:2.2: USB Mass Storage device detected
Mar 03 10:50:32 arch ModemManager[388]: opening device...
Mar 03 10:50:32 arch ModemManager[388]: cannot connect to proxy: Could not connect: Connection refused
Mar 03 10:50:32 arch ModemManager[388]: spawning new mbim-proxy (try 1)...
Mar 03 10:50:32 arch kernel: scsi host21: usb-storage 3-2:2.2
Mar 03 10:50:32 arch kernel: cdc_mbim 3-2:2.0 wwp0s20u2c2: renamed from wwan0
Mar 03 10:50:32 arch ModemManager[388]: [/dev/cdc-wdm0] Read max control message size from descriptors file: 1024
Mar 03 10:50:33 arch kernel: scsi 21:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
Mar 03 10:50:33 arch kernel: sd 21:0:0:0: [sdb] Attached SCSI removable disk
Mar 03 10:50:33 arch root[9430]: usb_modeswitch: switched to 12d1:1f1e on 003/016
Mar 03 10:50:34 arch ModemManager[388]: <info>  Creating modem with plugin 'Huawei' and '2' ports
Mar 03 10:50:34 arch ModemManager[388]: <info>  Modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2' successfully created
Mar 03 10:50:34 arch ModemManager[388]: opening device...
Mar 03 10:50:34 arch ModemManager[388]: [/dev/cdc-wdm0] Read max control message size from descriptors file: 1024
Mar 03 10:50:36 arch ModemManager[388]: <info>  Modem: state changed (unknown -> disabled)
Mar 03 10:50:36 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state changed, 'disabled' --> 'enabling' (reason: user preference)
Mar 03 10:50:36 arch NetworkManager[375]: <info>  (cdc-wdm0): new Broadband device (carrier: UNKNOWN, driver: 'cdc_mbim', ifindex: 0)
Mar 03 10:50:36 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Mar 03 10:50:36 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state 'enabling'
Mar 03 10:50:36 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Mar 03 10:50:36 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/1: state changed (disabled -> enabling)
Mar 03 10:50:37 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/1: state changed (enabling -> enabled)
Mar 03 10:50:37 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state changed, 'enabling' --> 'enabled' (reason: user-requested)
Mar 03 10:50:42 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/1: 3GPP Registration state changed (unknown -> registering)
Mar 03 10:50:42 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/1: 3GPP Registration state changed (registering -> home)
Mar 03 10:50:42 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/1: state changed (enabled -> registered)
Mar 03 10:50:42 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state changed, 'enabled' --> 'registered' (reason: unknown)
Mar 03 10:50:51 arch NetworkManager[375]: <info>  (cdc-wdm0): Activation: starting connection 'Vodafone Default' (d36e0a6c-190f-4352-87b2-4e9240022564)
Mar 03 10:50:51 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Mar 03 10:50:51 arch NetworkManager[375]: <info>  NetworkManager state is now CONNECTING
Mar 03 10:50:51 arch ModemManager[388]: <info>  Simple connect started...
Mar 03 10:50:51 arch ModemManager[388]: <info>  Simple connect state (4/8): Wait to get fully enabled
Mar 03 10:50:51 arch ModemManager[388]: <info>  Simple connect state (5/8): Register
Mar 03 10:50:51 arch ModemManager[388]: <info>  Simple connect state (6/8): Bearer
Mar 03 10:50:51 arch ModemManager[388]: <info>  Simple connect state (7/8): Connect
Mar 03 10:50:51 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/1: state changed (registered -> connecting)
Mar 03 10:50:51 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Mar 03 10:50:51 arch ModemManager[388]: <info>  Modem /org/freedesktop/ModemManager1/Modem/1: state changed (connecting -> connected)
Mar 03 10:50:51 arch ModemManager[388]: <info>  Simple connect state (8/8): All done
Mar 03 10:50:51 arch NetworkManager[375]: <info>  (cdc-wdm0): modem state changed, 'connecting' --> 'connected' (reason: user-requested)
Mar 03 10:50:52 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: prepare -> config (reason 'none') [40 50 0]
Mar 03 10:50:52 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: config -> ip-config (reason 'none') [50 70 0]
Mar 03 10:50:52 arch NetworkManager[375]: <info>  (cdc-wdm0): IPv6 configuration disabled
Mar 03 10:50:52 arch NetworkManager[375]: <info>  (cdc-wdm0): IPv4 static configuration:
Mar 03 10:50:52 arch NetworkManager[375]: <info>    address 10.175.63.40/28
Mar 03 10:50:52 arch NetworkManager[375]: <info>    gateway 10.175.63.33
Mar 03 10:50:52 arch NetworkManager[375]: <info>    DNS 217.77.165.81
Mar 03 10:50:52 arch NetworkManager[375]: <info>    DNS 217.77.165.211
Mar 03 10:50:52 arch avahi-daemon[391]: Joining mDNS multicast group on interface wwp0s20u2c2.IPv4 with address 10.175.63.40.
Mar 03 10:50:52 arch avahi-daemon[391]: New relevant interface wwp0s20u2c2.IPv4 for mDNS.
Mar 03 10:50:52 arch avahi-daemon[391]: Registering new address record for 10.175.63.40 on wwp0s20u2c2.IPv4.
Mar 03 10:50:52 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
Mar 03 10:50:52 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
Mar 03 10:50:52 arch NetworkManager[375]: <info>  (cdc-wdm0): device state change: secondaries -> activated (reason 'none') [90 100 0]
Mar 03 10:50:52 arch NetworkManager[375]: <info>  NetworkManager state is now CONNECTED_LOCAL
Mar 03 10:50:52 arch NetworkManager[375]: <info>  NetworkManager state is now CONNECTED_GLOBAL
Mar 03 10:50:52 arch NetworkManager[375]: <info>  Policy set 'Vodafone Default' (wwp0s20u2c2) as default for IPv4 routing and DNS.
Mar 03 10:50:52 arch NetworkManager[375]: <info>  Writing DNS information to /usr/bin/resolvconf
Mar 03 10:50:52 arch NetworkManager[375]: <info>  (cdc-wdm0): Activation: successful, device activated.
Mar 03 10:50:52 arch dbus[376]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Mar 03 10:50:52 arch systemd[1]: Starting Network Manager Script Dispatcher Service...
Mar 03 10:50:52 arch dbus[376]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Mar 03 10:50:52 arch systemd[1]: Started Network Manager Script Dispatcher Service.

bmork
Posts: 167
Joined: Thu Mar 15, 2012 10:47 pm
Location: Oslo, Norway

Re: Huawei K5160

Post by bmork » Thu Mar 03, 2016 12:17 pm

hippo_arch wrote:Damn.. it was my fault. I changed DisableSwitching=0 instead of DisableMBIMGlobal=0 :)

But now.. it's ... wait for it... wait for it.. working! Even I can ping the internet :)
Great!

Could you repeat the test without your first patch (the NDP-to-end quirk)? I just got at report that the K5160 works without this. It would be nice to have that confirmed. If that is true, then we can keep the cdc_mbim quirk entries at the current minimum and just fix cdc_ncm.

hippo_arch
Posts: 13
Joined: Mon Feb 15, 2016 11:35 pm

Re: Huawei K5160

Post by hippo_arch » Thu Mar 03, 2016 12:30 pm

Yes, it's working.

I deleted for sure compiled cdc_mbim.ko, then:

modprobe cdc-wdm
insmod /home/hippo/Downloads/linux-4.5-rc5/drivers/net/usb/cdc_ncm.ko
modprobe cdc_mbim

bmork
Posts: 167
Joined: Thu Mar 15, 2012 10:47 pm
Location: Oslo, Norway

Re: Huawei K5160

Post by bmork » Thu Mar 03, 2016 4:13 pm

hippo_arch wrote:Yes, it's working.

I deleted for sure compiled cdc_mbim.ko, then:

modprobe cdc-wdm
insmod /home/hippo/Downloads/linux-4.5-rc5/drivers/net/usb/cdc_ncm.ko
modprobe cdc_mbim
Thanks! Good to know that we didn't need that quirk after all.

I'll do a bit more testing of the other fix, and then try to get it into the stable kernels.

hippo_arch
Posts: 13
Joined: Mon Feb 15, 2016 11:35 pm

Re: Huawei K5160

Post by hippo_arch » Fri Mar 04, 2016 9:11 am

I have to put back the modem early next week, so I will try to test it during weekend as much as possible :)

cp36609
Posts: 1
Joined: Tue Jun 07, 2016 2:40 pm

Re: Huawei K5160

Post by cp36609 » Tue Jun 07, 2016 2:47 pm

Hello,

I am a newbie and I have a 5160 that I need to use for SMS send and receive.

Will greatly appreciate if you could assist in easy steps or point me towards a link

I have no knowledge on compiling

thomasschaefer
Posts: 113
Joined: Sun Jul 17, 2011 12:08 pm

Re: Huawei K5160

Post by thomasschaefer » Wed Jun 08, 2016 9:20 pm

What was now the summary?

The device works with mbim or cdc_ether?

Which usb_modeswitch message/command is necessary?

What is the minimum kernel version (4.2)?

Are patches needed?

Was IPv6 tested?

It will be the third kind of E3372 for me. Hopefully one of them should be good. (telekom and huawei weren't, they ignored ipv6)

Regards,

Thomas

byb3
Posts: 1
Joined: Mon Feb 13, 2017 8:54 pm

Re: Huawei K5160

Post by byb3 » Mon Feb 13, 2017 9:01 pm

This can be solved using udev. Make sure switching is disabled in /etc/usb_modeswitch.conf

root@raspberrypi:/etc/udev/rules.d# uname -a
Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux

root@raspberrypi:/etc/udev/rules.d# cat 15-huawei-k5160.rules
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f1e", RUN+="/usr/sbin/usb_modeswitch -v 0x12d1 -p 0x1f1e -J"

You will get an eth1 with a 192.168.9.100 address and you can access a landing page at 192.168.9.1.

Best Regards,

ebazan
Posts: 1
Joined: Sun Mar 18, 2018 1:55 pm

Re: Huawei K5160

Post by ebazan » Sun Mar 18, 2018 6:11 pm

hippo_arch wrote:
LOM wrote: 12d1:1f1e can retain the same id after usb_modeswitch because it has dual configs and usb_modeswitch will select config #2 if your system has cdc_mbim drivers installed.
The device will only be switched to a new usb id when the system does not have cdc_mbim drivers.
I seems that on my K5160 usb_modeswitch on my raspberry Pi is only able to change profile but not the product-id.
I just need to get a tty inteface to pemanently disable CD-ROM; is there any quick way to get a ttyUSBx interface?

Thanks,

e.

Post Reply