FOMA用USBモデムA2502に関するページです。

構成

AnyDATA製 ADU-520CのOEM? anyDATA社のwebページを見ると、形状はそっくり。Vendor ID=0x16d5, Product ID=0x6202。

接続

現在使用しているのは法人契約のみのACCA mobile(D)アッカモバイルなので、FOMAとは少し違う。忘れないように設定をメモしておこう。
参考:

Ubunt 8.04での利用

USBポートに差しただけでは自動的に認識されない。modprobeでVendor IDとProduct IDを指定する必要あり。

  • ただUSBポートに差した場合のdmesg出力
    [ 1486.487496] usbcore: deregistering interface driver usbserial_generic
    [ 1486.487551] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial deregistering driver generic
    [ 1486.487585] usbcore: deregistering interface driver usbserial
    [ 1488.064350] usb 1-1: new full speed USB device using uhci_hcd and address 7
    [ 1488.081169] usb 1-1: configuration #1 chosen from 1 choice
  • sudo modprobe usbserial vendor=0x16d5 product=0x6202 とした際のdmesg出力
    [ 1509.266615] usbcore: registered new interface driver usbserial
    [ 1509.266854] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
    [ 1509.267144] usbserial_generic 1-1:1.0: generic converter detected
    [ 1509.267811] usb 1-1: generic converter now attached to ttyUSB0
    [ 1509.267998] usbserial_generic 1-1:1.1: generic converter detected
    [ 1509.268255] usb 1-1: generic converter now attached to ttyUSB1
    [ 1509.268431] usbserial_generic 1-1:1.2: generic converter detected
    [ 1509.268672] usb 1-1: generic converter now attached to ttyUSB2
    [ 1509.268843] usbcore: registered new interface driver usbseial_generic
    [ 1509.268850] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial Driver core

毎回オプションを入力するのは面倒なので、自動認識させるには、/etc/udev/rules.d/50-anydata-a2502.rules というファイルを以下の内容で作成する。(/etc/modprobe.d/option に記述を追加する方法はなぜかうまくいかなかった。)

SUBSYSTEM=="usb", SYSFS{idProduct}=="6202", SYSFS{idVendor}=="16d5", RUN+="/sbin/modprobe usbserial vendor=0x16d5 product=0x6202"

参考:Huawei E220

/etc/ppp/peers/acca

#
# MobileAPHowTo2 - OpenWrt
# (http://wiki.openwrt.org/MobileAPHowTo2)

# information about USB modem device
/dev/ttyUSB0            # device file assigned to Nokia 6230
230400                  # DTE speed
# Initial authentication
user "アッカモバイルの接続用ユーザID"
                        # username (data acceleration)
defaultroute            # use cellular network's gateway
replacedefaultroute     # force replace an existing default GW with the new one
noipdefault             # force peer to specify local IP (GC83 only)
usepeerdns              # use DNS servers from remote host
crtscts                 # enable hardware flow control
lock                    # lock the serial port when in use
noauth                  # don't expect peer to authenticate
persist                 # re-dial connection if dial fails
hide-password
local
# dns routing
usepeerdns
# disable compressions
novj
noccp
nobsdcomp

# Uncomment next 2 lines for debugging
#debug
#nodetach

ipcp-max-configure 20   # increase the maximum IPCP config requests
maxfail 0               # do not stop retrying connection

# Move on to the chat script after connection
connect '/usr/sbin/chat -v -V -t3 -f /etc/chatscripts/acca'

/etc/chatscripts/acca

#
# MobileAPHowTo2 - OpenWrt
# (http://wiki.openwrt.org/MobileAPHowTo2)

# information about USB modem device
SAY 'Starting Acca mobile A2502 connect script...\n'
SAY '\n'
# ispauth CHAP          # define auth method (optional)

SAY 'Setting the abort string\n'
SAY '\n'

# Abort String ---------------------------------
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY"
#ECHO ON
# ----------------------------------------------
SAY 'Initializing USB modem\n'
TIMEOUT 15

# Modem Initialization -------------------------
"" "AT"
TIMEOUT 5

# ----------------------------------------------

# Additional initialization (optional) ---------
# /begin att
OK AT&FE1V1X1&D2&C1S0=0
OK AT+ipr=230400
# /end att

