====== 疑似モデム機能の利用 ====== いままでモデム + 電話回線や PHS で PPP 接続を行っていた機器の構成の **モデム + 電話回線** の部分を MA-S1xx/MA-E3xx((v5.0.0β4で対応)) で置き換えることができます。 {{:mas1xx_ope:modem_emulation_ppp:マイグレーション_3.png?1024|マイグレーション}} \\ ===== 設定 ===== ==== 本装置側 ==== MA-S1xx/MA-E3xx 側の設定は下記 WebUI の画面で行います。 {{:mas1xx_ope:modem_emulation_ppp:modem_emu_00.png|WebUI 設定画面}} ※ 本装置側の PPP I/F は **"ppp100"** になります。インターネットなどに抜ける際は、適切なルーティング設定が必要です。 \\ ==== 接続機器側 ==== 本装置とは、RS-232C **インターリンクケーブル**((RTS-CTS, DTR-DSR がクロス接続されているもの))([[https://www.sanwa.co.jp/product/syohin.asp?code=KRS-L09-2K|例 サンワサプライ RS-232Cケーブル(インタリンク・クロス・2m)]]) で接続します。\\ Linux で PPP 接続をする場合は、下記のような設定になります。 === /etc/ppp/peers/ppp0 === unit 0 hide-password noauth connect "/usr/sbin/chat -v -f /etc/chatscripts/ppp0" debug modem lock /dev/ttyUSB0 115200 noipdefault defaultroute replacedefaultroute maxfail 40 remotename ppp0 ipparam ppp0 nopersist usepeerdns \\ === /etc/chatscripts/ppp0 === TIMEOUT 10 '' ATZ OK ATE0 ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED ABORT ERROR TIMEOUT 30 OK ATDT5555 CONNECT \d\c ※ ATDT5555 の電話番号指定は、WebUI の 『着信 電話番号』で設定した番号にします。 \\ ==== 実行例 ==== PPP 接続を実行した場合のログの例です。 Aug 17 11:38:03 lg-gram pppd[4125]: pppd 2.4.7 started by root, uid 0 Aug 17 11:38:04 lg-gram chat[4127]: timeout set to 10 seconds Aug 17 11:38:04 lg-gram chat[4127]: send (ATZ^M) Aug 17 11:38:04 lg-gram chat[4127]: expect (OK) Aug 17 11:38:04 lg-gram chat[4127]: ATZ^M^M Aug 17 11:38:04 lg-gram chat[4127]: OK Aug 17 11:38:04 lg-gram chat[4127]: -- got it Aug 17 11:38:04 lg-gram chat[4127]: send (ATE0^M) Aug 17 11:38:04 lg-gram chat[4127]: abort on (BUSY) Aug 17 11:38:04 lg-gram chat[4127]: abort on (NO CARRIER) Aug 17 11:38:04 lg-gram chat[4127]: abort on (VOICE) Aug 17 11:38:04 lg-gram chat[4127]: abort on (NO DIALTONE) Aug 17 11:38:04 lg-gram chat[4127]: abort on (NO DIAL TONE) Aug 17 11:38:04 lg-gram chat[4127]: abort on (NO ANSWER) Aug 17 11:38:04 lg-gram chat[4127]: abort on (DELAYED) Aug 17 11:38:04 lg-gram chat[4127]: abort on (ERROR) Aug 17 11:38:04 lg-gram chat[4127]: timeout set to 30 seconds Aug 17 11:38:04 lg-gram chat[4127]: expect (OK) Aug 17 11:38:04 lg-gram chat[4127]: ^M Aug 17 11:38:04 lg-gram chat[4127]: ATE0^M^M Aug 17 11:38:04 lg-gram chat[4127]: OK Aug 17 11:38:04 lg-gram chat[4127]: -- got it Aug 17 11:38:04 lg-gram chat[4127]: send (ATDT5555^M) Aug 17 11:38:04 lg-gram chat[4127]: expect (CONNECT) Aug 17 11:38:04 lg-gram chat[4127]: ^M Aug 17 11:38:04 lg-gram chat[4127]: ^M Aug 17 11:38:04 lg-gram chat[4127]: CONNECT Aug 17 11:38:04 lg-gram chat[4127]: -- got it Aug 17 11:38:04 lg-gram chat[4127]: send (\d) Aug 17 11:38:05 lg-gram pppd[4125]: Script /usr/sbin/chat -v -f /etc/chatscripts/ppp0 finished (pid 4126), status = 0x0 Aug 17 11:38:05 lg-gram pppd[4125]: Serial connection established. Aug 17 11:38:05 lg-gram pppd[4125]: using channel 3 Aug 17 11:38:05 lg-gram pppd[4125]: Using interface ppp0 Aug 17 11:38:05 lg-gram pppd[4125]: Connect: ppp0 <--> /dev/ttyUSB0 Aug 17 11:38:05 lg-gram NetworkManager[952]: [1629167885.7692] manager: (ppp0): new Ppp device (/org/freedesktop/NetworkManager/Devices/6) Aug 17 11:38:05 lg-gram systemd-udevd[4128]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable. Aug 17 11:38:06 lg-gram pppd[4125]: sent [LCP ConfReq id=0x1 ] Aug 17 11:38:07 lg-gram pppd[4125]: rcvd [LCP ConfReq id=0x1 ] Aug 17 11:38:07 lg-gram pppd[4125]: sent [LCP ConfAck id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: sent [LCP ConfReq id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: rcvd [LCP ConfAck id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: sent [LCP EchoReq id=0x0 magic=0xb452adfb] Aug 17 11:38:09 lg-gram pppd[4125]: sent [CCP ConfReq id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: sent [IPCP ConfReq id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: rcvd [LCP EchoReq id=0x0 magic=0xade986dc] Aug 17 11:38:09 lg-gram pppd[4125]: sent [LCP EchoRep id=0x0 magic=0xb452adfb] Aug 17 11:38:09 lg-gram pppd[4125]: rcvd [CCP ConfReq id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: sent [CCP ConfAck id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: rcvd [IPCP ConfReq id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: sent [IPCP ConfAck id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: rcvd [LCP EchoRep id=0x0 magic=0xade986dc] Aug 17 11:38:09 lg-gram pppd[4125]: rcvd [CCP ConfAck id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: Deflate (15) compression enabled Aug 17 11:38:09 lg-gram pppd[4125]: rcvd [IPCP ConfNak id=0x1 ] Aug 17 11:38:09 lg-gram pppd[4125]: sent [IPCP ConfReq id=0x2 ] Aug 17 11:38:09 lg-gram pppd[4125]: rcvd [IPCP ConfAck id=0x2 ] Aug 17 11:38:09 lg-gram pppd[4125]: replacing old default route to wlp1s0 [172.16.1.66] Aug 17 11:38:09 lg-gram pppd[4125]: local IP address 192.168.1.254 <-------------------- 割り当てられた IP アドレス Aug 17 11:38:09 lg-gram pppd[4125]: remote IP address 192.168.1.1 Aug 17 11:38:09 lg-gram pppd[4125]: primary DNS address 192.168.1.1 <--- DNS server Aug 17 11:38:09 lg-gram pppd[4125]: secondary DNS address 192.168.1.1 Aug 17 11:38:09 lg-gram pppd[4125]: Script /etc/ppp/ip-up started (pid 4135) Aug 17 11:38:09 lg-gram NetworkManager[952]: [1629167889.8956] device (ppp0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external') Aug 17 11:38:09 lg-gram NetworkManager[952]: [1629167889.9021] device (ppp0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'external') Aug 17 11:38:09 lg-gram dnsmasq[1123]: reading /run/dnsmasq/resolv.conf Aug 17 11:38:09 lg-gram dnsmasq[1123]: using nameserver 192.168.1.1#53 Aug 17 11:38:09 lg-gram pppd[4125]: Script /etc/ppp/ip-up finished (pid 4135), status = 0x0 \\ IP アドレスとして 192.168.1.254 が割り当てられ、本装置の IP アドレスが DNS サーバーとして設定されていることが確認できます。