{"id":1076,"date":"2013-03-13T17:40:45","date_gmt":"2013-03-13T09:40:45","guid":{"rendered":"http:\/\/kaoru.tech\/?p=1076"},"modified":"2013-04-26T08:55:50","modified_gmt":"2013-04-26T00:55:50","slug":"pppd%e6%8b%a8%e5%8f%b7%e5%87%ba%e9%94%99","status":"publish","type":"post","link":"http:\/\/kaoru.tech:7000\/wordpress\/?p=1076","title":{"rendered":"pppd\u62e8\u53f7\u51fa\u9519"},"content":{"rendered":"<p>\u4fee\u6539<strong>dialer<\/strong>\u6587\u4ef6\uff0c\u901a\u5e38\u4f4d\u4e8e<strong>\/etc\/dialer<\/strong>\u3002\u5728char\u4e00\u884c\u4e2d\u589e\u52a0-s\u53c2\u6570\uff0c\u5982\u4e0b\uff1a<\/p>\n<pre lang=\"bash\">#!\/bin\/sh\r\n#\r\n# This is part 2 of the on-line script. It will perform the connection\r\n# protocol for the desired connection.\r\n#\r\nexec chat -s -v                                         \\\r\n        TIMEOUT         3                               \\\r\n        ABORT           '\\nBUSY\\r'                      \\\r\n        ABORT           '\\nNO ANSWER\\r'                 \\\r\n        ABORT           '\\nRINGING\\r\\n\\r\\nRINGING\\r'    \\\r\n        ''              \\rAT                            \\\r\n        ''              \\rAT+CGDCONT=1,\"IP\",\"CMNET\"     \\\r\n        'OK-+++\\c-OK'   ATH0                            \\\r\n        TIMEOUT         30                              \\\r\n        OK              ATDT$TELEPHONE                  \\\r\n        CONNECT         ''<\/pre>\n<p>\u5176\u4e2d\uff0c-s\u4e3a\u4f7f\u7528\u6807\u51c6\u9519\u8bef\u3002\u6240\u6709\u7531\u201c-v\u201d\u4ea7\u751f\u7684\u65e5\u5fd7\u4fe1\u606f\u548c\u6240\u6709\u7684\u9519\u8bef\u4fe1\u606f\u5c06\u53d1\u9001\u5230\u6807\u51c6\u9519\u8bef\u3002\u5982\u679cpppd\u5728\u524d\u53f0\u8fd0\u884c\u5219\u4fe1\u606f\u8f93\u51fa\u5230stdout\u548cstderr\uff0c\u5426\u5219\u8f93\u51fa\u5230<strong>\/etc\/ppp\/connect-errors<\/strong>\u3002<\/p>\n<p>\u7136\u540e\u67e5\u770b\/etc\u76ee\u5f55\u4e0b\u662f\u5426\u6709ppp\u76ee\u5f55\u3002<\/p>\n<p>\u8c03\u7528\u62e8\u53f7\u811a\u672c<\/p>\n<p>\u67e5\u770b\/etc\/ppp\/connect-errors\u6587\u4ef6\uff0c\u6b64\u6587\u4ef6\u5305\u542b\u7684\u62e8\u53f7\u7684\u8be6\u7ec6\u8fc7\u7a0b\u3002\u4e0b\u9762\u4e3a\u6210\u529f\u62e8\u53f7\u7684\u4fe1\u606f<\/p>\n<blockquote><p># cat \/etc\/ppp\/connect-errors timeout set to 3 seconds<br \/>\nabort on (\\nBUSY\\r)<br \/>\nabort on (\\nNO ANSWER\\r)<br \/>\nabort on (\\nRINGING\\r\\n\\r\\nRINGING\\r)<br \/>\nsend (rAT^M)<br \/>\nsend (rAT+CGDCONT=1,IP,CMNET^M)<br \/>\nexpect (OK)<br \/>\nAT^M^M<br \/>\nOK<br \/>\n&#8212; got it<\/p>\n<p>send (ATH0^M)<br \/>\ntimeout set to 30 seconds<br \/>\nexpect (OK)<br \/>\n^M<br \/>\nAT+CGDCONT=1,IP,CMNET^MAT^M<br \/>\nOK<br \/>\n&#8212; got it<\/p>\n<p>send (ATDT*99***1#^M)<br \/>\nexpect (CONNECT)<br \/>\n^M<br \/>\nATDT*99***1#^M^M<br \/>\nCONNECT<br \/>\n&#8212; got it<\/p>\n<p>send (^M)<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u4fee\u6539dialer\u6587\u4ef6\uff0c\u901a\u5e38\u4f4d\u4e8e\/etc\/dialer\u3002\u5728char\u4e00\u884c\u4e2d\u589e\u52a0-s\u53c2\u6570\uff0c\u5982\u4e0b\uff1a #!\/bin\/sh # # This is part 2 of the on-line script. It will perform the connection # protocol for the desired connection. # exec chat -s -v \\ TIMEOUT&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[7],"tags":[153,152],"class_list":["post-1076","post","type-post","status-publish","format-standard","hentry","category-debug","tag-dailer","tag-pppd"],"_links":{"self":[{"href":"http:\/\/kaoru.tech:7000\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/kaoru.tech:7000\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/kaoru.tech:7000\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/kaoru.tech:7000\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/kaoru.tech:7000\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1076"}],"version-history":[{"count":8,"href":"http:\/\/kaoru.tech:7000\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1076\/revisions"}],"predecessor-version":[{"id":1092,"href":"http:\/\/kaoru.tech:7000\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1076\/revisions\/1092"}],"wp:attachment":[{"href":"http:\/\/kaoru.tech:7000\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/kaoru.tech:7000\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1076"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/kaoru.tech:7000\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}