Hello!I've got my first 3G connection working with the ZT-180 using a ZTE modem (Vodafone K3565-Z 3G stick). The stick currently costs 10 Euros in Germany and has no SIM-lock. The stick also holds optional microSD cards which the ZT-180 will mount as /udisk.The good news is that I can even toggle the connection with the "3G EDVO" switch from the Settings application. What remains are some occasional hickups where the connection sometimes refuses to be established (pppd then reports that the connect script failed, I still need to figure out why), but it usually works when retrying.Very important: I had to permanently disable the CD drive feature on this stick from a Windows terminal program first or the ZT-180 will not recognize it. This AT command is specific to ZTE modems.
To disable the PIN check on the SIM card use this command where xxxx is your current PIN code.
My modem uses /dev/ttyUSB3 by default, so I had to modify some scripts accordingly. The sample configuration below works with the Vodafone Websessions service in Germany.My contents of /system/etc/ppp/peers/cdma (and cdma_h). Adjust the given user name if needed. Stick to these file names, otherwise Settings.apk won't be able to control the connection.
Code:
file /system/etc/ppp/options-3gconnect '/system/xbin/chat -v -f /system/etc/ppp/chat-3g-connect'disconnect '/system/xbin/chat -v -f /system/etc/ppp/chat-3g-disconnect'user Vodafone
My contents of /system/etc/ppp/options-3g. Not sure if all of these options are actually needed as given.
Code:
/dev/ttyUSB3921600nolockcrtsctsmodempassivenovjdefaultroutenoipdefaultusepeerdnsnoauthhide-passworddebugnodetachipcp-accept-localipcp-accept-remote
My contents of /system/etc/ppp/chat-3g-connect. Modify the APN as needed. This will only work if the PIN check on your device has been disabled, otherwise you need to insert an AT+CPIN="xxxx" command before setting the APN.
Code:
ABORT "BUSY"ABORT "NO CARRIER"ABORT "VOICE"ABORT "NO DIALTONE"ABORT "NO DIAL TONE"ABORT "NO ANSWER"ABORT "DELAYED"ABORT "ERROR"REPORT CONNECTTIMEOUT 10"" ATOK AT+CGDCONT=1,"IP","event.vodafone.de"OK ATDT*99***1#TIMEOUT 20CONNECT ""
My contents of /system/etc/ppp/chat-3g-disconnect
Code:
ABORT "BUSY" ABORT "ERROR" ABORT "NO DIALTONE" SAY "nSending break to the modemn" "" "K""" "K""" "K""" "dd+++ddATH"SAY "nPDP context detachedn"
Contents of /system/etc/ppp/pap-secrets and /system/etc/ppp/chap-secrets files. Username first, followed by *, and password second. Change this as needed. The username needs to match the one given in the "cdma" script I think.
Code:
# client server secret IP addressesVodafone * Vodafone
Here is a log of a successful 3G ppp connection (as returned by adb logcat)
Code:
I/pppd ( 2898): Serial connection established.D/pppd ( 2898): using channel 1I/ethernet( 2062): Current is not eth0I/pppd ( 2898): Using interface ppp0I/pppd ( 2898): Connect: ppp0 <--> /dev/ttyUSB3W/pppd ( 2898): Warning - secret file /etc/ppp/pap-secrets has world and/or group accessD/pppd ( 2898): sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xc1ca1031> <pcomp> <accomp>]D/pppd ( 2898): rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x13ec306> <pcomp> <accomp>]D/pppd ( 2898): sent [LCP ConfAck id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x13ec306> <pcomp> <accomp>]D/pppd ( 2898): rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xc1ca1031> <pcomp> <accomp>]D/pppd ( 2898): rcvd [LCP DiscReq id=0x1 magic=0x13ec306]D/pppd ( 2898): rcvd [CHAP Challenge id=0x1 <aa2f30ae3c9b89ddc4f12e75f6b6025d>, name = "UMTS_CHAP_SRVR]W/pppd ( 2898): Warning - secret file /etc/ppp/chap-secrets has world and/or group accessD/pppd ( 2898): sent [CHAP Response id=0x1 <b128a70cb452f5f1b1c4d2e6428181eb>, name = "Vodafone"]D/pppd ( 2898): rcvd [CHAP Success id=0x1 ""]I/pppd ( 2898): CHAP authentication succeededD/pppd ( 2898): sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]D/pppd ( 2898): sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]D/pppd ( 2898): rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]D/pppd ( 2898): rcvd [IPCP ConfNak id=0x1 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]D/pppd ( 2898): sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]D/pppd ( 2898): rcvd [IPCP ConfReq id=0x0]D/pppd ( 2898): sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>]D/pppd ( 2898): rcvd [IPCP ConfNak id=0x2 <addr 10.249.30.43> <ms-dns1 139.7.30.125> <ms-dns3 139.7.30.126>]D/pppd ( 2898): sent [IPCP ConfReq id=0x3 <addr 10.249.30.43> <ms-dns1 139.7.30.125> <ms-dns3 139.7.30.126>]D/pppd ( 2898): rcvd [IPCP ConfReq id=0x1]D/pppd ( 2898): sent [IPCP ConfAck id=0x1]D/pppd ( 2898): rcvd [IPCP ConfAck id=0x3 <addr 10.249.30.43> <ms-dns1 139.7.30.125> <ms-dns3 139.7.30.126>]W/pppd ( 2898): Could not determine remote IP address: defaulting to 10.64.64.64I/pppd ( 2898): local IP address 10.249.30.43I/pppd ( 2898): remote IP address 10.64.64.64I/pppd ( 2898): primary DNS address 139.7.30.125I/pppd ( 2898): secondary DNS address 139.7.30.126I/ethernet( 2062): Current is not eth0I/ethernet( 2062): Current is not eth0I/ethernet( 2062): Current is not eth0I/ethernet( 2062): Current is not eth0I/ethernet( 2062): Current is not eth0D/pppd ( 2898): Script /etc/ppp/ip-up started (pid 2910)D/pppd ( 2898): Script /etc/ppp/ip-up finished (pid 2910), status = 0x0
What I find problematic is that as soon as the 3G modem is plugged in, the rild ("radio interface layer daemon") crashes periodically. Crash dump omitted due to 10000 character per posting limit in this forum. It totally clobbers the adb logcat output with useless crash dump information.Check out this section from /system/build.prop. It defines /dev/ttyS0 as modem interface for the RIL library!
Code:
rild.libpath=/system/lib/libreference-ril.sorild.libargs=-d /dev/ttyS0
So rild.libargs needs to be changed to -d /dev/ttyUSB1 with my particular modem, so the current signal strength and other parameters can be pulled from the USB modem's diagnostic interface (regardless whether /dev/ttyUSB3 has an active connection or not...)Here is the modified line of /system/build.prop
Code:
rild.libargs=-d /dev/ttyUSB1
I decided to dump the crashing libreference-ril.so by Zenithink and use the one from the Android 2.1 SDK emulator image instead. A quick adb pull from the emulator, followed by an adb push to the ZT-180 did the trick. I've now got signal strength indicator bars for 3G on my home screen!