LoginSignup
32
33

More than 5 years have passed since last update.

AK-020 を Raspbian で使う(とりあえず版)

Last updated at Posted at 2016-05-16

SORACOM Air SIM + Abit社製 の AK-020 を Raspberry Pi で使うのに必要な情報です。

Raspberry Pi 2 Model B + raspbian_lite-2016-03-18で確認しています。
(5-13版が出てるのに今気付くなど)

基本的に、付属マニュアルにある通り、eject して modprobe すれば、tty が見えます。
ただし、AT+CFUN=1 を実行しないと、モデムとして動作を開始しないことがポイントのようです。

パッケージインストール

pi@raspberrypi:~ $ sudo apt-get install -y eject wvdial

設定ファイル

/etc/wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = AT+CFUN=1
Init3 = AT+CGDCONT=1,"IP","soracom.io"
Dial Attempts = 3
Modem Type = Analog Modem
Dial Command = ATD
Stupid Mode = yes
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
APN = soracom.io
Phone = *99***1#
Username = sora
Password = sora
Carrier Check = no
Auto DNS = 1
Check Def Route = 1
/etc/ppp/peers/wvdial
noauth
name wvdial
usepeerdns
replacedefaultroute
/etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

eject sr0
modprobe usbserial vendor=0x15eb product=0x7d0e

echo waiting for modem device
for i in {1..30}
do
  [ -e /dev/ttyUSB0 ] && break
  echo -n .
  sleep 1
done
[ $i = 30 ] && ( echo modem not found ; exit 1 )
wvdial &

exit 0

あとは再起動すれば自動的に接続しに行きます。

32
33
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
32
33