# ----------------------------------------------

SAY '\n'
SAY 'Dialing...\n'
# Dial the ISP ---------------------------------
# a few different dial commands are shown
# the default should work fine

OK ATDT*99***1#
CONNECT ' '

/etc/ppp/chap-secrets

# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
"アッカモバイル接続用のユーザID" * "パスワード"

接続テスト

$ pon acca
Starting Acca mobile A2502 connect script...

Setting the abort string

Initializing USB modem
AT
OK
AT&FE1V1X1&D2&C1S0=0
OK
Dialing...

AT+ipr=230400
OK
ATDT*99***1#
CONNECTSerial connection established.
using channel 16
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x826d2d22> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <accomp> <pcomp> <asyncmap 0x0> <auth chap MD5>]
sent [LCP ConfAck id=0x1 <accomp> <pcomp> <asyncmap 0x0> <auth chap MD5>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x826d2d22> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0x826d2d22]
rcvd [CHAP Challenge id=0x1 <d6e7d8099254ad23028f29ee1a20589c>, name = ""]
sent [CHAP Response id=0x1 <a2d19fa4bf02b49d99bb0aedd7c30613>, name = "hogehoge"]
rcvd [CHAP Success id=0x1 ""]
CHAP authentication succeeded
CHAP authentication succeeded
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [IPCP ConfReq id=0x1 <addr 124.154.192.193>]
sent [IPCP ConfAck id=0x1 <addr 124.154.192.193>]
rcvd [IPCP ConfNak id=0x1 <addr 124.154.206.64> <ms-dns1 202.239.113.18> <ms-dns3 202.239.113.26>]
sent [IPCP ConfReq id=0x2 <addr 124.154.206.64> <ms-dns1 202.239.113.18> <ms-dns3 202.239.113.26>]
rcvd [IPCP ConfAck id=0x2 <addr 124.154.206.64> <ms-dns1 202.239.113.18> <ms-dns3 202.239.113.26>]
replacing old default route to eth0 [192.168.4.254]
Cannot determine ethernet address for proxy ARP
local  IP address 124.154.206.64
remote IP address 124.154.192.193
primary   DNS address 202.239.113.18
secondary DNS address 202.239.113.26
Script /etc/ppp/ip-up started (pid 8274)
Script /etc/ppp/ip-up finished (pid 8274), status = 0x0

より詳細なログを表示させるには、以下のように入力する。

$ pon acca debug dump logfd 2 nodetach
  • ifconfigによる確認
    $ ifconfig
    eth0      Link encap:Ethernet  HWaddr xx:yy:zz:aa:bb:cc
              inet addr:192.168.aa.bb  Bcast:192.168.aa.255  Mask:255.255.255.0
              inet6 addr: fe80::200:39ff:feaa:bbcc/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:93712 errors:0 dropped:0 overruns:0 frame:0
              TX packets:16396 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:13733771 (13.0 MB)  TX bytes:2863155 (2.7 MB)
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    ppp0      Link encap:Point-to-Point Protocol
              inet addr:124.154.206.64  P-t-P:124.154.192.193  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
              RX packets:4 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:3
              RX bytes:187 (187.0 B)  TX bytes:126 (126.0 B)
  • routeコマンドによる確認
    $ route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    124.154.192.193 *               255.255.255.255 UH    0      0        0 ppp0
    192.168.aa.0    *               255.255.255.0   U     0      0        0 eth0
    default         *               0.0.0.0         U     0      0        0 ppp0

OpenWrtでの利用

必要なパッケージ:ppp, chat, kmod-ppp。ほとんどMobileAPHowTo2 - OpenWrtの記述どおり。(2009-07-06現在、MobileAPHowTo2 - OpenWrtは消えている。)

Ubuntu同様、デフォでは認識されないので、/etc/modules.d/60-usb-serial を以下のように書き換える。

usbserial vendor=0x16d5 product=0x6202

再起動すると、以下のように認識される。

usb 2-2: new full speed USB device using uhci_hcd and address 2
usb 2-2: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbserial_generic 2-2:1.0: generic converter detected
usb 2-2: generic converter now attached to ttyUSB0
usbserial_generic 2-2:1.1: generic converter detected
usb 2-2: generic converter now attached to ttyUSB1
usbserial_generic 2-2:1.2: generic converter detected
usb 2-2: generic converter now attached to ttyUSB2
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core

