「ThinkPad モバイルインターネット」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎Step-by-step: 未訳部分翻訳)
58行目: 58行目:
 
==== Step-by-step ====
 
==== Step-by-step ====
   
  +
1. モデムを用意し、BIOS セットアップで WWAN カードを有効にした上で、ラップトップを起動します。
1. Boot the laptop with the stock modem in place and WWAN card access enabled in BIOS setup.
 
   
  +
2. ラップトップをサスペンドします (S3 サスペンドモードを使用するよう設定しておいてください)。
2. Suspend the laptop (make sure it is configured to use S3).
 
   
  +
3. Fibocom モデムと Sierra Wireless モデムを共にホットスワップで接続して、復帰させます。S3 からの復帰時にはホワイトリストは調べられません。
3. Hot-swap the stock Fibocom modem with the Sierra Wireless one, then resume. Whitelists are not consulted at S3 resume.
 
   
  +
{{ic|lsusb}} の結果にモデムが表示されていることを確認してください:
Check that the modem is present on the USB bus:
 
 
# lsusb
 
# lsusb
 
<...>
 
<...>
70行目: 70行目:
 
<...>
 
<...>
   
Remember the VID (vendor ID) of the modem ({{ic|1199}} in this example).
+
モデムの VID (vendor ID) を把握してください (この例では {{ic|1199}} です)
   
  +
4. ModemManager が実行されている場合は、停止させてください:
4. Stop ModemManager, if it is running:
 
 
# systemctl stop ModemManager
 
# systemctl stop ModemManager
   
5. Optionally, update the modem firmware with the {{ic|qmi-firmware-update}} tool:
+
5. 必須ではありませんが、{{ic|qmi-firmware-update}} でモデムのファームウエアを更新します:
   
 
# cd /path/to/extracted/firmware
 
# cd /path/to/extracted/firmware
 
# qmi-firmware-update -d 1199 -u *.cwe *.nvu
 
# qmi-firmware-update -d 1199 -u *.cwe *.nvu
   
  +
6. AT コマンドポートを有効化するためモデムの USB composition を変更します:
6. Change the modem's USB composition to enable AT command ports:
 
   
 
# qmicli -d /dev/cdc-wdm1 --dms-swi-set-usb-composition=8
 
# qmicli -d /dev/cdc-wdm1 --dms-swi-set-usb-composition=8
   
  +
7. {{ic|qmicli}} の提案通りモデムの Operating Mode を変更します:
7. Power-cycle the modem as advised by {{ic|qmicli}}:
 
   
 
# qmicli -d /dev/cdc-wdm1 --dms-set-operating-mode=offline
 
# qmicli -d /dev/cdc-wdm1 --dms-set-operating-mode=offline
 
# qmicli -d /dev/cdc-wdm1 --dms-set-operating-mode=reset
 
# qmicli -d /dev/cdc-wdm1 --dms-set-operating-mode=reset
   
  +
8. モデムが再び表示されるまで待ち、その上で確認します:
8. Wait for the modem to reappear, then verify:
 
   
 
# qmicli -d /dev/cdc-wdm1 --dms-swi-get-usb-composition
 
# qmicli -d /dev/cdc-wdm1 --dms-swi-get-usb-composition
97行目: 97行目:
 
USB composition 9: MBIM
 
USB composition 9: MBIM
   
9. Verify that the three serial ports {{ic|/dev/ttyUSB0}}, {{ic|/dev/ttyUSB1}} and {{ic|/dev/ttyUSB2}} are now available (assuming you do not have any other USB-serial converters plugged in):
+
9. 3つのシリアルポート {{ic|/dev/ttyUSB0}}{{ic|/dev/ttyUSB1}} および {{ic|/dev/ttyUSB2}} が利用可能なことを確認してください (次の例ではUSB-シリアル変換器がこれ以外に接続されていないことを前提にしています):
   
 
# ls -l /dev/ttyUSB*
 
# ls -l /dev/ttyUSB*
104行目: 104行目:
 
crw-rw---- 1 root uucp 188, 2 Feb 14 20:11 /dev/ttyUSB2
 
