Hey Stuart,

Thanks for you reply.  I agree about [2], it's not as relevant to me
as I previously thought.  I've got some updates since my first mail.
Sorry about not including more information before, I wasn't sure how
much to include at the time.

So having is show up as a network device is actually expected and the
preferred way of operating it according to the documentation, reason
being it's a LTE 100 down / 50 up modem and using the PPP interface is
apparently not capable of those speeds.  But the kernel without
modification doesn't expose the AT serial interface so I can't connect
to the cell network.  From the docs:

> For ZM8510/ZM8620/ME3960 LTE modem, although it can use pppd to setup a data
> connection, but the speed may be limited, we recommend to uses ECM to setup 
> data connection
> on ZM8510/ZM8620/ME3960 modem.
[...]
> ECM interface can be used to setup data call on ZM8510/ZM8620/ME3960 modem. 
> The
> data connection can be setup by following steps:
> Step0: switch modem to ECM mode using AT command, then reboot the modem:
>>  AT+ZSWITCH=L
>>  AT+ZRST
> Step1: setup data call parameter using AT command +CGDCONT. For example, can 
> configure
> APN “zte.com” using command as below:
>> AT+CGDCONT=1,”ip”,”zte.com”
> Step2: setup ECM data call using AT command +ZECMCALL. For example:
>> AT+ZECMCALL=1
> Step3: start DHCP to get IP and DNS. For example, use command as below:
>> dhcpcd usb0
> Step4:check whether network card get IP/DNS address. For example:
>> ifconfig
> Step5:disconnect ECM data call using blew command:
>> AT+ZECMCALL=0
> Please refer to AT command document for further more information.

