Armadilloフォーラム

Armadillo-IoT-G2にFS020Uを利用して3G接続

aida

2016年8月10日 12時43分

お世話になります。

海外の電波法を取れている3GUSBドングル(FS020U)を利用して、3G回線の接続を試みております。
利用している本体はArmadillo-IoT G2です。

現在SDカードにDebianを入れて利用をしており、apt-getによりmodeswitchとwvdialをインストールしておりますが、
wvdial.confのModemの接続先指定のところで行き詰まっております。

そこで、非常に初歩的な内容のご質問かもしれませんが、接続方法をご教授していただければと思います。

例えば現在ドングルを接続すると
/dev/bsg/
の中に1:0:0:0等のものができますが、例えばttyUSBにすることができておりません。

・wvdial.conf内のModem = ~~~の指定の方法
・bsg内に現れる接続ではなくUSB接続として認識させる方法
上記の方法や、全く別の方法で接続させることはできますでしょうか?

以上、よろしくお願い致します。

コメント

at_mizo

2016年8月10日 13時16分

溝渕です。

解決にならないかもしれませんが、参考になれば…。

FS020Uは、メーカーホームページを見ると、ゼロインストールに対応している
ようです。そのため、単にUSBホストポートに接続しただけだと、3Gモジュー
ルではなくストレージとして見えていると思います。

ゼロインストールに対応しているデバイスをLinuxで動作させるには、
usb_modeswitchなどによって動作モードを変更する必要があります。ただ、探
してみましたが、FS020Uの設定を見つけることができませんでした。

または、USBデバイスが設定保存要の不揮発性メモリ領域を持っている場合は、
Window等に接続して設定した内容を保持できる場合があります。この場合、以
降接続すると3Gモジュールとして認識されますが、FS020Uが対応しているかど
うかは不明です。

以上、ご参考になれば。

at_ito

2016年8月10日 13時27分

伊藤です。

私がArmadillo-IoT G2でFS020Uを過去に動かしたことがあります。

参考程度ですが、その際のメモを以下に記載します。
APN等は、環境により読み替えてください。

■ 1. 設定ファイルの編集

/etc/ppp/options ファイルを以下のように編集してください。

============================================================
lock
defaultroute
usepeerdns
name PPPログイン名
============================================================
※: PPPログイン名は、SIMカードに記載されているユーザー名に置き換えてください。

/etc/ppp/pap-secrets ファイルを以下のように編集してください

============================================================
# Secrets for authentication using PAP
# client server secret IP addresses
PPPログイン名 * PPPパスワード
============================================================
※: PPPログイン名およびPPPパスワードは、SIMカードに記載されているユーザー名、パスワードに置き換えてください。

/etc/ppp/ppp-on-dialer ファイルを以下のように編集してください

============================================================
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will pe
# protocol for the desired connection.
#
exec chat -v \
TIMEOUT 3 \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
'OK' ATZ \
TIMEOUT 30 \
OK ATDT*99***1# \
CONNECT ''
============================================================

■ 2. ppp接続の開始

以下のコマンドを実行してください

============================================================
[armadillo ~]# tip -l /dev/ttyUSB1
AT+CGDCONT=1,"IP","xi01.wi-gate.net"
[armadillo ~]# usb_modeswitch -v 0x1c9e -p 0x9bfe -V 0x1c9e -P 0x9b11 -M 55534243123456780000000080000606f50402527600000000000000000000
[armadillo ~]# echo 1c9e 9b11 > /sys/bus/usb-serial/drivers/option1/new_id
[armadillo ~]# chmod +x /etc/ppp/ppp-on-dialer
[armadillo ~]# rm -rf /etc/resolv.conf
[armadillo ~]# ln -s /etc/ppp/resolv.conf /etc/
[armadillo ~]# pppd debug /dev/ttyUSB1 9600 connect /etc/ppp/ppp-on-dialer
============================================================

※: pppdの引数の「debug」は、必要なければ外してください。
debugをつけると/var/log/messagesに詳細なログが出力されます。

■ 3. ppp接続の確認

ppp接続が正常にできている場合は、以下の様になります。

============================================================
[root@armadillo440-0 (ttymxc1) ~]# ifconfig ppp0
ppp0 Link encap:Point-Point Protocol
inet addr:133.236.235.52 P-t-P:10.64.64.64 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:118 (118.0 B) TX bytes:142 (142.0 B)