comgt の利用

comgt を利用することにより、/etc/config/network ファイルにパラメータを記述するだけで、wan や lan のように簡単に使えるようになる。(ただし、それだけでは自動起動までは至らなかった。)

/etc/config/network

#### PPP configuration
config interface	ppp
	option ifname	"ppp0"
	option device	"/dev/ttyUSB0"
	option proto	3g
	option apn	"パケット発信時の接続先APN"
	option service	hsdpa
	option username	"ユーザ名"
	option password "パスワード"
	option keepalive 1
	option defaultroute 1
	option replacedefaultroute 1
	option peerdns	1

/etc/config/firewall

PPP 接続時に LAN → PPP 方向にマスカレードするよう設定を追加する。

config zone
	option name		ppp
	option input	REJECT
	option output	ACCEPT 
	option forward	REJECT
	option masq		1 

config forwarding 
	option src      lan
	option dest     ppp
	option mtu_fix	1

PPP回線経由で外部からの SSH も許可する場合は、以下の内容を追加する。

config rule 
	option dest		ppp
	option proto		tcp
	option dest_dport	22
	option target	ACCEPT	

自動起動

/etc/rc.d/S40networkスクリプト(実体は /etc/init.d/network)で ifup -a が呼ばれているが、このタイミングでは ppp はうまく作れない。そこで、起動プロセスのもっと後ろの方で、あらためて ppp を呼び出すことにする。

  • /etc/rc.d/S95done
    赤字部分を追加する。
    #!/bin/sh /etc/rc.common
    # Copyright (C) 2006 OpenWrt.org
    
    START=95
    boot() {
    	[ -d /tmp/root ] && {
    		lock /tmp/.switch2jffs
    		firstboot switch2jffs
    		lock -u /tmp/.switch2jffs
    	}
    
    	# wake up 3G modem
    	sleep 5
    	ifup ppp
    
    	# set leds to normal state
    	. /etc/diag.sh
    	set_state done
    }

カードの情報取得

# gcom info -d /dev/ttyUSB0
##### Wireless WAN Modem Configuration #####
Product text:
====

NTT DoCoMo
OK
====
Manufacturer:           AnyDATA.NET
IMEI and Serial Number: xxxxxxxxxxxxxxx
Manufacturer's Revision: 
U62WND
Hardware Revision:      

Network Locked:         0
Customisation:          

Band settings:          (
)
APN:                    1,"IP","isphogehoge.jp","",0,0
##### END #####

モバイル通信を切断する場合は、以下のコマンドを発行すれば、自動的にデフォルトゲートウェイが wan 側に戻る。

# ifdown ppp

参考

obsolete

/etc/ppp/peer/acca

Ubuntuとほとんど同じだが、なぜかパスワードをここに記述しないと繋がらなかった。

/dev/ttyUSB0
230400
user "アッカモバイル接続用のユーザID"
password "パスワード"
defaultroute
replacedefaultroute
noipdefault
usepeerdns
remotename attws
ipparam attws
crtscts
lock
noauth
persist
usepeerdns
debug
nodetach
ipcp-max-configure 20
maxfail 0
connect '/usr/sbin/chat -v -V -t3 -f /etc/ppp/peers/chat-acca'

/etc/ppp/peers/chat-acca

SAY 'Starting Acca mobile A2502 connect script...\n'
SAY '\n'
SAY 'Setting the abort string\n'
SAY '\n'
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY"
SAY 'Initializing USB modem\n'
TIMEOUT 60
"" "AT"
OK AT&FE1V1X1&D2&C1S0=0
OK AT+ipr=230400
SAY '\n'
SAY 'Dialing...\n'
OK ATDT*99***1#
CONNECT ' '

