[OpenWrt-Devel] Huawei 3372 NCM support on CC not working

chrono chrono at open-resource.org
Mon Jul 6 04:39:40 EDT 2015


Ahoy everyone,

> If you are interested again, here is the working patch.

After removing the cover, I could verify that the Telekom Speedstick LTE 
V
is actually a Huawei 3372s (at least it says so on the label next to the 
IMEI).

I've applied mrkiko's latest patches and also tested vittgam's hints 
about
tx magic but the situation and symptoms habe not changed, here's the 
trace:

Huawei 3372 ncm-patch2 trace on mr3020 (MIPS)

dmesg after bootup:

[    0.000000] Linux version 3.18.16 (chrono at chronos) (gcc version 4.8.3 
(OpenWrt/Linaro GCC 4.8-2014.04 r46120) ) #1 Sat Jul 4 15:34:33 2015
[    0.000000] MyLoader: sysp=7ab7c29c, boardp=07ac6486, parts=24fed496
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 803500f0, node_mem_map 
81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 
bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, 
linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  
Total pages: 8128
[    0.000000] Kernel command line:  board=TL-MR3020  
console=ttyATH0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 
bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 
bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 28536K/32768K available (2452K kernel code, 119K 
rwdata, 524K rodata, 224K init, 188K bss, 4232K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, 
Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, 
Ref:25.000MHz
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 1024 (order: 0, 4096 
bytes)
[    0.090000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 
bytes)
[    0.100000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is TP-LINK TL-MR3020
[    0.370000] Switched to clocksource MIPS
[    0.370000] NET: Registered protocol family 2
[    0.380000] TCP established hash table entries: 1024 (order: 0, 4096 
bytes)
[    0.380000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.380000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.390000] TCP: reno registered
[    0.390000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.400000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.410000] NET: Registered protocol family 1
[    0.410000] PCI: CLS 0 bytes, default 32
[    0.410000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.430000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.430000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) 
(CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.440000] msgmni has been set to 55
[    0.460000] io scheduler noop registered
[    0.460000] io scheduler deadline registered (default)
[    0.460000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.470000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11, 
base_baud = 1562500) is a AR933X UART
[    0.480000] console [ttyATH0] enabled
[    0.480000] bootconsole [early0] disabled
[    0.500000] m25p80 spi0.0: found s25sl032p, expected m25p80
[    0.500000] m25p80 spi0.0: s25sl032p (4096 Kbytes)
[    0.510000] 5 tp-link partitions found on MTD device spi0.0
[    0.510000] Creating 5 MTD partitions on "spi0.0":
[    0.520000] 0x000000000000-0x000000020000 : "u-boot"
[    0.520000] 0x000000020000-0x000000132940 : "kernel"
[    0.530000] 0x000000132940-0x0000003f0000 : "rootfs"
[    0.530000] mtd: device 2 (rootfs) set to be root filesystem
[    0.540000] 1 squashfs-split partitions found on MTD device rootfs
[    0.540000] 0x0000003a0000-0x0000003f0000 : "rootfs_data"
[    0.550000] 0x0000003f0000-0x000000400000 : "art"
[    0.550000] 0x000000020000-0x0000003f0000 : "firmware"
[    0.580000] libphy: ag71xx_mdio: probed
[    1.170000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 
[uid=004dd041, driver=Generic PHY]
[    1.180000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    1.180000] TCP: cubic registered
[    1.180000] NET: Registered protocol family 17
[    1.190000] bridge: automatic filtering via arp/ip/ip6tables has been 
deprecated. Update your scripts to load br_netfilter if you need this.
[    1.200000] 8021q: 802.1Q VLAN Support v1.8
[    1.220000] VFS: Mounted root (squashfs filesystem) readonly on 
device 31:2.
[    1.220000] Freeing unused kernel memory: 224K (80368000 - 803a0000)
[    2.620000] init: Console is alive
[    2.620000] init: - watchdog -
[    4.380000] usbcore: registered new interface driver usbfs
[    4.380000] usbcore: registered new interface driver hub
[    4.390000] usbcore: registered new device driver usb
[    4.400000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) 
Driver
[    4.410000] ehci-platform: EHCI generic platform driver
[    4.410000] ehci-platform ehci-platform: EHCI Host Controller
[    4.420000] ehci-platform ehci-platform: new USB bus registered, 
assigned bus number 1
[    4.430000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    4.450000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    4.450000] hub 1-0:1.0: USB hub found
[    4.450000] hub 1-0:1.0: 1 port detected
[    4.460000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.470000] ohci-platform: OHCI generic platform driver
[    4.630000] init: - preinit -
[    5.450000] random: procd urandom read with 8 bits of entropy 
available
[    8.250000] eth0: link up (100Mbps/Full duplex)
[    8.740000] jffs2: notice: (339) jffs2_build_xattr_subsystem: 
complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) 
and 0 of xref (0 dead, 0 orphan) found.
[    8.760000] mount_root: switching to jffs2 overlay
[    8.810000] eth0: link down
[    8.830000] procd: - early -
[    8.830000] procd: - watchdog -
[    9.800000] procd: - ubus -
[   10.820000] procd: - init -
[   11.930000] NET: Registered protocol family 10
[   11.940000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.960000] usbcore: registered new interface driver cdc_wdm
[   11.970000] Loading modules backported from Linux version 
master-2015-03-09-0-g141f155
[   11.980000] Backport generated by backports.git 
backports-20150129-0-gdd4a670
[   11.990000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.010000] nf_conntrack version 0.5.0 (449 buckets, 1796 max)
[   12.040000] usbcore: registered new interface driver usbserial
[   12.050000] usbcore: registered new interface driver 
usbserial_generic
[   12.060000] usbserial: USB Serial support registered for generic
[   12.080000] xt_time: kernel timezone is -0000
[   12.090000] usbcore: registered new interface driver cdc_ncm
[   12.130000] cfg80211: Calling CRDA to update world regulatory domain
[   12.140000] usbcore: registered new interface driver huawei_cdc_ncm
[   12.170000] cfg80211: World regulatory domain updated:
[   12.170000] cfg80211:  DFS Master region: unset
[   12.170000] cfg80211:   (start_freq - end_freq @ bandwidth), 
(max_antenna_gain, max_eirp), (dfs_cac_time)
[   12.180000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), 
(N/A, 2000 mBm), (N/A)
[   12.190000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), 
(N/A, 2000 mBm), (N/A)
[   12.200000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), 
(N/A, 2000 mBm), (N/A)
[   12.210000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), 
(N/A, 2000 mBm), (N/A)
[   12.220000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 
160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   12.230000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), 
(N/A, 2000 mBm), (0 s)
[   12.230000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), 
(N/A, 2000 mBm), (N/A)
[   12.240000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), 
(N/A, 0 mBm), (N/A)
[   12.360000] usbcore: registered new interface driver cdc_mbim
[   12.370000] usbcore: registered new interface driver option
[   12.380000] usbserial: USB Serial support registered for GSM modem 
(1-port)
[   12.410000] ath: EEPROM regdomain: 0x0
[   12.410000] ath: EEPROM indicates default country code should be used
[   12.410000] ath: doing EEPROM country->regdmn map search
[   12.410000] ath: country maps to regdmn code: 0x3a
[   12.410000] ath: Country alpha2 being used: US
[   12.410000] ath: Regpair used: 0x3a
[   12.420000] ieee80211 phy0: Selected rate control algorithm 
'minstrel_ht'
[   12.430000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, 
irq=2
[   12.430000] cfg80211: Calling CRDA for country: US
[   12.450000] cfg80211: Regulatory domain changed to country: US
[   12.450000] cfg80211:  DFS Master region: FCC
[   12.460000] cfg80211:   (start_freq - end_freq @ bandwidth), 
(max_antenna_gain, max_eirp), (dfs_cac_time)
[   12.470000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), 
(N/A, 3000 mBm), (N/A)
[   12.470000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 
160000 KHz AUTO), (N/A, 1700 mBm), (N/A)
[   12.480000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 
160000 KHz AUTO), (N/A, 2300 mBm), (0 s)
[   12.490000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), 
(N/A, 3000 mBm), (N/A)
[   12.500000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), 
(N/A, 4000 mBm), (N/A)
[   22.550000] device eth0 entered promiscuous mode
[   22.550000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   24.690000] eth0: link up (100Mbps/Full duplex)
[   24.690000] br-lan: port 1(eth0) entered forwarding state
[   24.700000] br-lan: port 1(eth0) entered forwarding state
[   24.700000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   26.700000] br-lan: port 1(eth0) entered forwarding state
[   80.360000] random: nonblocking pool is initialized

Stick inserted:

[  309.790000] usb 1-1: new high-speed USB device number 2 using 
ehci-platform
[  309.950000] option 1-1:1.0: GSM modem (1-port) converter detected
[  309.960000] usb 1-1: GSM modem (1-port) converter now attached to 
ttyUSB0
[  309.970000] option 1-1:1.1: GSM modem (1-port) converter detected
[  309.970000] usb 1-1: GSM modem (1-port) converter now attached to 
ttyUSB1
[  310.030000] huawei_cdc_ncm 1-1:1.2: MAC-Address: 00:1e:10:1f:00:00
[  310.030000] huawei_cdc_ncm 1-1:1.2: setting rx_max = 16384
[  310.050000] huawei_cdc_ncm 1-1:1.2: NDP will be placed at end of 
frame for this device.
[  310.060000] huawei_cdc_ncm 1-1:1.2: cdc-wdm0: USB WDM device
[  310.060000] huawei_cdc_ncm 1-1:1.2 wwan0: register 'huawei_cdc_ncm' 
at usb-ehci-platform-1, Huawei CDC NCM device, 00:1e:10:1f:00:00

Modules:

arc4                    1312  2
ath                    19893  3 ath9k
ath9k                  87622  0
ath9k_common           17230  1 ath9k
ath9k_hw              337656  2 ath9k
cdc_mbim                3888  0
cdc_ncm                11733  2 cdc_mbim
cdc_wdm                 7829  2 cdc_mbim
cfg80211              213857  4 ath9k
compat                  1332  4 ath9k
crc16                   1015  0
crc_ccitt               1019  0
crypto_blkcipher       10647  1 arc4
crypto_hash             9762  0
ehci_hcd               32108  1 ehci_platform
ehci_platform           3376  0
gpio_button_hotplug     4464  0
huawei_cdc_ncm          1536  0
ip6_tables              9393  3 ip6table_raw
ip6t_REJECT             1184  0
ip6table_filter          608  0
ip6table_mangle         1152  0
ip6table_raw             576  0
ip_tables               9533  4 iptable_nat
ipt_MASQUERADE           656  1
ipt_REJECT               912  2
iptable_filter           672  1
iptable_mangle           944  1
iptable_nat              768  1
iptable_raw              640  1
ipv6                  258696 22 nf_conntrack_ipv6
ledtrig_usbdev          1936  0
mac80211              381507  1 ath9k
mii                     3528  1 usbnet
nf_conntrack           47723 11 nf_nat_ipv4
nf_conntrack_ftp        5312  1 nf_nat_ftp
nf_conntrack_ipv4       4704  8
nf_conntrack_ipv6       5024  0
nf_conntrack_rtcache    2448  0
nf_defrag_ipv4           806  1 nf_conntrack_ipv4
nf_defrag_ipv6          9047  1 nf_conntrack_ipv6
nf_log_common           2319  2 nf_log_ipv4
nf_log_ipv4             3184  0
nf_log_ipv6             3344  0
nf_nat                  9083  5 nf_nat_ipv4
nf_nat_ftp              1232  0
nf_nat_ipv4             3713  1 iptable_nat
nf_nat_masquerade_ipv4    1420  1 ipt_MASQUERADE
nf_reject_ipv4          1827  1 ipt_REJECT
nf_reject_ipv6          1943  1 ip6t_REJECT
nls_base                4976  1 usbcore
ohci_hcd               22191  1 ohci_platform
ohci_platform           2752  0
option                 26976  0
usb_common              1160  1 usbcore
usb_wwan                4391  1 option
usbcore               117316 13 option
usbnet                 17046  3 cdc_mbim
usbserial              17691  2 option
x_tables               10901 26 ipt_REJECT
xt_CT                   2352  0
xt_LOG                   768  0
xt_REDIRECT             1152  0
xt_TCPMSS               2656  0
xt_comment               480 23
xt_conntrack            2160  7
xt_id                    480  0
xt_limit                 992  1
xt_mac                   624  0
xt_mark                  672  0
xt_multiport            1184  0
xt_nat                  1152  0
xt_state                 688  0
xt_tcpudp               1728  3
xt_time                 1632  0

Interfaces:

crw-r--r--    1 root     root      188,   0 Jul  4 15:38 /dev/ttyUSB0
crw-r--r--    1 root     root      188,   1 Jul  4 15:38 /dev/ttyUSB1
crw-r--r--    1 root     root      180, 176 Jul  4 15:38 /dev/cdc-wdm0

wwan0     Link encap:Ethernet  HWaddr 00:1E:10:1F:00:00
           BROADCAST MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root at OpenWrt:~# ifconfig wwan0 -arp
root at OpenWrt:~# ifconfig wwan0 up

wwan0     Link encap:Ethernet  HWaddr 00:1E:10:1F:00:00
           inet6 addr: fe80::21e:10ff:fe1f:0/64 Scope:Link
           UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1
           RX packets:16 errors:0 dropped:0 overruns:0 frame:0
           TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:736 (736.0 B)  TX bytes:360 (360.0 B)


root at OpenWrt:~# picocom /dev/ttyUSB1

AT^NDISDUP=1,1,"internet.eplus.de","eplus","gprs"
OK

^NDISSTAT:1,,,"IPV4"

^RSSI:22

^HCSQ:"LTE",53,48,121,24

^DSFLOWRPT:00000002,00000000,00000000,0000000000000000,0000000000000000,00000000,00000000

^DSFLOWRPT:00000004,00000000,00000000,0000000000000000,0000000000000000,00000000,00000000

^DSFLOWRPT:00000006,00000000,00000000,0000000000000000,0000000000000000,00000000,00000000

AT+COPS?
+COPS: 0,0,"MEDIONmobile",7
OK

root at OpenWrt:~# udhcpc -i wwan0
udhcpc (v1.23.2) started
Sending discover...
Sending discover...
Sending discover...

root at OpenWrt:~# ifconfig wwan0

wwan0     Link encap:Ethernet  HWaddr 00:1E:10:1F:00:00
           inet6 addr: fe80::21e:10ff:fe1f:0/64 Scope:Link
           UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1
           RX packets:26 errors:0 dropped:0 overruns:0 frame:0
           TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:1196 (1.1 KiB)  TX bytes:1386 (1.3 KiB)

AT^DHCP?
^DHCP: 
D8C0F00A,F0FFFFFF,D1C0F00A,D1C0F00A,086717D4,096717D4,150000000,150000000
OK

perl -e 'print join(",",map { join(".", unpack("C4", pack("L", hex))) } 
split /,/, shift),"\n"' 
D8C0F00A,F0FFFFFF,D1C0F00A,D1C0F00A,086717D4,096717D4
10.240.192.216,255.255.255.240,10.240.192.209,10.240.192.209,212.23.103.8,212.23.103.9

root at OpenWrt:~# ifconfig wwan0 10.240.192.216 netmask 255.255.255.240

wwan0     Link encap:Ethernet  HWaddr 00:1E:10:1F:00:00
           inet addr:10.240.192.216  Bcast:10.240.192.223  
Mask:255.255.255.240
           inet6 addr: fe80::21e:10ff:fe1f:0/64 Scope:Link
           UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1
           RX packets:215 errors:0 dropped:0 overruns:0 frame:0
           TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:9890 (9.6 KiB)  TX bytes:1386 (1.3 KiB)

root at OpenWrt:~# route add -net default gw 10.240.192.209
root at OpenWrt:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
0.0.0.0         10.240.192.209  0.0.0.0         UG    0      0        0 
wwan0
10.240.192.208  0.0.0.0         255.255.255.240 U     0      0        0 
wwan0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 
br-lan
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list