[root@armadillo440-0 (ttymxc1) ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=53 time=58.1 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=53 time=41.0 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=53 time=38.4 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=53 time=40.0 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 38.4/44.3/58.1 ms
[root@armadillo440-0 (ttymxc1) ~]# ping www.google.co.jp
PING www.google.co.jp (173.194.126.151): 56 data bytes
64 bytes from 173.194.126.151: icmp_seq=0 ttl=55 time=49.2 ms
64 bytes from 173.194.126.151: icmp_seq=1 ttl=55 time=39.4 ms
64 bytes from 173.194.126.151: icmp_seq=2 ttl=55 time=38.5 ms
64 bytes from 173.194.126.151: icmp_seq=3 ttl=55 time=41.0 ms

--- www.google.co.jp ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 38.5/42.0/49.2 ms
[root@armadillo440-0 (ttymxc1) ~]#
============================================================

aida

2016年8月10日 15時31分

伊藤様

ご返信ありがとうございます!

ppp接続について、さっそく試してみたいと思います。

また、質問が出た際には、是非よろしくお願い致します。

> 伊藤です。
>
> 私がArmadillo-IoT G2でFS020Uを過去に動かしたことがあります。
>
> 参考程度ですが、その際のメモを以下に記載します。
> APN等は、環境により読み替えてください。
>
> ■ 1. 設定ファイルの編集
>
> /etc/ppp/options ファイルを以下のように編集してください。
>
> ============================================================
> lock
> defaultroute
> usepeerdns
> name PPPログイン名
> ============================================================
> ※: PPPログイン名は、SIMカードに記載されているユーザー名に置き換えてください。
>
>
> /etc/ppp/pap-secrets ファイルを以下のように編集してください
>
> ============================================================
> # Secrets for authentication using PAP
> # client server secret IP addresses
> PPPログイン名 * PPPパスワード
> ============================================================
> ※: PPPログイン名およびPPPパスワードは、SIMカードに記載されているユーザー名、パスワードに置き換えてください。
>
>
>
> /etc/ppp/ppp-on-dialer ファイルを以下のように編集してください
>
> ============================================================
> #!/bin/sh
> #
> # This is part 2 of the ppp-on script. It will pe
> # protocol for the desired connection.
> #
> exec chat -v \
> TIMEOUT 3 \
> ABORT '\nBUSY\r' \
> ABORT '\nNO ANSWER\r' \
> ABORT '\nRINGING\r\n\r\nRINGING\r' \
> '' \rAT \
> 'OK' ATZ \
> TIMEOUT 30 \
> OK ATDT*99***1# \
> CONNECT ''
> ============================================================
>
>
> ■ 2. ppp接続の開始
>
> 以下のコマンドを実行してください
>
> ============================================================
> [armadillo ~]# tip -l /dev/ttyUSB1
> AT+CGDCONT=1,"IP","xi01.wi-gate.net"
> [armadillo ~]# usb_modeswitch -v 0x1c9e -p 0x9bfe -V 0x1c9e -P 0x9b11 -M 55534243123456780000000080000606f50402527600000000000000000000
> [armadillo ~]# echo 1c9e 9b11 > /sys/bus/usb-serial/drivers/option1/new_id
> [armadillo ~]# chmod +x /etc/ppp/ppp-on-dialer
> [armadillo ~]# rm -rf /etc/resolv.conf
> [armadillo ~]# ln -s /etc/ppp/resolv.conf /etc/
> [armadillo ~]# pppd debug /dev/ttyUSB1 9600 connect /etc/ppp/ppp-on-dialer
> ============================================================
>
> ※: pppdの引数の「debug」は、必要なければ外してください。
> debugをつけると/var/log/messagesに詳細なログが出力されます。
>
>
> ■ 3. ppp接続の確認
>
> ppp接続が正常にできている場合は、以下の様になります。
>
> ============================================================
> [root@armadillo440-0 (ttymxc1) ~]# ifconfig ppp0
> ppp0 Link encap:Point-Point Protocol
> inet addr:133.236.235.52 P-t-P:10.64.64.64 Mask:255.255.255.255
> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
> RX packets:7 errors:0 dropped:0 overruns:0 frame:0
> TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:3
> RX bytes:118 (118.0 B) TX bytes:142 (142.0 B)
>
> [root@armadillo440-0 (ttymxc1) ~]# ping 8.8.8.8
> PING 8.8.8.8 (8.8.8.8): 56 data bytes
> 64 bytes from 8.8.8.8: icmp_seq=0 ttl=53 time=58.1 ms
> 64 bytes from 8.8.8.8: icmp_seq=1 ttl=53 time=41.0 ms
> 64 bytes from 8.8.8.8: icmp_seq=2 ttl=53 time=38.4 ms
> 64 bytes from 8.8.8.8: icmp_seq=3 ttl=53 time=40.0 ms
>
> --- 8.8.8.8 ping statistics ---
> 4 packets transmitted, 4 packets received, 0% packet loss
> round-trip min/avg/max = 38.4/44.3/58.1 ms
> [root@armadillo440-0 (ttymxc1) ~]# ping www.google.co.jp
> PING www.google.co.jp (173.194.126.151): 56 data bytes
> 64 bytes from 173.194.126.151: icmp_seq=0 ttl=55 time=49.2 ms
> 64 bytes from 173.194.126.151: icmp_seq=1 ttl=55 time=39.4 ms
> 64 bytes from 173.194.126.151: icmp_seq=2 ttl=55 time=38.5 ms
> 64 bytes from 173.194.126.151: icmp_seq=3 ttl=55 time=41.0 ms
>
> --- www.google.co.jp ping statistics ---
> 4 packets transmitted, 4 packets received, 0% packet loss
> round-trip min/avg/max = 38.5/42.0/49.2 ms
> [root@armadillo440-0 (ttymxc1) ~]#
> ============================================================
>

aida

2016年8月10日 15時30分

お世話になっております。
さっそくのご返答、ありがとうございます!

modeswitchに関してはインストールしたのちに、下記コマンドにより切り替えは成功しております。

 usb_modeswitch -v "0x1c9e" -p "0x9bfe" -S 

しかし、その後に接続されたmodemにアクセスがうまくいかないという状況です。

さらに情報等お持ちでしたら、ぜひ教えていただければと思います。

> 溝渕です。
>
> 解決にならないかもしれませんが、参考になれば…。
>
> FS020Uは、メーカーホームページを見ると、ゼロインストールに対応している
> ようです。そのため、単にUSBホストポートに接続しただけだと、3Gモジュー
> ルではなくストレージとして見えていると思います。
>
> ゼロインストールに対応しているデバイスをLinuxで動作させるには、
> usb_modeswitchなどによって動作モードを変更する必要があります。ただ、探
> してみましたが、FS020Uの設定を見つけることができませんでした。
>
> または、USBデバイスが設定保存要の不揮発性メモリ領域を持っている場合は、
> Window等に接続して設定した内容を保持できる場合があります。この場合、以
> 降接続すると3Gモジュールとして認識されますが、FS020Uが対応しているかど
> うかは不明です。
>
> 以上、ご参考になれば。
>