概要
Wandboard(Debian)上にて、AT-020にServerMan SIMを刺して、インターネットに接続するまでの手順を残します。
カテゴリ | 内容 |
---|---|
ボード | Wandboard Dual (CPU "NXP i.MX6" 1Ghz / MEM 1GB) |
OS | Debian 8.0 |
USB SIM | AK-020 |
1.初期設定
AK-020に、ServerMan SIMを差し込みます。
パッケージインストール
# apt-get install wvdial eject
2.wvdialの設定
ダイアルアップ設定ファイルの作成
[Dialer Defaults]
Modem Type = Analog modem
Phone = *99***1#
Carrier Check = no
Auto Reconnect = yes
ISDN = 0
Init1 = ATZ
Init2 = AT+CFUN=1
Init3 = AT+CGDCONT=1,"IP","dream.jp"
Dial Command = ATD
Modem = /dev/ttyUSB0
Baud = 460800
Username = user@dream.jp
Password = dti
APN = dream.jp
Dial Attempts = 3
Stupid Mode = yes
Auto DNS = 1
Check Def Route = 1
3.USBアダプタを接続
$ lsusb
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 1c4f:0027 SiGma Micro
Bus 001 Device 002: ID 0409:0059 NEC Corp. HighSpeed Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ lsusb
Bus 001 Device 008: ID 15eb:7d0e
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 1c4f:0027 SiGma Micro
Bus 001 Device 002: ID 0409:0059 NEC Corp. HighSpeed Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device に、「ID 15eb:7d0e」が現れました。
※「ID 15eb:a403」と表示されている場合は、次項の「CDROMマウントの解除」を実行後、再度確認してください。正常にejectできれば、15eb:7d0eに変わります。
# lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ci_hdrc/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 1: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 8, If 0, Class=Communications, Driver=cdc_mbim, 480M
|__ Port 4: Dev 8, If 1, Class=CDC Data, Driver=cdc_mbim, 480M
|__ Port 4: Dev 8, If 2, Class=Vendor Specific Class, Driver=, 480M
|__ Port 4: Dev 8, If 3, Class=Vendor Specific Class, Driver=, 480M
|__ Port 4: Dev 8, If 4, Class=Vendor Specific Class, Driver=, 480M
|__ Port 4: Dev 8, If 5, Class=Vendor Specific Class, Driver=, 480M
|__ Port 4: Dev 8, If 6, Class=Mass Storage, Driver=usb-storage, 480M
4.CDROMマウントの解除
AK-020のマニュアル上、「本機の取り付け時は、CD-ROMとして見えているのでejectします。」と記述があり、
以下を実行が指示されています。
# eject /dev/sr1
※sr1の部分は、環境により異なります。
こちらでの動作確認では、/dev/sr?にはマウントされていませんでした。
Raspberypiでは、以下のようにマウントされるので、"eject /dev/sr0"を実行します。
/dev/sr0 on /media/pi/AK-020 Dialer type iso9660 (ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2)
5.USBアダプタの認識
# modprobe usbserial vendor=0x15eb product=0x7d0e
# modprobe -v option
# echo "15eb 7d0e" > /sys/bus/usb-serial/drivers/option1/new_id
# ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
6.ダイアルアップ
以下のコマンドを実行し、ダイアルアップします。
# wvdial
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
~
--> Modem initialized.
--> Sending: ATD*99***1#
--> Waiting for carrier.
ATD*99***1#
CONNECT 21000000
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at WEEK MM DD hh:mm:ss YYYY
--> Pid of pppd: 915
--> Using interface ppp0
--> local IP address XXX.XXX.XXX.XXX
--> remote IP address XXX.XXX.XXX.XXX
--> primary DNS address XXX.XXX.XXX.XXX
--> secondary DNS address XXX.XXX.XXX.XXX
XXXの箇所は、接続時にプロバイダから割り当てられます。
切断するときは、wvdialを終了させてください。
資料
AK-020取扱説明書
http://www.abit.co.jp/product/images/AK-020_manual_Linux_v1.1.pdf
ServerMan SIM LTE
http://www.dream.jp/svmsim/
参考コマンド
lsusb, lspci, modprobe, udevadm,