Monday, November 3, 2008

Opensolaris, Huawei E220, Swisscom and Sunrise

I was able to open a 3G connection to Swisscom and Sunrise using a Huawei E220 3G Modem under Opensolaris.

Here are the config files (If PIN is enabled on the SIM, add OK "AT+CPIN=????" to the chat script)

Swisscom:

/etc/ppp/chat-swisscom:

ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
REPORT CONNECT
TIMEOUT 120
"" "AT&F"
OK "ATZ"
OK "ATQ0 V1 E1 S0=0 &C1 &D2"
#OK "AT+CPIN=????"
OK 'AT+CGDCONT=1,"IP","gprs.swisscom.ch"'
SAY "Calling Swisscom"
OK "ATDT*99***1#"
TIMEOUT 120
CONNECT ''


/etc/ppp/peers/swisscom:

term/1
115200
connect "/usr/bin/chat -V -t15 -f /etc/ppp/chat-swisscom"
idle 7200
lock
crtscts
noipdefault
modem
user "gprs"
password "gprs"
noauth
passive
usepeerdns
defaultroute
connect-delay 6000
novj
nodetach


Sunrise:

/etc/ppp/chat-sunrise:

ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
REPORT CONNECT
TIMEOUT 120
"" "AT&F"
OK "ATZ"
OK 'ATS7=60'
#OK "AT+CPIN=????"
OK "AT+COPS?"
OK "AT&V"
OK "AT+CSQ"
OK 'AT+CFUN=?'
OK 'AT+CGDCONT=?'
OK 'AT+CPBR=?'
OK 'AT+CPBS=?'
OK 'AT+CGDCONT=1,"IP","Internet"'
SAY "Calling Sunrise"
OK 'ATDT*99***1#'
TIMEOUT 120
CONNECT ''


/etc/ppp/peers:

term/1
115200
connect "/usr/bin/chat -V -t15 -f /etc/ppp/chat-sunrise"
idle 7200
lock
crtscts
noipdefault
modem
user ""
password ""
noauth
passive
usepeerdns
defaultroute
connect-delay 6000
novj
nodetach


Don't forget to adjust the term/? line to reflect your /dev/term/? device.

After this, just fire up "pppd call swisscom" or "pppd call sunrise" and adjust your resolv.conf. The DNS Servers are in the output. For debugging just add -d to the pppd command.

There are a few problems with the Huawei E220, as it is recognized as a storage device first, and not as a serial device.

See the Opensolaris Forum

Most of the time the modem is recognized correctly when the Modem is plugged in before booting, and doing a reconfiguration boot with grub. ( press "e" -> append "-rv" -> -> press "b" )

There is also a patch for the Eee PC's Serial USB Port driver. See Masafumi's Blog.

Good luck!

0 comments: