Sunday, December 23, 2012

Turn off WWAN on Thinkpad

As described in this article, I added a $10 Gobi 2000 WWAN card into my Thinkpad x220. Because it is not officially supported by Lenovo, "Fn+F5" does not see this WWAN card and therefore cannot turn it off. Here is the method to control the WWAN.

Download PuTTY and run it. Select "Serial", change COM1 to the serial port that the Gobi modem uses. In my case it is COM27. Then click on "Open":



In the PuTTY session window, type in AT+CFUN=0 or 1 to turn off or on the WWAN card. You'll see the WiFi light turns off or on correspondingly:


Some more details:

  • If you disable this card in device manager, it only stops the card to talk to Windows. It is still powered on with RF activities that consume lots of battery.
  • If you use "0" to turn the card off, it'll be turned on automatically after waking up from a sleep. "4" (i.e. AT+CFUN=4) has the same effect.
  • "5" is factory test mode, "6" is reset and "7" is offline mode.
  • You may save the PuTTY session so you don't need to select the COM# each and every time.
  • You may use AutoHotKey to write a simple script to easy above process.
This is a simple working AHK script and how it looks when you run it. You need to put the PuTTY.exe in the same folder with this script. You need to change COM27 and "wwan" (saved PuTTY session name) to yours.

#NoEnv
#SingleInstance ignore
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 2

Gui, Add, Button,,WWAN ON
Gui, Add, Button,,WWAN OFF
Gui, Show
Return

ButtonWWANON:
Run, putty -load "wwan"
WinWaitActive, COM27 - PuTTY
Send, AT{+}CFUN=1{ENTER}
Sleep, 300
Send, !{F4}
WinWaitActive, PuTTY Exit Confirmation
Send, {ENTER}
Return

ButtonWWANOFF:
Run, putty -load "wwan"
WinWaitActive, COM27 - PuTTY
Send, AT{+}CFUN=0{ENTER}
Sleep, 300
Send, !{F4}
WinWaitActive, PuTTY Exit Confirmation
Send, {ENTER}
Return


P.S: The AT commands for turning airplane mode on:


ATENTERCND="A710"
ATCUSTOM="STARTLPM",1
ATCFUN=0

To turn airplane mode off:

ATENTERCND="A710"
ATCUSTOM="STARTLPM",0
ATCFUN=1

[update 07/04/13] I've been using the following AT commands to turn the Gobi2000 on/off for months, flawlessly.

On:
AT+CFUN=1

Off:
AT+CFUN=5

I.e., 5 is the number for off and the modem stays off after a sleep. After sending the command to the modem, you must put X220 into standby/sleep mode for the change to be effective.

No comments:

Post a Comment