Ubuntu Dapper 6.06 and a GlobeSurfer ICON UMTS/GPRS Box

Overview

These are my experiences with UMTS/GPRS networking using a GlobeSurfer ICON device on a Ubuntu Dapper installation.

You may also compare these instructions with my newer HOWTO for the Huawei E220 which I acquired recently.

The GlobeSurfer ICON is a USB device sold by several providers under different rebrands (T-Mobile: WebnWalk Box, ...)

ICON image

Details

The box operates in two states:

There is a small program to trigger the switch from flash to modem state:
http://www.frederick-reid.com/files/icon_switch.c by Josua Dietze. (local copy icon_switch.c)
Compile it with (you need libusb-dev installed)

 cc -lusb -o icon_switch icon_switch.c 

and install it to /usr/sbin/icon_switch and call it with root privileges.

When in modem state, the box offers three serial USB devices:
/dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2
Use /dev/ttyUSB0 to examine modem settings using minicom or go online via PPP.
The default modem settings are (T-Mobile, AT):

&C: 1; &D: 2; &F: 0; E: 1; I: 0; L: 1; M: 0; Q: 0; V: 1; X: 4; Z: 0;
S0: 0; S3: 13; S4: 10; S5: 8; S6: 2; S7: 45; S8: 2; S9: 6; S10: 14;
S11: 95; +FCLASS: 0; +ICF: 3,3; +IFC: 2,2; +IPR: 115200; +DR: 0;
+DS: 0,0,2048,6; +WS46: 12; +CBST: 0,0,1;
+CRLP: (61,61,48,6,0),(61,61,48,6,1),(240,240,52,6,2);
+CV120: 1,1,1,0,0,0; +CHSN: 0,0,0,0; +CSSN: 0,0; +CREG: 0; +CGREG: 0;
+CFUN:; +CSCS: "IRA"; +CSTA: 129; +CR: 0; +CRC: 0; +CMEE: 2; +CGDCONT: (1,"IP","gprsinternet","",0,0)
; +CGDSCONT: ; +CGTFT: ; +CGEQREQ: ; +CGEQMIN: ; +CGQREQ: ; +CGQMIN: ;
+CGEREP: 0,0; +CGDATA: "PPP"; +CGCLASS: "A"; +CGSMS: 0; +CSMS: 0;
+CMGF: 0; +CSCA: "",; +CSMP: ,,0,0; +CSDH: 0; +CSCB: 0,"",""; +FDD: 0;
+FAR: 0; +FCL: 0; +FIT: 0,0; +ES: ,,; +ESA: 0,,,,0,0,255,; +CMOD: 0;
+CVHU: 1; +CPIN: ��������,��������; +CMEC: 0,0,0; +CKPD: 1,1; +CGATT: 0;
+CGACT: 0; +CPBS: "SM"; +CPMS: "SM","SM","SM"; +CNMI: 0,0,0,0,0;
+CMMS: 0; +FTS: 0; +FRS: 0; +FTH: 3; +FRH: 3; +FTM: 96; +FRM: 96;
+CCUG: 0,0,0; +CUSD: 0; +CAOC: 1; +CCWA: 0; +CPOL: 0,2,""; +CTZR: 0;
+CLIP: 0; +COLP: 0; +COPS: 0,0,"",3; +CSIM: 14,""; +CRSM: 0,0,0,0,0,"";
+CSMINS: 0; +STPD: 0,; +STGC: 0; +STCR: 0,"","",""; +STMS: 0,0;
+STTONE: 0,1,500; +STRT: 0; _OPOS: 0,0; _OPSYS: 3,2; _OSBM: 4; _OSQI: 0;
_OGCVI: 0; _OSSYS: 0; _OSEC: 4; _OLT: 0; _OSIMPOLL: 1; _OLOOP: 0,0;
_OST: 0; _OFSMINS: 0; _OPONI: 0; _ODO: 0; _OAIR: 0; _OVARSET: 0,0;
_ODTX: 0,0,""; _OSIMP: 0; _OPDATR: 0; _OPCSC: 0; _OCHAP: 1; _OCTI: 0;
_OMAC: ""; _ODFC: 0,0; _OBUFFFILL: 0,0,"";  _OELT: 0,1; _OVBS: 0;
_OBTNPRESSED: 0; _ORRCREL: 1

You have to provide the options vendor=0x0af0 and product=0x6600 when loading the usbserial module, e.g via

modprobe usbserial vendor=0x0af0 product=0x6600

Automatic module loading via udev

Create a udev script /etc/udev/rules.d/50-globesurfer-icon.rules with the content:

