abem
2018年2月27日 11時22分
阿部と申します。
Armadillo Iot G2の3G接続に関しまして、以下のスレッドを参照させて頂き、アプリケーションで相手サーバーへ疎通確認を
行い、接続できなかった時は"ifdown umts0","ifup umts0"を実行させております。
※3G-recoverは使用しておりません。
https://armadillo.atmark-techno.com/forum/armadillo/1783
使用SIM:IIJMio プリペイドタイプ
何回目で発生するかは数えておりませんが、数日間、ifdown,ifupを繰返していると、
以下のログの様に、IPアドレスが取得出来なくなる事があり、
リブートを実行するか、3Gモジュールのリセットを行わない限り、IPが取得出来ない状態が継続されます。
3Gファームウェアは新ファームウェアに書き換えております。
原因は分かりませんが、複数台で同じような現象(何日か経つと相手サーバーへ接続が行われなくなり、リブートで復帰する)
が発生しておりますので恐らく同じ原因ではないかと考えています。
長時間運用において新3Gファームウェアでもifdown,ifupだけでは不十分でしょうか?
ifup実行
[root@armadillo-iotg (ttymxc1) ~]# ifup umts0 set RAT success set APN success set user/passwd success set DNS success check APN/username/password success 3G connect IPv6: ADDRCONF(NETDEV_UP): umts0: link is not ready udhcpc (v1.20.2) started Sending discover... IPv6: ADDRCONF(NETDEV_CHANGE): umts0: link becomes ready Sending discover... Sending discover... Sending discover... Sending discover... Sending discover... Sending discover... Sending discover... No lease, forking to background
ifconfigで確認するとIPアドレスが取出来ていない
[root@armadillo-iotg (ttymxc1) ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:11:0C:18:1F:AB inet addr:192.168.137.2 Bcast:192.168.137.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 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:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 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:65536 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:568 (568.0 B) TX bytes:568 (568.0 B) umts0 Link encap:Ethernet HWaddr 00:00:11:12:13:14 inet6 addr: fe80::200:11ff:fe12:1314/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:204313 errors:0 dropped:0 overruns:0 frame:0 TX packets:331283 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:14027133 (13.3 MiB) TX bytes:130652482 (124.5 MiB)
ifdownは正常に終了する
[root@armadillo-iotg (ttymxc1) ~]# ifdown umts0 3G disconnect success
3Gモジュールのファームウェアバージョンの確認と電波状況の確認
[root@armadillo-iotg (ttymxc1) ~]# tip -l /dev/ttyATCMD -s 115200 Connected. ATI3 RHL85xx.5.5.22.0.201603171544.x6250_3 OK AT$CSQ $CSQ: 17,99,-6 OK Disconnected.
3GモジュールのH/Wリセットを実行する
[root@armadillo-iotg (ttymxc1) ~]# echo 1 > /sys/class/gpio/RESET_N_3G/value usb 2-1: USB disconnect, device number 4 [root@armadillo-iotg (ttymxc1) ~]# cdc_ether 2-1:1.6 umts0: unregister 'cdc_ether' usb-ci_hdrc.1-1, CDC Ethernet Device cdc_ether 2-1:1.8 umts1: unregister 'cdc_ether' usb-ci_hdrc.1-1, CDC Ethernet Device cdc_ether 2-1:1.10 umts2: unregister 'cdc_ether' usb-ci_hdrc.1-1, CDC Ethernet Device [root@armadillo-iotg (ttymxc1) ~]# echo 0 > /sys/class/gpio/RESET_N_3G/value [root@armadillo-iotg (ttymxc1) ~]# usb 2-1: new full-speed USB device number 5 using ci_hdrc cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem. cdc_acm 2-1:1.0: ttyACM0: USB ACM device usb 2-1: USB disconnect, device number 5 usb 2-1: new full-speed USB device number 6 using ci_hdrc usb 2-1: not running at top speed; connect to a high speed hub usb 2-1: unable to read config index 0 descriptor/all usb 2-1: can't read configurations, error -110 usb 2-1: new full-speed USB device number 7 using ci_hdrc usb 2-1: new full-speed USB device number 8 using ci_hdrc usb 2-1: not running at top speed; connect to a high speed hub cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem. cdc_acm 2-1:1.0: ttyACM0: USB ACM device cdc_acm 2-1:1.2: This device cannot do calls on its own. It is not a modem. cdc_acm 2-1:1.2: ttyACM1: USB ACM device cdc_acm 2-1:1.4: This device cannot do calls on its own. It is not a modem. cdc_acm 2-1:1.4: ttyACM2: USB ACM device cdc_ether 2-1:1.6 eth1: register 'cdc_ether' at usb-ci_hdrc.1-1, CDC Ethernet Device, 00:00:11:12:13:14 cdc_ether 2-1:1.8 eth2: register 'cdc_ether' at usb-ci_hdrc.1-1, CDC Ethernet Device, 00:00:11:12:13:16 cdc_ether 2-1:1.10 eth3: register 'cdc_ether' at usb-ci_hdrc.1-1, CDC Ethernet Device, 00:00:11:12:13:18
再度ifupを実行するとIPアドレスが取得できる
[root@armadillo-iotg (ttymxc1) ~]# ifup umts0 set RAT success set APN success set user/passwd success set DNS success check APN/username/password success 3G connect udhcpc (v1.20.2) started Sending discover... Sending discover... Sending select for 100.85.103.99... Lease of 100.85.103.99 obtained, lease time 172800
umts0のIPアドレスが取得出来ている
[root@armadillo-iotg (ttymxc1) ~]# ifconfig umts0 umts0 Link encap:Ethernet HWaddr 00:00:11:12:13:14 inet addr:100.85.103.99 Bcast:100.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::200:11ff:fe12:1314/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3 errors:0 dropped:0 overruns:0 frame:0 TX packets:30 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1216 (1.1 KiB) TX bytes:9153 (8.9 KiB)
システム名
[root@armadillo-iotg (ttymxc1) ~]# uname -a Linux armadillo-iotg 3.14.36-at9 #4 PREEMPT Tue Aug 1 16:29:02 JST 2017 armv5tejl GNU/Linux
/etc/config/interfaceの内容
[root@armadillo-iotg (ttymxc1) ~]# cat /etc/config/interfaces # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) auto lo eth0 umts0 iface lo inet loopback iface eth0 inet static address 192.168.137.2 netmask 255.255.255.0 network 192.168.137.0 broadcast 192.168.137.255 iface umts0 inet dhcp pre-up 3g-set-ap iijmio.jp mio@iij iij CHAP IP pre-up 3g-connect post-down 3g-disconnect [root@armadillo-iotg (ttymxc1) ~]#