Coming Underground
« KDE 4.2 on GentooAnother Jarre concert! »

Sierra MC8775 UMTS/HSDPA modem with Gentoo

Permalink 2009-01-15 11:29, by jaervosz, Categories: General, Gentoo Tips, Gentoo, Universe/English, Opensource

I recently got a brand spanking new Lenovo x61s with internal 3G modem . It seems to be the Sierra MC8775 UMTS/HSDPA that is attached internally a as a USB device. It's located with the RAM modules so it's not easy to change SIM card. It would have been very nice if they had placed the SIM card reader like the SD Card reader.

This is how I got it working with Gentoo.

Enable the sierra module in kernel config:

CONFIG_USB_SERIAL_SIERRAWIRELESS=m

Recompile your kernel or just recompile modules as needed.

modprobe sierra

Watch dmesg output:

sierra 5-1:1.0: Sierra USB modem converter detected
usb 5-1: Sierra USB modem converter now attached to ttyUSB0
usb 5-1: Sierra USB modem converter now attached to ttyUSB1
usb 5-1: Sierra USB modem converter now attached to ttyUSB2
usbcore: registered new interface driver sierra
sierra: USB Driver for Sierra Wireless USB modems: v.1.2.9c

lsusb yields something like this:

Bus 005 Device 003: ID 1199:6813 Sierra Wireless, Inc.

The modem seems to answer AT commands on both ttyUSB0 and ttyUSB2 but I had no luck getting online (and afterwards I only got ttyUSB0 working properly). It turns out that should first put it out low power mode

AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
OK
at!gstatus?
!GSTATUS:
Current Time: 2242 Temperature: 50
Bootup Time: 0 Mode: LOW POWER MODE
System mode: WCDMA PS state: Not attached
WCDMA band: IMT2000 GSM band: GSM900
WCDMA channel: 10700 GSM channel: 1
GMM (PS) state:NULL ---
MM (CS) state: NULL ---

WCDMA L1 State:L1M_STOPPED RRC State: DISCONNECTED
RX level (dBm):-64 (Not updated)

Fix it with this one:

OK
at+cfun=1
OK

After this the LED also turns on. So now let's try to see if it works...

Huh, now it attached and detached again note the reverse order which causes new ttyUSB allocations on 3-5. A simple rmmod sierra && sleep 2 && modprobe sierra got it back to the old low ttyUSB numbers. So now I'm ready to try again... and it works!

Now time for the usual speed test

wget http://ftp.ing.umu.se/linux/gentoo/releases/x86/2008.0/installcd/install-x86-minimal-2008.0.iso -O /dev/null
--2009-01-12 21:31:02-- http://ftp.ing.umu.se/linux/gentoo/releases/x86/2008.0/installcd/install-x86-minimal-2008.0.iso
Resolving ftp.ing.umu.se... 130.239.117.84
Connecting to ftp.ing.umu.se|130.239.117.84|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 83396608 (80M) [application/x-iso9660-image]
Saving to: `/dev/null'

100%[=====================================================================>] 83,396,608 109K/s in 14m 5s

2009-01-12 21:45:09 (96.3 KB/s) - `/dev/null' saved [83396608/83396608]

The speed is not at all impressive even compared to the official specs of "peak download data rates of 3.6 Mbps". It looks like EDGE speeds a not UMTS, but the modem claims otherwise:

at*cnti=0
*CNTI: 0,UMTS

Though I'm not too happy with the speed I wrapped everything up in the following Gentoo net script:

preup(){
if [[ ${IFACE} == "ppp1" ]]; then
#Load and unload module to avoid ttyUSB jumping
modprobe sierra
sleep 2
echo -e "at+cfun=1\r" > /dev/ttyUSB0
sleep 2
fi
return 0
}

postdown(){
if [[ ${IFACE} == "ppp1" ]]; then
echo -e "at+cfun=0\r" > /dev/ttyUSB0
rmmod sierra
fi
return 0
}

pppd_ppp1=(
"/dev/ttyUSB2"
"460800"
"crtscts"
"modem"
"noauth"
"usepeerdns"
"defaultroute"
"noipdefault"
"noccp"
"nobsdcomp"
"novj"
"user ''"
"password '1234'"
)
chat_ppp1=(
'ECHO' 'ON'
'ABORT' 'BUSY'
'ABORT' 'ERROR'
'ABORT' 'NO CARRIER'
'REPORT' 'CONNECT'
'TIMEOUT' '10'
'' 'ATZ'
'OK' 'AT+CGDCONT=1,"IP","data.tre.dk"'
'OK' 'ATE1V1&D2&C1S0=0+IFC=2,2'
'OK' 'AT+IPR=115200'
'OK' 'ATE1'
'TIMEOUT' '60'
'' 'ATD*99***1#'
'CONNECT'

That's it.

There is a couple of other good references out there:

https://wiki.ubuntu.com/SierraMC8775
http://www.sierrawireless.com/faq/ShowFAQ.aspx?ID=601

5 comments »Send a trackback »

Trackback address for this post

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

5 comments

Comment from: eliasp [Visitor] Email
Did you already try it using kernel 2.6.28? IIRC there was a fix which doubled UMTS speed in some cases.

Regards, Elias P.
2009-01-15 @ 12:28
Comment from: Martin [Visitor] Email
Why you don't use udev to create something like /dev/sierraUmts? If you have e.g. a USB-RS232 cable connected, /dev/ttyUSB? may already be used by it then you rmmod/modprobe trick doesn't work anymore...
Cheers
Martin
2009-01-15 @ 15:35
Comment from: zzam [Visitor] Email
udev-136 and later will contain /dev/serial/{by-id,by-path}.
But the ebuild is delayed until I get more free time.

Patch is here (if you want to try without udev-9999.ebuild): http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=bc4c751802147f1ff21bf52a57a2976754949453
2009-01-15 @ 19:17
Comment from: Hch [Visitor] Email
Thanks for sharing, I'm in the process of installing Gentoo on a X300 with the same umts modem.
2009-01-18 @ 17:59
Comment from: jaervosz [Member] Email
@eliasp: I'll stay with stable sources for now. The speed is fine for normal browsing.

$Martin: I didn't bother writng udev rules for all three device nodes and I can't really recreate the ttyUSB number jumping anymore.
2009-03-03 @ 21:31

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Search

Various local stuff

XML Feeds

powered by b2evolution free blog software

©2010 by admin

Contact Jaervosz