実行

  • 通常
    # pppd file /etc/ppp/peers/acca
  • デバッグ
    root@OpenWrt:~# pppd call acca debug dump logfd 2 nodetach
    pppd options in effect:
    debug		# (from command line)
    nodetach		# (from command line)
    persist		# (from /etc/ppp/peers/acca)
    logfd 2		# (from command line)
    maxfail 0		# (from /etc/ppp/peers/acca)
    dump		# (from command line)
    noauth		# (from /etc/ppp/peers/acca)
    user ユーザ名		# (from /etc/ppp/peers/acca)
    password ??????		# (from /etc/ppp/peers/acca)
    remotename attws		# (from /etc/ppp/peers/acca)
    /dev/ttyUSB0		# (from /etc/ppp/peers/acca)
    230400		# (from /etc/ppp/peers/acca)
    lock		# (from /etc/ppp/peers/acca)
    connect /usr/sbin/chat -v -V -t3 -f /etc/ppp/peers/chat-acca		# (from /etc/ppp/peers/acca)
    crtscts		# (from /etc/ppp/peers/acca)
    local		# (from /etc/ppp/peers/acca)
    noaccomp		# (from /etc/ppp/options)
    nopcomp		# (from /etc/ppp/options)
    lcp-echo-failure 5		# (from /etc/ppp/options)
    lcp-echo-interval 1		# (from /etc/ppp/options)
    ipparam attws		# (from /etc/ppp/peers/acca)
    noipdefault		# (from /etc/ppp/peers/acca)
    ipcp-max-configure 20		# (from /etc/ppp/peers/acca)
    defaultroute		# (from /etc/ppp/peers/acca)
    replacedefaultroute		# (from /etc/ppp/peers/acca)
    usepeerdns		# (from /etc/ppp/peers/acca)
    Starting Acca mobile A2502 connect script...
    
    Setting the abort string
    
    Initializing USB modem
    AT
    OK
    AT&FE1V1X1&D2&C1S0=0
    OK
    Dialing...
    
    AT+ipr=230400
    OK
    ATDT*99***1#
    CONNECTSerial connection established.
    using channel 3
    Using interface ppp0
    Connect: ppp0 <--> /dev/ttyUSB0
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x73499cb1>]
    rcvd [LCP ConfReq id=0x1 <accomp> <pcomp> <asyncmap 0x0> <auth chap MD5>]
    sent [LCP ConfRej id=0x1 <accomp> <pcomp>]
    rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x73499cb1>]
    rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap MD5>]
    sent [LCP ConfAck id=0x2 <asyncmap 0x0> <auth chap MD5>]
    sent [LCP EchoReq id=0x0 magic=0x73499cb1]
    rcvd [CHAP Challenge id=0x1 <c47190a47cfa9eec33f12e06eec4829e>, name = ""]
    sent [CHAP Response id=0x1 <5a306c8cada25eeda917dba85195a3ae>, name = "ユーザ名"]
    rcvd [CHAP Success id=0x1 ""]
    CHAP authentication succeeded
    CHAP authentication succeeded
    sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
    rcvd [IPCP ConfReq id=0x1 <addr 123.230.216.193>]
    sent [IPCP ConfAck id=0x1 <addr 123.230.216.193>]
    rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
    sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
    rcvd [IPCP ConfNak id=0x2 <addr 123.230.222.11> <ms-dns1 211.14.194.250> <ms-dns3 211.14.194.254>]
    sent [IPCP ConfReq id=0x3 <addr 123.230.222.11> <ms-dns1 211.14.194.250> <ms-dns3 211.14.194.254>]
    rcvd [IPCP ConfAck id=0x3 <addr 123.230.222.11> <ms-dns1 211.14.194.250> <ms-dns3 211.14.194.254>]
    replacing old default route to eth0.1 [192.168.4.254]
    local  IP address 123.230.222.11
    remote IP address 123.230.216.193
    primary   DNS address 211.14.194.250
    secondary DNS address 211.14.194.254
    Script /etc/ppp/ip-up started (pid 1381)
    Script /etc/ppp/ip-up finished (pid 1381), status = 0x1
    

iptables

config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT

config zone
        option name             lan
        option input    ACCEPT
        option output   ACCEPT
        option forward  REJECT

config zone
        option name             wan
        option input    ACCEPT
        option output   ACCEPT
        option forward  REJECT
        option masq     1

config forwarding
        option src      lan
        option dest     wan
        option proto    tcp
        option dest_dport       22
        option src_dport        22


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option dest             wan
#       option proto    tcp
#       option target   REJECT

# block a specific mac on wan
#config rule
#       option dest             wan
#       option src_mac  00:11:22:33:44:66
#       option target   REJECT

