ZTE EVDO AC8700 and FreeBSD



Status (ubsa patch)

This patch works fine under FreeBSD 6 STABLE and 7 STABLE (tested on 6.4-PRERELEASE and 7.1-PRERELEASE)

Previos Patch (original from http://www.cs.cmu.edu/~dga/dot/fbsd_pc5220) based on ugencom NetBSD driver don't work after FreeBSD 6.3R

Known problems:

1)
There is some messages in console:
 ucom0: ubsa_request: STALLED 
I don't know exactly what cause this, but device works normal.

2)
The device doesn't reconnect to the internet after stopping ppp.
After physically reconnecting the device all works fine.

Patch your kernel a bit

--- /usr/src/sys/dev/usb/usbdevs.orig   2008-12-05 17:53:19.000000000 +0200
+++ /usr/src/sys/dev/usb/usbdevs        2008-12-05 17:54:46.000000000 +0200
@@ -1464,6 +1464,7 @@
 product QUALCOMM CDMA_MSM      0x3196  CDMA Technologies MSM modem
 product QUALCOMM2 CDMA_MSM     0x6000  CDMA Technologies MSM phone
 product QUALCOMMINC CDMA_MSM   0x0001  CDMA Technologies MSM modem
+product QUALCOMMINC AC8700      0xfffe  AC8700 CDMA USB modem

 /* Qtronix products */
 product QTRONIX 980N           0x2011  Scorpion-980N keyboard

--- /usr/src/sys/dev/usb/ubsa.c.orig    2008-12-05 17:44:43.000000000 +0200
+++ /usr/src/sys/dev/usb/ubsa.c 2008-12-05 17:46:23.000000000 +0200
@@ -234,6 +234,7 @@
        { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE },
        /* Qualcomm, Inc. ZTE CDMA */
        { USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM },
+       { USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_AC8700 },
        { 0, 0 }
 };

--- /usr/src/share/man/man4/ubsa.4.orig 2008-12-05 18:44:24.000000000 +0200
+++ /usr/src/share/man/man4/ubsa.4      2008-12-05 18:45:27.000000000 +0200
@@ -98,6 +98,8 @@
 Peracom single port serial adapter
 .It
 Qualcomm, Inc. ZTE CDMA Technologies MSM
+.It
+Qualcomm, Inc. ZTE CDMA Technologies AC8700
 .El
 .Pp
 The supported 3G cards provide the necessary modem port for ppp,
Download patch: ac8700_ubsa.patch

# patch -p < ac8700_ubsa.patch
After this rebuild && reinstall your kernel.

Alternative way is build module:
# cd /usr/src/sys/modules/ubsa/
# make && make install

# kldload ubsa
# echo 'ubsa_load="YES"' >> /boot/loader.conf

In this case you shouldn't have "device ubsa" in your KERNCONF.
This way is preffered for debugging kernel module (imho).

After connecting modem is recognized as:
#dmesg
uhub1: device problem (SET_ADDR_FAILED), disabling port 1
ucom0: ZTE, Incorporated ZTE CDMA Tech, rev 1.10/0.00, addr 2

Configure PPP

/etc/ppp/ppp.conf
default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set device /dev/cuad1
 set speed 115200
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
           \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
 set timeout 180                        # 3 minute idle timer (the default)
 enable dns                             # request DNS info (for resolv.conf)


pplnet:
 set device /dev/cuaU0
 set speed 115200
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
            \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
 set phone "#777"
 set authname "11111111111@people.net.ua"
 set authkey "111111"
 add default HISADDR                    # Add a (sticky) default route
 enable dns
Start ppp:
# ppp -ddial pplnet

Alternative you could activate ppp in rc.conf:
ppp_enable="YES"
ppp_mode="ddial"
ppp_profile="pplnet"
then:
# /etc/rc.d/ppp start


Alternative driver ( ugensa )

This driver works only on RELENG_7

# wget http://people.FreeBSD.org/~lioux/ugensa.tar.gz
# tar -xvf ugensa.tar.gz
# cd ugensa

# make && make install

# kldload ugensa

In this case modem is recognized as:
#dmesg
ugensa0: <ZTE, Incorporated ZTE CDMA Tech, class 0/0, rev 1.10/0.00, addr 3> on uhub0 
ugensa_attach: sc = 0xc2bb3e00
ugensa0: unexpected endpoint
Both drivers works fine.

Update 091208
http://www.freebsd.org/cgi/query-pr.cgi?pr=129522 ubsa patch was submited to PR.

Home

Sergej A. Kandyla skandyla at gmail.com
Any comments and suggestions are welcome.
CentOS FreeBSD