UBSYSTEM=="usb", SYSFS{idProduct}=="1000", SYSFS{idVendor}=="05c6", RUN+="/usr/sbin/globesurfer-icon-switch.sh"
UBSYSTEM=="usb", SYSFS{idProduct}=="6600", SYSFS{idVendor}=="0af0", RUN+="/sbin/modprobe usbserial vendor=0x0af0 product=0x6600"

and the switch scripts /usr/sbin/globesurfer-icon-switch.sh:

#!/bin/sh

# make sure the box is active in storage mode,
# therefore trigger a scsi bus scan
modprobe sd_mod
echo "scsi add-single-device 0 1 2 3" > /proc/scsi/scsi

# run real switch in background 
# (waits some seconds for the storage device to settle)
/usr/sbin/globesurfer-icon-switch-child.sh &

exit 0

and /usr/sbin/globesurfer-icon-switch-child.sh

#!/bin/sh

# wait for the usb disk to settle
sleep 10

# for debugging:
# env >> /tmp/globe.log

# now run the real switch command, keep some logs
/usr/sbin/icon_switch >>/tmp/globe.log 2>&1 &

sleep 1
exit 0

The two-stage switch script is necessary because /usr/sbin/icon_switch expects the box in storage mode, but during the moment when the first udev script runs the usbstorage modules are just loading, so they need some time to finish, hence the small sleep.

PPP configuration

The PPP configuration needs some special chat scripts. This is for two reasons:

/etc/ppp/peers/umts:

# usbserial device, some options:
/dev/ttyUSB0
460800
idle 7200
lock
crtscts
modem
noauth
# dns, routing
usepeerdns
replacedefaultroute
defaultroute
noipdefault
# avoid compression:
noccp
nobsdcomp
novj
# usually doesnt matter for GPRS/UMTS connections:
user "web"
password ""
# connect script
connect "/usr/sbin/umts-chat.sh"
# t-mobile specific?
ipcp-restart 8
ipcp-max-configure 50
ipcp-accept-local
ipcp-accept-remote

a rather unusual two stage connect script /usr/sbin/umts-chat.sh:

#!/bin/sh

# call the preparation chat script (with pin and if this fails without pin)
/usr/sbin/chat -V -f /etc/chatscripts/umts-prep || /usr/sbin/chat -V -f /etc/chatscripts/umts-prep-nopin
# wait to switch between GPRS/UMTS
sleep 20
# the final chat script:
/usr/sbin/chat -V -f /etc/chatscripts/umts
and the three above mentioned chat scripts (T-Mobile specific, replace "gprsinternet" with the appropriate CGDCONT parameter of your provider)
/etc/chatscripts/umts-prep
ABORT BUSY
ABORT ERROR
ABORT 'NO CARRIER'
REPORT CONNECT
TIMEOUT 10
"" "ATZ"
OK "ATE1V1&D2&C1S0=0+IFC=2,2"
OK "AT+IPR=115200"
# replace XXXX with your PIN:
OK "AT+CPIN=XXXX"
OK "ATE1"
# different operating modes, comment/uncomment:
# GPRS
#OK "AT_OPSYS=0,2"
# UMTS
#OK "AT_OPSYS=1,2"
# GPRS, UMTS
#OK "AT_OPSYS=2,2"
# UMTS,GPRS
OK "AT_OPSYS=3,2"
OK "AT+CGDCONT=1,\042IP\042,\042gprsinternet\042,\042\042,0,0"
SAY "\nWaiting 20 Seconds to switch between UMTS/GPRS ...\n"
/etc/chatscripts/umts-prep-nopin
ABORT BUSY
ABORT ERROR
ABORT 'NO CARRIER'
REPORT CONNECT
TIMEOUT 10
"" "ATZ"
OK "ATE1V1&D2&C1S0=0+IFC=2,2"
OK "AT+IPR=115200"
OK "ATE1"
# different operating modes, comment/uncomment:
# GPRS
#OK "AT_OPSYS=0,2"
# UMTS
#OK "AT_OPSYS=1,2"
# GPRS, UMTS
#OK "AT_OPSYS=2,2"
# UMTS,GPRS
OK "AT_OPSYS=3,2"
OK "AT+CGDCONT=1,\042IP\042,\042gprsinternet\042,\042\042,0,0"
SAY "\nWaiting 20 Seconds to switch between UMTS/GPRS ...\n"
/etc/chatscripts/umts
ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
REPORT CONNECT
TIMEOUT 10
SAY "Calling T-Mobile GPRS\n"
TIMEOUT 60
"" "ATD*99***1#"
CONNECT \c

You may even try to avoid to put the PIN into the chat scripts by using some pin entry program within the connect shell script.

start your connection with

pppd call umts

or for debugging

pppd call umts nodetach

Sources


Albrecht Gebhardt

Valid XHTML 1.1