# block incoming ICMP traffic on a zone
#config rule
#       option src              lan
#       option proto    ICMP
#       option target   DROP

# port redirect port coming in on wan to lan
#config redirect
#       option src                      wan
#       option src_dport        80
#       option dest                     lan
#       option dest_ip          192.168.16.235
#       option dest_port        80
#       option proto            tcp

# include a file with users custom iptables rules
#config include
#       option path /etc/firewall.user


### FULL CONFIG SECTIONS
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  00:11:22:33:44:55
#       option src_port 80
#       option dest             wan
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp
#       option target   REJECT

#config redirect
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  00:11:22:33:44:55
#       option src_port         1024
#       option src_dport        80
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp
  • iptables -L の出力
    # iptables -L
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    DROP       all  --  anywhere             anywhere            state INVALID 
    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
    ACCEPT     all  --  anywhere             anywhere            
    syn_flood  tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN 
    input_rule  all  --  anywhere             anywhere            
    input      all  --  anywhere             anywhere            
    
    Chain FORWARD (policy DROP)
    target     prot opt source               destination         
    DROP       all  --  anywhere             anywhere            state INVALID 
    TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU 
    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
    forwarding_rule  all  --  anywhere             anywhere            
    forward    all  --  anywhere             anywhere            
    reject     all  --  anywhere             anywhere            
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    DROP       all  --  anywhere             anywhere            state INVALID 
    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
    ACCEPT     all  --  anywhere             anywhere            
    output_rule  all  --  anywhere             anywhere            
    output     all  --  anywhere             anywhere            
    
    Chain forward (1 references)
    target     prot opt source               destination         
    zone_lan_forward  all  --  anywhere             anywhere            
    zone_wan_forward  all  --  anywhere             anywhere            
    
    Chain forwarding_lan (1 references)
    target     prot opt source               destination         
    
    Chain forwarding_rule (1 references)
    target     prot opt source               destination         
    
    Chain forwarding_wan (1 references)
    target     prot opt source               destination         
    
    Chain input (1 references)
    target     prot opt source               destination         
    zone_lan   all  --  anywhere             anywhere            
    zone_wan   all  --  anywhere             anywhere            
    
    Chain input_lan (1 references)
    target     prot opt source               destination         
    
    Chain input_rule (1 references)
    target     prot opt source               destination         
    
    Chain input_wan (1 references)
    target     prot opt source               destination         
    
    Chain output (1 references)
    target     prot opt source               destination         
    zone_lan_ACCEPT  all  --  anywhere             anywhere            
    zone_wan_ACCEPT  all  --  anywhere             anywhere            
    
    Chain output_rule (1 references)
    target     prot opt source               destination         
    
    Chain reject (5 references)
    target     prot opt source               destination         
    REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset 
    REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable 
    
    Chain syn_flood (1 references)
    target     prot opt source               destination         
    RETURN     tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 25/sec burst 50 
    DROP       all  --  anywhere             anywhere            
    
    Chain zone_lan (1 references)
    target     prot opt source               destination         
    input_lan  all  --  anywhere             anywhere            
    zone_lan_ACCEPT  all  --  anywhere             anywhere            
    
    Chain zone_lan_ACCEPT (2 references)
    target     prot opt source               destination         
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     all  --  anywhere             anywhere            
    
    Chain zone_lan_DROP (0 references)
    target     prot opt source               destination         
    DROP       all  --  anywhere             anywhere            
    DROP       all  --  anywhere             anywhere            
    
    Chain zone_lan_REJECT (1 references)
    target     prot opt source               destination         
    reject     all  --  anywhere             anywhere            
    reject     all  --  anywhere             anywhere            
    
    Chain zone_lan_forward (1 references)
    target     prot opt source               destination         
    zone_wan_ACCEPT  all  --  anywhere             anywhere            
    forwarding_lan  all  --  anywhere             anywhere            
    zone_lan_REJECT  all  --  anywhere             anywhere            
    
    Chain zone_wan (1 references)
    target     prot opt source               destination         
    input_wan  all  --  anywhere             anywhere            
    zone_wan_ACCEPT  all  --  anywhere             anywhere            
    
    Chain zone_wan_ACCEPT (3 references)
    target     prot opt source               destination         
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     all  --  anywhere             anywhere            
    
    Chain zone_wan_DROP (0 references)
    target     prot opt source               destination         
    DROP       all  --  anywhere             anywhere            
    DROP       all  --  anywhere             anywhere            
    
    Chain zone_wan_REJECT (1 references)
    target     prot opt source               destination         
    reject     all  --  anywhere             anywhere            
    reject     all  --  anywhere             anywhere            
    
    Chain zone_wan_forward (1 references)
    target     prot opt source               destination         
    forwarding_wan  all  --  anywhere             anywhere            
    zone_wan_REJECT  all  --  anywhere             anywhere            
    
  • iptables -L -t nat の出力
    # iptables -L -t nat
    Chain PREROUTING (policy ACCEPT)
    target     prot opt source               destination         
    zone_wan_prerouting  all  --  anywhere             anywhere            
    zone_lan_prerouting  all  --  anywhere             anywhere            
    prerouting_rule  all  --  anywhere             anywhere            
    
    Chain POSTROUTING (policy ACCEPT)
    target     prot opt source               destination         
    postrouting_rule  all  --  anywhere             anywhere            
    zone_wan_nat  all  --  anywhere             anywhere            
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain postrouting_rule (1 references)
    target     prot opt source               destination         
    
    Chain prerouting_lan (1 references)
    target     prot opt source               destination         
    
    Chain prerouting_rule (1 references)
    target     prot opt source               destination         
    
    Chain prerouting_wan (1 references)
    target     prot opt source               destination         
    
    Chain zone_lan_nat (0 references)
    target     prot opt source               destination         
    MASQUERADE  all  --  anywhere             anywhere            
    
    Chain zone_lan_prerouting (1 references)
    target     prot opt source               destination         
    prerouting_lan  all  --  anywhere             anywhere            
    
    Chain zone_wan_nat (1 references)
    target     prot opt source               destination         
    MASQUERADE  all  --  anywhere             anywhere            
    
    Chain zone_wan_prerouting (1 references)
    target     prot opt source               destination         
    prerouting_wan  all  --  anywhere             anywhere
    