Port information from the docs:
+---+-----------------------+------------------------+
| 0 | Ding interface        | /dev/ttyUSB0           |
+---+-----------------------+------------------------+
| 1 | AT interface          | /dev/ttyUSB1           |
+---+-----------------------+------------------------+
| 2 | Modem interface       | /dev/ttyUSB2           |
+---+-----------------------+------------------------+
| 3 | ECM Control interface | New network card       |
+---+-----------------------+ named usbx/ecmx/ethx,  +
| 4 | ECM Data interface    | "x" can be any number. |
+---+-----------------------+------------------------+
| 5 | Adb interface         | Used to debug          |
docs, so I can send them to individuals if anyone is interested at
look at them more (there's not a whole lot there that I haven't
included that's relevant, but you never know).

This device is based on the Qualcomm MDM9215 which according to [3]
the umsm driver seems like the right direction.

So following the Linux guide, it says to add the device to
/drivers/usb/serial/option.c .  I found the somewhat equivalent file
in OpenBSD under /sys/dev/usb/usbdevs [diff1].  I also added it to
/sys/dev/usb/umsm.c [diff2] so that the umsm driver would try to pick
it up.  And after a kernel recompile, that worked! Kind of.  The umsm
driver sees all 6 devices and picks up 4 serial ports, which is what
I'd expect based on the docs, but I can't access any of the serial
ports, and the previous network interface (cdce0) disappears (also see
[dmesg]):

> # cu -l /dev/cuaU0 -s 115200
> cu: open("/dev/cuaU0"): Input/output error
> # cu -l /dev/cuaU0 -s 115200
> cu: open("/dev/cuaU0"): Input/output error
> # cu -l /dev/cuaU1 -s 115200
> cu: open("/dev/cuaU1"): Input/output error
> # cu -l /dev/cuaU2 -s 115200
> cu: open("/dev/cuaU2"): Input/output error
> # cu -l /dev/cuaU3 -s 115200
> cu: open("/dev/cuaU3"): Input/output error

Note: I've also tried this with several different speeds, all with the
same error.  The docs have 115200 listed in the pppd configs.

So basically I'm stuck on the umsm driver, if that is even the correct
driver to be using. I've included my full [dmesg] output this time if
that helps.  Thanks again in advanced for any help!

[3] http://marc.info/?l=openbsd-misc&m=134311982424455

[diff1]
Index: usbdevs
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.623
diff -u -p -r1.623 usbdevs
--- usbdevs     15 Feb 2014 02:16:57 -0000      1.623
+++ usbdevs     9 Sep 2014 22:41:51 -0000
@@ -3395,6 +3395,7 @@ product ZTE UMASS_INSTALLER4      0x0083  ZTE
 product ZTE MSA110UP           0x0091  ONDA MSA110UP USB MSM modem
 product        ZTE UMASS_INSTALLER2    0x0103  ZTE USB MSM installer
 product ZTE MF112              0x0117  ZTE MF112 HSUPA USB modem
+product ZTE ZM8620             0x0396  ZTE ZM8510/ZM8620/ME3960 USB modem
 product ZTE HSUSB              0x1364  ZTE HSUSB
 product ZTE UMASS_INSTALLER    0x2000  ZTE USB MSM installer
 product ZTE AC2746             0xfff1  AC2746 CDMA USB modem

[diff2]
Index: umsm.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umsm.c,v
retrieving revision 1.96
diff -u -p -r1.96 umsm.c
--- umsm.c      13 Dec 2013 17:43:07 -0000      1.96
+++ umsm.c      9 Sep 2014 22:43:18 -0000
@@ -176,6 +176,7 @@ static const struct umsm_type umsm_devs[
        {{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_UMASS_INSTALLER4 }, DEV_UMASS4},
        {{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_K3565Z }, 0},
        {{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF112 }, DEV_UMASS4},
+       {{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_ZM8620 }, 0},
        {{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF633 }, 0},
        {{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF637 }, 0},
        {{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MSA110UP }, 0},

[dmesg]
OpenBSD 5.5-stable (GENERIC.MP) #0: Sat Sep  6 16:24:41 PDT 2014
    [email protected]:/mnt/hdd/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8558256128 (8161MB)
avail mem = 8321822720 (7936MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x7f53b000 (53 entries)
bios0: vendor American Megatrends Inc. version "5.6.5" date 05/26/2014
acpi0 at bios0: rev 2
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP FPDT MCFG WDAT UEFI APIC BDAT HPET SSDT SPCR
acpi0: wakeup devices PS2K(S0) PS2M(S0) PEX1(S0) PEX2(S0) PEX3(S0)
PEX4(S0) EHC1(S0)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Atom(TM) CPU C2358 @ 1.74GHz, 1750.32 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,RDRAND,NXE,LONG,LAHF,3DNOWP,PERF,ITSC,SMEP,ERMS
cpu0: 1MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 83MHz
cpu0: mwait min=64, max=64, C-substates=0.2.0.0.0, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Atom(TM) CPU C2358 @ 1.74GHz, 1750.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,RDRAND,NXE,LONG,LAHF,3DNOWP,PERF,ITSC,SMEP,ERMS
cpu1: 1MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PEX1)
acpiprt2 at acpi0: bus 2 (PEX2)
acpiprt3 at acpi0: bus 3 (PEX3)
acpiprt4 at acpi0: bus 4 (PEX4)
acpicpu0 at acpi0: C2, C1, PSS
acpicpu1 at acpi0: C2, C1, PSS
cpu0: Enhanced SpeedStep 1750 MHz: speeds: 1744, 1743, 1660, 1577,
1494, 1411, 1328, 1245, 1162 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 vendor "Intel", unknown product 0x1f0e rev 0x02
ppb0 at pci0 dev 1 function 0 "Intel Atom C2000 PCIE" rev 0x02: msi
pci1 at ppb0 bus 1
em0 at pci1 dev 0 function 0 "Intel I210" rev 0x03: msi, address
00:90:0b:36:9b:82
ppb1 at pci0 dev 2 function 0 "Intel Atom C2000 PCIE" rev 0x02: msi
pci2 at ppb1 bus 2
em1 at pci2 dev 0 function 0 "Intel I210" rev 0x03: msi, address
00:90:0b:36:9b:83
ppb2 at pci0 dev 3 function 0 "Intel Atom C2000 PCIE" rev 0x02: msi
pci3 at ppb2 bus 3
ppb3 at pci0 dev 4 function 0 "Intel Atom C2000 PCIE" rev 0x02: msi
pci4 at ppb3 bus 4
vendor "Intel", unknown product 0x1f18 (class processor subclass
Co-processor, rev 0x02) at pci0 dev 11 function 0 not configured
pchb1 at pci0 dev 14 function 0 "Intel Atom C2000 RAS" rev 0x02
"Intel Atom C2000 RCEC" rev 0x02 at pci0 dev 15 function 0 not configured
"Intel Atom C2000 SMBus" rev 0x02 at pci0 dev 19 function 0 not configured
em2 at pci0 dev 20 function 0 "Intel I354 SGMII" rev 0x03: msi,
address 00:90:0b:36:9b:84
em3 at pci0 dev 20 function 1 "Intel I354 SGMII" rev 0x03: msi,
address 00:90:0b:36:9b:85
em4 at pci0 dev 20 function 2 "Intel I354 SGMII" rev 0x03: msi,
address 00:90:0b:36:9b:86
em5 at pci0 dev 20 function 3 "Intel I354 SGMII" rev 0x03: msi,
address 00:90:0b:36:9b:87
ehci0 at pci0 dev 22 function 0 "Intel Atom C2000 USB" rev 0x02: apic 2 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ahci0 at pci0 dev 23 function 0 "Intel Atom C2000 AHCI" rev 0x02: msi, AHCI 1.3
scsibus0 at ahci0: 32 targets
ahci1 at pci0 dev 24 function 0 "Intel Atom C2000 AHCI" rev 0x02: msi, AHCI 1.3
scsibus1 at ahci1: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, Hitachi HTS54252, BBFO> SCSI3
0/direct fixed naa.5000cca533c8cea6
sd0: 238475MB, 512 bytes/sector, 488397168 sectors
sd1 at scsibus1 targ 1 lun 0: <ATA, TS32GCF400, 2013> SCSI3 0/direct
fixed t10.ATA_TS32GCF400_B45986E114643C000217
sd1: 30535MB, 512 bytes/sector, 62537328 sectors
pcib0 at pci0 dev 31 function 0 "Intel Atom C2000 PCU" rev 0x02
ichiic0 at pci0 dev 31 function 3 "Intel Atom C2000 PCU SMBus" rev
0x02: apic 2 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-10600 SO-DIMM
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
wbsio0 at isa0 port 0x2e/2: W83627DHG-P rev 0x73
lm1 at wbsio0 port 0xa00/8: W83627DHG
uhub1 at uhub0 port 1 "Intel product 0x07db" rev 2.00/0.02 addr 2
ugen0 at uhub1 port 2 "CP1000PFCLCD CRDA103#BJ1" rev 2.00/0.01 addr 3
umsm0 at uhub1 port 4 configuration 1 interface 0 "Android Android"
rev 2.00/2.28 addr 4
ucom0 at umsm0
umsm1 at uhub1 port 4 configuration 1 interface 1 "Android Android"
rev 2.00/2.28 addr 4
ucom1 at umsm1
umsm2 at uhub1 port 4 configuration 1 interface 2 "Android Android"
rev 2.00/2.28 addr 4
ucom2 at umsm2
umsm3 at uhub1 port 4 configuration 1 interface 3 "Android Android"
rev 2.00/2.28 addr 4
umsm3: missing endpoint
umsm4 at uhub1 port 4 configuration 1 interface 4 "ZTE Inc. ZTE
ZM8510/ZM8620/ME3960 USB modem" rev 2.00/2.28 addr 4
umsm4: missing endpoint
umsm5 at uhub1 port 4 configuration 1 interface 5 "ZTE Inc. ZTE
ZM8510/ZM8620/ME3960 USB modem" rev 2.00/2.28 addr 4
ucom3 at umsm5
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd1a (bd02aec6f99505aa.a) swap on sd1b dump on sd1b

On Sun, Sep 7, 2014 at 3:45 PM, Stuart Henderson <[email protected]> wrote:
> On 2014-09-06, Travis Thompson <[email protected]> wrote:
>> Hello All,
>>
>> I ordered[1] this modem for my OpenBSD 5.5 router on a long shot
>> hoping that since it claimed Linux support that OpenBSD would have
>> support for it as well. After I hooked it up, it does show up, but only
>> as a generic USB device and a mysterious cdce0 ethernet device.
>>
>>> cdce0 at uhub1 port 4 configuration 1 interface 3 "Android Android" rev 
>>> 2.00/2.28 addr 3
>>> cdce0: address 2a:cb:01:fb:f1:00
>>> ugen0 at uhub1 port 4 configuration 1 "Android Android" rev 2.00/2.28 addr 3
>>
>>> # ifconfig cdce0
>>> cdce0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
>>>        lladdr 2a:cb:01:fb:f1:00
>>>        priority: 0
>>
>> I’ve tried running dhclient on it, but I didn’t get an address (I
>> would have been really surprised if I had!).
>
> Actually that is exactly what normally happens for devices which show up as 
> cdce
> (or urndis). Any idea what is the expected behaviour for this particular 
> device under
> Linux? I wonder if it may actually be a urndis type device that isn't 
> detected as such
> automatically.
>
>> It seems like I’m missing
>> a serial device for controlling the thing, pretty much everything I’ve
>> read says I should have one[2]. Anyways, any help would be greatly
>> appreciated!
>>
>> [1] https://techship.se/products/zte-zm8620-v2a/?signature=7509
>> [2] 
>> http://karlbsd.blogspot.com/2011/03/openbsd-nc4200-using-celcom-zte-mf190.html
>
> link [2] there talks about a totally different device, so might well not be
> applicable to this.

Reply via email to