モニタリングでは、Soracom SIM と USB 3G ドングルでインターネットにつなげています。

ダイアルアップに使ってるアプリケーションは、wvdialなのですが、かなり頻繁に接続が切れます。東京では、接続に全く問題がおこりませんので、森の環境要因だと思われます。

かなり突貫で適当につくっているので、切断される要因について、エラーログレベルで、まとめておこうと思います。

下記が先日起こった、グラフデータが送られてこない状態です。

3210985-0081cde414ce5497fd71450a55753b99a137e18b

4:50付近でデータがこなくなっています。

(その後も、グラフのラインが表示されているのは、グラフデータを持っているprometheusが、最後のデータで埋めているためだと思われます。)

どのようなwvdialのログが出たかというと下記です

--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATH
--> Sending: ATQ0
--> Re-Sending: ATH
--> Modem not responding.
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATH
--> Sending: ATQ0
--> Re-Sending: ATH
--> Modem not responding.
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
...
--> Modem not responding.
--> WvDial: Internet dialer version 1.61
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory

Modem not respondingがずっと出続けることで接続されない状態が数時間続いていることがわかりました。
その後、/dev/ttyUSB0のデバイスが失われてしまいました。
ちなみに、よく切断されるパターンは以下です。
PPP daemon が exit code 16 で終了して、/dev/ttyUSB0のデバイスが失われています。

--> Connect time 24504839.6 minutes.
--> pppd: <E0>K<F9>v<E0><EA><E4>[01]<D0><EA><E4>[01]
--> pppd: <E0>K<F9>v<E0><EA><E4>[01]<D0><EA><E4>[01]
--> pppd: <E0>K<F9>v<E0><EA><E4>[01]<D0><EA><E4>[01]
--> Disconnecting at Thu Aug  4 15:00:28 2016
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
--> Auto Reconnect will be attempted in 5 seconds
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Disconnecting at Thu Aug  4 15:00:28 2016
--> WvDial: Internet dialer version 1.61
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory

 

以上のことから、下記の対策を検討する必要がありそうなことがわかりました。

  1. 電波が悪い時に pppdがエラー終了(16)する
  2. Modem応答がなくなり、長い間セッションが切れる

森の現地でしか再現しないので、重要な知見が得られました。これを元にwvdialなどのパラメータをチューニングしていく予定です。

Podcast also available on PocketCasts, SoundCloud, Spotify, Google Podcasts, Apple Podcasts, and RSS.

コメントを残す

The Podcast

Join Naomi Ellis as she dives into the extraordinary lives that shaped history. Her warmth and insight turn complex biographies into relatable stories that inspire and educate.

About the podcast