電波強度の取得

hwhack: (メモ)DoCoMo A2502の制御ポートアクセスによると、/dev/ttyUSB2 として認識されるポートが制御ポートで、ここにコマンドを送ると信号強度などが取れるらしい。(ただし、アッカから提供されたカードが返す返事が58バイトでなく、59バイトだった。)

また、FAQ ID # 36 - How does the CSQ value relate to RSSI?によると、電波強度は AT+CSQ コマンドでも取得可能。A2502は電波が弱いと 99 という値を返してきたので、GPRS-401に近いのかもしれない。

AT+CSQ
+CSQ: 31,99

AT+CSQ=?
+CSQ: (0-31,99),(99)

0       ‑113 dBm or less
1       ‑111 dBm
2...30  ‑109... ‑53 dBm
31       ‑51 dBm or greater
99       not known or not detectable

filea2502ant.c: hwhack: (メモ)DoCoMo A2502の制御ポートアクセスにある ruby プログラムをC言語に直したもの。
fileMakefile: Makefile

【プリペイド簡単接続】日本通信b-mobile【20】

186 :いつでもどこでも名無しさん:2008/08/12(火) 21:23:20 ID:/YKxquvS0
    >>167
    PC側のダイアルアップ設定は、
    ユーザー名 bmobile@l3.jplat.net
    パスワード bmobile
    ダイアル番号 *99***1#

    また、FOMA PC設定ソフトでFOMA端末側のAPN設定を行う。
    http://www.nttdocomo.co.jp/support/utilization/application/foma/com_set/pc_setup/
    なお、上記の「ダイアル番号 *99***1#」は、
    FOMA端末に登録されている登録番号1番目のcid1のAPNに接続するという意味なので、
    仮に「dm.jplat.net」をcid4に登録したなら、
    指定するダイアルアップのところは、*99***4#になるということのようだ。 

リンク

b-mobile 3G


添付ファイル: fileMakefile 717件 [詳細] filea2502ant.c 996件 [詳細]

トップ   差分 バックアップ リロード   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2009-08-17 (月) 19:26:38 (3590d)