crw-rw---- 1 root uucp 188, 2 Feb 14 20:11 /dev/ttyUSB2
   
  +
10. {{ic|/dev/ttyUSB2}} に {{ic|screen}} など好みのシリアルコンソールエミュレータでアタッチしてください:
10. Attach to {{ic|/dev/ttyUSB2}} with a serial terminal emulator of your choice (e. g. {{ic|screen}}):
 
   
 
# screen /dev/ttyUSB2 115200
 
# screen /dev/ttyUSB2 115200
   
  +
11. AT コマンド ({{ic|OK}} を入力する必要はありません、結果は以下の記録の一部に含まれています):
11. Enter the AT commands (note that you do not need to type {{ic|OK}}, the replies are included here as part of a session transcript):
 
   
  +
11.1. エコーバックコマンドを有効化します (元々エコーバックが無効な場合、入力した内容は見えません):
11.1. Enable command echo (if echo is initially disabled, you won't see this command as you type it):
 
   
 
ATE1
 
ATE1
 
OK
 
OK
   
  +
11.2. Advanced コマンド を有効化します:
11.2. Unlock engineering commands:
 
   
 
AT!ENTERCND="A710"
 
AT!ENTERCND="A710"
 
OK
 
OK
   
  +
11.3. カスタムオプションを確認します (これは著者の場合でのオプションです):
11.3. Check customization options (these are the author's options):
 
   
 
AT!CUSTOM?
 
AT!CUSTOM?
133行目: 133行目:
 
OK
 
OK
   
11.4. Configure ''USB fast enumeration'' (swap {{ic|2}} for {{ic|0}} if you want to play it safe):
+
11.4. ''USB fast enumeration'' を設定します(より安全に行なうには {{ic|2}} {{ic|0}} にします):
   
 
AT!CUSTOM="FASTENUMEN",2
 
AT!CUSTOM="FASTENUMEN",2
 
OK
 
OK
   
11.5. Verify:
+
11.5. 確かめます:
   
 
AT!CUSTOM?
 
AT!CUSTOM?
152行目: 152行目:
 
OK
 
OK
   
  +
''({{ic|FASTENUMEN}} オプションが他と並んで表示されているはずです)"
''(it should now show the {{ic|FASTENUMEN}} option alongside others)''
 
   
  +
11.6. W_DISABLE を無視するようにモデムを設定します:
11.6. Configure the modem to ignore W_DISABLE:
 
   
 
AT!PCOFFEN=2
 
AT!PCOFFEN=2
 
OK
 
OK
   
11.7. Verify:
+
11.7. 確かめます:
   
 
AT!PCOFFEN?
 
AT!PCOFFEN?
166行目: 166行目:
 
OK
 
OK
   
  +
11.8. モデムをリセットします:
11.8. Reset the modem:
 
   
 
AT!RESET
 
AT!RESET
 
OK
 
OK
   
  +
''(しばらく後にターミナルは切断されます)''
''(the terminal will disconnect after a while)''
 
   
  +
12. モデムが再び表示されるまで待ち、再起動、電源を落とす、ラップトップのハードリセットで設定を確かめます。
12. Wait for the modem to reappear, then verify configuration by rebooting / powering down / hard resetting the laptop.
 
   
 
==== Remarks ====
 
==== Remarks ====

2019年5月5日 (日) 23:41時点における版

Lenovo の ThinkPad にはモバイルブロードバンドモデムが搭載されているものが多くあります。SIM カードをモデムに挿入することで、移動体通信ネットワークを使ってインターネットに接続することが可能です。

要件

新しい ThinkPad のブロードバンドモデムでは QMI モデムプロトコルを使っています。詳しくは この記事 を参照してください。このようなモデムはファイルシステム上で /dev/cdc-wdm と認識されます。

Linux で QMI モデムを初期化して使用することは現在まだ出来ません (2014年9月)。Windows で Lenovo のアクティベーションアプリ を使ってモデムを有効化してください (もしくはウェブで "Lenovo mobile broadband" を検索してあなたが使用しているモデム用の適切なアプリを探して下さい)。アプリを使って初期化を行わないかぎりモデムは動作しません。

手順

公式リポジトリから libqmi パッケージをインストールしてください。qmicliqmi-network プログラムが入っています。また、net-tools もインストールしてください。ifconfig コマンドが入っています。

qmi-network を使うための ヘルパースクリプト が GitHub に存在します。$PATH のどこかにスクリプトを保存して実行可能属性を付与して、スクリプトの中身を確認してください。変更する必要がある変数がいくつか存在します (特に WWAN_DEV)。

qmi_wwanqcserial カーネルモジュールをロードしてください:

$ modprobe qmi_wwan
$ modprobe qcserial

他にやる必要があることについては GitHub page of the QMI helper の readme を読んで下さい。特に、あなたが使用するインターネットプロバイダーの APN を /etc/qmi-network.conf に設定する必要があります:

/etc/qmi-network.conf
APN=foo.bar.net

最後に、qmi_setup.sh start を実行するとインターネット接続が開始されます。

Alternative method

Reference information: http://www.thinkwiki.org/wiki/Qualcomm_Gobi_2000

First of all you need to make sure what model your modem is. Open your thinkpads backplate and look for IC or FCC ID. For this example we're going to use GOBI2000 (IC: 2723A-GOBI2000, FCC ID: J9CGOBI2000-L)

Enable your modem device from you BIOS I/O settings.

Download the driver installer exe from support.lenovo.com/en_US/downloads/detail.page?DocID=DS001302 and extract it with Wine. It will unpack the drivers to ~/.wine/drive_c/DRIVERS/WWANQL. The unpacker will prompt you to install the drivers automatically after unpacking, but if you need the installer again it's GobiInstaller.msi in previously mentioned folder. The installer will in turn unpack the firmware images to ~/.wine/drive_c/Program\ Files\ \(x86\)/QUALCOMM/Images/Lenovo . Now refer to the reference information on what firmware you want/need. Generally you are good to go with the Generic UMTS and Default Firmware (Forlders 6 an UMTS)

Download gobi loader from http://www.codon.org.uk/~mjg59/gobi_loader/, follow the instructions to make and install (you might need to 'sudo make install'). Now copy the 3 previous firmware files to /lib/firmware/gobi (if the folder doesn't exist, create it). Insert your sim card to the port found under your battery pack and restart. Your modem should now show up in your network manager.

Getting around BIOS-level whitelist restrictions

In newer ThinkPad models, it is normally impossible to swap the LTE modem for a supported one due to BIOS-level restrictions ("whitelists" of allowed M.2 expansion cards) implemented in all modern Lenovo laptops. However, a method has been found to configure any Sierra Wireless EM73xx/EM74xx modem to "evade" the whitelist checks, so these modems can be used normally.

We will assume the model to be Sierra Wireless EM7455 here.

Settings for Sierra Wireless EM7455

General description

Use AT!CUSTOM="FASTENUMEN",0 AT command to disable the modem's USB fast enumeration feature. The modem will take a significantly longer time to appear on the USB bus and the firmware will "miss" the modem at boot time.

Alternatively, use AT!CUSTOM="FASTENUMEN",2 to selectively enable USB fast enumeration for warm boots only. The modem will reappear faster on S3 resume but still evade the whitelist checks on regular boots and reboots (the mechanism of this effect is not fully clear to the author).

This comes with a downside: because the firmware does not "see" the modem, it will not export the WWAN rfkill but instead it will unconditionally assert the W_DISABLE pin of the M.2 slot, forcing the modem into "airplane mode". Use AT!PCOFFEN=2 AT command to configure the modem to ignore this pin.

Step-by-step

1. モデムを用意し、BIOS セットアップで WWAN カードを有効にした上で、ラップトップを起動します。

2. ラップトップをサスペンドします (S3 サスペンドモードを使用するよう設定しておいてください)。

3. Fibocom モデムと Sierra Wireless モデムを共にホットスワップで接続して、復帰させます。S3 からの復帰時にはホワイトリストは調べられません。

lsusb の結果にモデムが表示されていることを確認してください:

# lsusb
<...>
Bus 001 Device 004: ID 1199:9071 Sierra Wireless, Inc.
<...>

モデムの VID (vendor ID) を把握してください (この例では 1199 です)。

4. ModemManager が実行されている場合は、停止させてください:

 # systemctl stop ModemManager

5. 必須ではありませんが、qmi-firmware-update でモデムのファームウエアを更新します:

# cd /path/to/extracted/firmware
# qmi-firmware-update -d 1199 -u *.cwe *.nvu

6. AT コマンドポートを有効化するためモデムの USB composition を変更します:

# qmicli -d /dev/cdc-wdm1 --dms-swi-set-usb-composition=8

7. qmicli の提案通りモデムの Operating Mode を変更します:

# qmicli -d /dev/cdc-wdm1 --dms-set-operating-mode=offline
# qmicli -d /dev/cdc-wdm1 --dms-set-operating-mode=reset

8. モデムが再び表示されるまで待ち、その上で確認します:

# qmicli -d /dev/cdc-wdm1 --dms-swi-get-usb-composition
[/dev/cdc-wdm1] Successfully retrieved USB compositions:
            USB composition 6: DM, NMEA, AT, QMI
        [*] USB composition 8: DM, NMEA, AT, MBIM
            USB composition 9: MBIM

9. 3つのシリアルポート /dev/ttyUSB0/dev/ttyUSB1 および /dev/ttyUSB2 が利用可能なことを確認してください (次の例ではUSB-シリアル変換器がこれ以外に接続されていないことを前提にしています):

# ls -l /dev/ttyUSB*
crw-rw---- 1 root uucp 188, 0 Feb 14 20:11 /dev/ttyUSB0
crw-rw---- 1 root uucp 188, 1 Feb 14 20:11 /dev/ttyUSB1
crw-rw---- 1 root uucp 188, 2 Feb 14 20:11 /dev/ttyUSB2

10. /dev/ttyUSB2screen など好みのシリアルコンソールエミュレータでアタッチしてください:

# screen /dev/ttyUSB2 115200

11. AT コマンド (OK を入力する必要はありません、結果は以下の記録の一部に含まれています):

11.1. エコーバックコマンドを有効化します (元々エコーバックが無効な場合、入力した内容は見えません):

ATE1
OK

11.2. Advanced コマンド を有効化します:

AT!ENTERCND="A710"
OK

11.3. カスタムオプションを確認します (これは著者の場合でのオプションです):

AT!CUSTOM?
!CUSTOM: 
             GPSENABLE          0x01
             GPSSEL             0x01
             IPV6ENABLE         0x01
             SIMLPM             0x01
             SINGLEAPNSWITCH    0x01


OK

11.4. USB fast enumeration を設定します(より安全に行なうには 20 にします):

AT!CUSTOM="FASTENUMEN",2
OK

11.5. 確かめます:

AT!CUSTOM?
!CUSTOM: 
             GPSENABLE          0x01
             GPSSEL             0x01
             IPV6ENABLE         0x01
             SIMLPM             0x01
             FASTENUMEN         0x02
             SINGLEAPNSWITCH    0x01


OK

(FASTENUMEN オプションが他と並んで表示されているはずです)"

11.6. W_DISABLE を無視するようにモデムを設定します:

AT!PCOFFEN=2
OK

11.7. 確かめます:

AT!PCOFFEN?
2
   
OK

11.8. モデムをリセットします:

AT!RESET
OK

(しばらく後にターミナルは切断されます)

12. モデムが再び表示されるまで待ち、再起動、電源を落とす、ラップトップのハードリセットで設定を確かめます。

Remarks

For more information (including the original thought process that led to this discovery), see these lenovo threads and this reddit thread.

You may also apply other useful configuration options described here.

トラブルシューティング

  • Windows でモデムを初期化してください。

WWAN/LTE GUI

Install NetworkManager and network-manager-applet to make your life easier finding the correct APN for your SIM card.

参照