Re: ZTE ZM8620 LTE Modem Support

2014-09-09 Thread Travis Thompson
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-miscm=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 -  1.623
+++ usbdevs 9 Sep 2014 22:41:51 -
@@ -3395,6 +3395,7 @@ product ZTE UMASS_INSTALLER4  0x0083  ZTE
 product ZTE MSA110UP   0x0091  ONDA MSA110UP USB MSM modem
 productZTE UMASS_INSTALLER20x0103  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_INSTALLER0x2000  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 -  1.96
+++ umsm.c  9 Sep 2014 22:43:18 -
@@ -176,6 +176,7 @@ 

Re: ZTE ZM8620 LTE Modem Support

2014-09-07 Thread Stuart Henderson
On 2014-09-06, Travis Thompson travis.r.thomp...@gmail.com 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=8802BROADCAST,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.



ZTE ZM8620 LTE Modem Support

2014-09-06 Thread Travis Thompson
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=8802BROADCAST,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!).  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!

Thanks,

Travis


[1] https://techship.se/products/zte-zm8620-v2a/?signature=7509
[2] 
http://karlbsd.blogspot.com/2011/03/openbsd-nc4200-using-celcom-zte-mf190.html