{"id":202012,"date":"2013-11-13T18:37:03","date_gmt":"2013-11-13T14:37:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=202012"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=202012","title":{"rendered":"<span class=\"post_title\">\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0432 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435 \u0437\u0430 \u043d\u0438\u043c \u0436\u0435 \u043d\u0430 Raspberry Pi. \u0427\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c.<br \/>  \u041e\u0434\u043d\u0430\u0436\u0434\u044b \u044f \u043f\u0440\u0438\u043e\u0431\u0440\u0451\u043b Raspberry Pi \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043d\u0430 \u0442\u043e \u0446\u0435\u043b\u0435\u0439 \u2014 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u0438\u0441\u044c \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043e \u043d\u0451\u043c \u043d\u0430 \u0445\u0430\u0431\u0440\u0435. \u041d\u0430\u0447\u0430\u043b\u0430 \u0431\u0435\u0441\u0446\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0444\u0442\u043f-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u0440\u043e\u0431\u044b\u0432\u0430\u0442\u044c Node.js \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0435\u043b\u0430, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u0440\u0438\u043e\u0431\u0440\u0451\u043b \u043d\u043e\u0432\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432\u0440\u043e\u0434\u0435 \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0433\u0430\u0440\u0430\u0436\u0430 \u044f \u043d\u0435 \u0441\u0442\u0430\u043b \u2014 \u0432 \u0441\u0438\u043b\u0443 \u043d\u0435 \u0437\u043d\u0430\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b Linux \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0410\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c \u0441\u0442\u0430\u043b \u043c\u043d\u0435 \u0434\u043e\u0440\u043e\u0433 \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u2014 <b>\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0430\u043b\u0438\u043d\u043a\u0443 \u0432 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c \u0441 \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u043a \u043d\u0435\u0439 USB \u0434\u0435\u0432\u0430\u0439\u0441\u0430\u043c\u0438: GPS, Web-\u043a\u0430\u043c\u0435\u0440\u0430, 3G-\u043c\u043e\u0434\u0435\u043c<\/b> \u2014 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0438 \u0431\u044b\u043b \u043a\u0443\u043f\u043b\u0435\u043d 2-\u043e\u0439 Raspberry.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0448\u0443 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Node.JS, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 OpenVPN \u0438 3G.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u041f\u043b\u0430\u043d\u044b<\/h5>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0447\u0442\u043e\u0431\u044b \u0432 \u043c\u0430\u0448\u0438\u043d\u0435 \u0431\u044b\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u041c\u0430\u043b\u0438\u043d\u0430 \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c\u0438 \u043a \u043d\u0435\u0439 GPS \u0438 \u0432\u0435\u0431-\u043a\u0430\u043c\u0435\u0440\u043e\u0439 \u0438 \u0447\u0442\u043e\u0431\u044b \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u043c\u043e\u0433 \u0434\u0430\u0436\u0435 \u0441 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0447\u0442\u043e \u0442\u0432\u043e\u0440\u0438\u0442\u0441\u044f \u0441 \u043c\u043e\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439.<br \/>  <habracut\/>  <\/p>\n<h4>\u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c<\/h4>\n<p>  <\/p>\n<h5>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Node.JS<\/h5>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Node.JS \u0441 \u0441\u0430\u0439\u0442\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043b\u0435\u0436\u0438\u0442 \u0432\u0435\u0440\u0441\u0438\u044f 0.6.18.  <\/p>\n<pre><code class=\"bash\">sudo mkdir \/opt\/node wget nodejs.org\/dist\/latest\/node-v0.10.20-linux-arm-pi.tar.gz tar xvzf node-v0.10.20-linux-arm-pi.tar.gz sudo cp -r node-v0.10.20-linux-arm-pi\/* \/opt\/node <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0443\u0442\u044c \u043a Node.JS \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u043f\u0443\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b:  <\/p>\n<pre><code class=\"bash\">sudo nano\/etc\/profile \u0432\u0441\u0442\u0430\u0432\u0432\u0438\u043b \u0441\u0442\u0440\u043e\u0447\u043a\u0438: NODE_JS_HOME=&quot;\/opt\/node&quot; PATH=&quot;$PATH:$NODE_JS_HOME\/bin&quot; <\/code><\/pre>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 head \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u0434\u044f\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"bash\"># \/etc\/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).  if [ &quot;`id -u`&quot; -eq 0 ]; then   PATH=&quot;\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin&quot; else   PATH=&quot;\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin:\/usr\/local\/games:\/usr\/games&quot; fi NODE_JS_HOME=&quot;\/opt\/node&quot; PATH=&quot;$PATH:$NODE_JS_HOME\/bin&quot; export PATH <\/code><\/pre>\n<p>  \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e (\u043d\u0430\u043f\u0440. npm install -g express), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043d\u043e\u0434\u044b:   <\/p>\n<pre><code class=\"bash\">sudo chown -R pi \/opt\/node <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/449\/066\/68d\/44906668d8b89985bc12a681567a614e.png\"\/><\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443: <br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a26\/6c3\/367\/a266c3367da724cda4c10253e94e09b3.png\"\/><\/p>\n<p>  \u041f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0438\u043c\u043b\u0438\u043d\u043a \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 home \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0443\u0442: <a href=\"http:\/\/nodejs.ru\/doc\/v0.4.x\/modules.html#_u0417_u0430_u0433_u0440_u0443_u0437_u043A_u0430_u0438_u0437_u043F_u0430_u043F_u043E_u043A_node_modules_\">nodejs.ru\/doc\/v0.4.x\/modules.html#_u0417_u0430_u0433_u0440_u0443_u0437_u043A_u0430_u0438_u0437_u043F_u0430_u043F_u043E_u043A_node_modules_<\/a>)  <\/p>\n<pre><code class=\"bash\">ln -s \/opt\/node\/lib\/node_modules ~\/node_modules <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ad5\/213\/e73\/ad5213e73bf5e7ff9aab33e825768288.png\"\/><\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 OpenVPN<\/h5>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043f\u043e SSH \u0438\u043b\u0438 \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u0441 \u041c\u0430\u043b\u0438\u043d\u043a\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 \u041e\u043f\u0421\u043e\u0421\u0430 \u043a\u0440\u043e\u043c\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u0443\u0441\u043b\u0443\u0433\u0438 \u0437\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c OpenVPN.<\/p>\n<h6>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h6>\n<ul>\n<li> \u0435\u0441\u0442\u044c \u0440\u043e\u0443\u0442\u0435\u0440 \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u043c IP-\u0430\u0434\u0440\u0435\u0441\u043e\u043c<\/li>\n<li> \u043e\u0434\u043d\u0430 \u041c\u0430\u043b\u0438\u043d\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 Ethernet<\/li>\n<li> \u0435\u0441\u0442\u044c 2 \u041c\u0430\u043b\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432 \u0434\u0430\u043b\u0435\u043a\u0435 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 3G<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u041c\u0430\u043b\u0438\u043d\u044b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u043e\u0439 \u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e09\/f0f\/f0e\/e09f0ff0e37d93617f7bbd724e375564.png\"\/><\/p>\n<p>  \u041f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0443\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b OpenVPN \u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0443 \u0438\u0437\u0432\u043d\u0435 \u043d\u0430\u0448\u0435\u0439 \u00ab\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439\u00bb \u041c\u0430\u043b\u0438\u043d\u0435, \u0430 \u0437\u0430 \u043e\u0434\u043d\u043e \u0438 SSH \u0438 HTTP:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/170\/9a5\/dd7\/1709a5dd7a0e3ab5edabbe8703f59a48.png\"\/>\u041d\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 Raspberry \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Node.JS \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0440\u0430\u043d\u0435\u0435.<\/p>\n<h6>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h6>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo apt-get install openvpn -y <\/code><\/pre>\n<p>  \u041f\u0440\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u0430\u043a \u043d\u0430 \u0445\u0430\u0431\u0440\u0435, \u0442\u0430\u043a \u0438 \u0432\u043d\u0435. \u042f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u0442\u0430\u0442\u044c\u044f\u043c\u0438: <a href=\"http:\/\/habrahabr.ru\/post\/188474\/\">habrahabr.ru\/post\/188474\/<\/a>, <a href=\"http:\/\/adw0rd.com\/2013\/01\/10\/openvpn\/#.UmTuCBCpFZQ\">adw0rd.com\/2013\/01\/10\/openvpn\/#.UmTuCBCpFZQ<\/a>, <a href=\"http:\/\/www.volmed.org.ru\/wiki\/index.php\/%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0_OpenVPN_%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0\">www.volmed.org.ru\/wiki\/index.php\/%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0_OpenVPN_%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0<\/a>.<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u0430\u0442\u044b \u0441\u0432\u043e\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6cf\/892\/6f3\/6cf8926f36312f9e7a808c497e937fe6.png\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/d40\/316\/b5b\/d40316b5b1c4da70078b4c50638e6ce2.png\"\/><br \/>  \u0414\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u043f\u043e\u043b\u0435 remote \u0443\u043a\u0430\u0437\u0430\u043d \u043c\u043e\u0439 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435.<\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 3G<\/h5>\n<p>  <\/p>\n<h6>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h6>\n<p>  \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a 3G \u044f \u043a\u0443\u043f\u0438\u043b 3G-\u043c\u043e\u0434\u0435\u043c Huawei E1550 \u043e\u0442 \u041c\u0435\u0433\u0430\u0444\u043e\u043d, \u0441 \u0435\u0451 \u0436\u0435 \u0441\u0438\u043c-\u043a\u0430\u0440\u0442\u043e\u0439.<\/p>\n<p>  \u041c\u043e\u0434\u0435\u043c \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0434\u0438\u0441\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0440\u0435\u0436\u0438\u043c \u043c\u043e\u0434\u0435\u043c\u0430.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/b05\/9ec\/ec7\/b059ecec7b054bde8c2d032a976ba6c0.png\"\/><\/p>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u0432 \u0440\u0435\u0436\u0438\u043c \u043c\u043e\u0434\u0435\u043c\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f.  <\/p>\n<pre><code class=\"bash\">sudo apt-get update && sudo apt-get install usb-modeswitch -y sudo reboot <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u0448\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/440\/9c8\/49d\/4409c849d53d61da5dae98ffa883d793.png\"\/><\/p>\n<h6>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h6>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e:  <\/p>\n<pre><code class=\"bash\">$ mkdir ~\/3g && cd ~\/3g <\/code><\/pre>\n<p>  \u0421\u043a\u0430\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 3G \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"bash\">wget http:\/\/sourceforge.net\/projects\/vim-n4n0\/files\/sakis3g.tar.gz\/download tar -xzvf sakis3g.tar.gz <\/code><\/pre>\n<p>  \u0421\u043a\u0430\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 UMTSKeeper (\u044d\u0442\u043e \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043d\u0430\u0434 sakis3g \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043e\u043d\u0430 \u0432\u0440\u043e\u0434\u0435 \u0442\u0435\u043c \u0436\u0435 \u0430\u0432\u0442\u043e\u0440\u043e\u043c=) )<br \/>  <i>\u041b\u0435\u0436\u0430\u0442\u044c UMTSKeeper \u0434\u043e\u043b\u0436\u043d\u0430 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0447\u0442\u043e \u0438 sakis3G<\/i>  <\/p>\n<pre><code class=\"bash\">$ wget http:\/\/zool33.uni-graz.at\/petz\/umtskeeper\/src\/umtskeeper.tar.gz $ tar -xzvf umtskeeper.tar.gz <\/code><\/pre>\n<p>  \u0414\u043e\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 PPP  <\/p>\n<pre><code class=\"bash\">sudo apt-get install ppp -y <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u043b\u0430\u0434\u0438\u0442\u044c 3G \u0441\u0432\u044f\u0437\u044c:  <\/p>\n<pre><code class=\"bash\">sudo \/.sakis3g --interactive <\/code><\/pre>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <\/p>\n<blockquote><p>Connect with 3G<\/p><\/blockquote>\n<p>, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 11-\u044b\u0439 \u043f\u043d\u0443\u043a\u0442 \u2014 <\/p>\n<blockquote><p>Custom APN<\/p><\/blockquote>\n<p>.<br \/>  \u0414\u043b\u044f \u043c\u0435\u0433\u0430\u0444\u043e\u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:  <\/p>\n<ul>\n<li> APN: internet<\/li>\n<li> APN_USER: megafon<\/li>\n<li> APN_PASS: megafon<\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0440\u043d\u043e, \u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u0434\u0430\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u044b\u0432\u0435 \u0441\u0432\u044f\u0437\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u043b\u0435\u0436\u0438\u0442 UMTSKeeper.  <\/p>\n<pre><code class=\"bash\">sudo \/home\/pi\/3g\/umtskeeper --sakisoperators &quot;USBINTERFACE='0' OTHER='USBMODEM' USBMODEM='12d1:1001' APN='CUSTOM_APN' CUSTOM_APN='internet' APN_USER='megafon' APN_PASS='megafon'&quot; --sakisswitches &quot;--sudo --console&quot; --devicename 'Huawei' --log --silent --nat 'no' & <\/code><\/pre>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <u>12d1:1001&#8242;<\/u> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043d\u043e\u043c\u0435\u0440 \u0434\u0435\u0432\u0430\u0439\u0441\u0430 \u0438\u0437 <u>lsusb<\/u>.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0436\u0443\u0440\u043d\u0430\u043b:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/cd2\/0ab\/a33\/cd20aba33edb2d2fe5d8f17fa5a0777d.png\"\/><\/p>\n<p>  \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043e\u0442\u043b\u0438\u0447\u043d\u043e!<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443:  <\/p>\n<pre><code class=\"bash\">crontab -e <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/5c3\/5c6\/d2c\/5c35c6d2c56f3219809cf24d21a328f9.png\"\/><\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f:<br \/>  \u0415\u0441\u0442\u044c \u0440\u043e\u0443\u0442\u0435\u0440 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c IP-\u0430\u0434\u0440\u0435\u0441\u043e\u043c, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d \u00ab\u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439\u00bb Raspberry Pi \u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0439 \u0432 \u0440\u043e\u043b\u0438 OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0438 http \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c) \u0438 \u00ab\u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439\u00bb Raspberry Pi, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 3G \u043c\u043e\u0434\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u00ab\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c\u0443\u00bb OpenVPN.<\/p>\n<h4>P.S.<\/h4>\n<p>  \u042f \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c front-end&#8217;\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0433\u0434\u0435-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0439.<br \/>  \u041f\u0440\u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u0437\u044b\u0432\u0430\u0445 \u2014 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430\u043f\u0438\u0448\u0443 \u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 GPS-\u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a\u0430 \u0438 Web-\u043a\u0430\u043c\u0435\u0440\u044b \u0447\u0435\u0440\u0435\u0437 USB-\u0445\u0430\u0431. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/202012\/\"> http:\/\/habrahabr.ru\/post\/202012\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c.<br \/>  \u041e\u0434\u043d\u0430\u0436\u0434\u044b \u044f \u043f\u0440\u0438\u043e\u0431\u0440\u0451\u043b Raspberry Pi \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043d\u0430 \u0442\u043e \u0446\u0435\u043b\u0435\u0439 \u2014 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u0438\u0441\u044c \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043e \u043d\u0451\u043c \u043d\u0430 \u0445\u0430\u0431\u0440\u0435. \u041d\u0430\u0447\u0430\u043b\u0430 \u0431\u0435\u0441\u0446\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0444\u0442\u043f-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u0440\u043e\u0431\u044b\u0432\u0430\u0442\u044c Node.js \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0435\u043b\u0430, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u0440\u0438\u043e\u0431\u0440\u0451\u043b \u043d\u043e\u0432\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432\u0440\u043e\u0434\u0435 \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0433\u0430\u0440\u0430\u0436\u0430 \u044f \u043d\u0435 \u0441\u0442\u0430\u043b \u2014 \u0432 \u0441\u0438\u043b\u0443 \u043d\u0435 \u0437\u043d\u0430\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b Linux \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0410\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c \u0441\u0442\u0430\u043b \u043c\u043d\u0435 \u0434\u043e\u0440\u043e\u0433 \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u2014 <b>\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0430\u043b\u0438\u043d\u043a\u0443 \u0432 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c \u0441 \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u043a \u043d\u0435\u0439 USB \u0434\u0435\u0432\u0430\u0439\u0441\u0430\u043c\u0438: GPS, Web-\u043a\u0430\u043c\u0435\u0440\u0430, 3G-\u043c\u043e\u0434\u0435\u043c<\/b> \u2014 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0438 \u0431\u044b\u043b \u043a\u0443\u043f\u043b\u0435\u043d 2-\u043e\u0439 Raspberry.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0448\u0443 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Node.JS, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 OpenVPN \u0438 3G.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-202012","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/202012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=202012"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/202012\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=202012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=202012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=202012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}