2015年8月26日水曜日

Raspberry Piで、L-03Dを使ってOCN ONEに接続するYo!

Raspberry Piで、ルータ作りたいのですが、その前に

L-03DにOCNの格安SIMを挿入して、Raspberry Piからダイアルアップ接続する。


$ sudo apt-get install usb-modeswtich
$ sudo apt-get install wvdial

$ sudo vi /dev/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATH
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Dial Attempts = 3
Stupid Mode = 1
Modem Type = Analog Modem
Dial Command = ATD
Stupid Mode = yes
Baud = 460800
New PPPD = yes
APN = lte-d.ocn.ne.jp
Modem = /dev/ttyUSB2
ISDN = 0
Phone = *99***1#
Password = <password>
Username = <username>

Carrier Check = no

Remote Name = CHAP

お味噌は、Init2 = ATH
これが無いと、L-03Dでは、通信できない。Yo!!

$ sudo wvdial
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATH
ATH
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATD*99***1#
--> Waiting for carrier.
ATD*99***1#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Wed Aug 26 01:49:48 2015
--> Pid of pppd: 2402
--> Using interface ppp0
--> local  IP address 153.155.245.13
--> remote IP address 10.64.64.64
--> primary   DNS address 222.146.35.1

--> secondary DNS address 221.184.25.1

やめる時は、Ctrl-C

$ ifconfig ppp0
ppp0      Link encap:Point-to-Point Protocol  
          inet addr:153.251.24.70  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:23 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 

          RX bytes:1430 (1.3 KiB)  TX bytes:1469 (1.4 KiB)

これで、OK
ping で確認してね。(^^)

Peace!!

0 件のコメント:

コメントを投稿