{"id":228,"date":"2011-12-13T12:38:28","date_gmt":"2011-12-13T10:38:28","guid":{"rendered":"http:\/\/rexxer.kharkov.ru\/?p=228"},"modified":"2011-12-13T12:38:28","modified_gmt":"2011-12-13T10:38:28","slug":"sms-gate-svoimi-rukami","status":"publish","type":"post","link":"https:\/\/dety.net.ua\/?p=228","title":{"rendered":"SMS-gate \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0443\u043a\u0430\u043c\u0438"},"content":{"rendered":"<p>\u041f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d.<\/p>\n<p>\u0420\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u0441\u043c\u0441 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0447\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0437\u0430\u043a\u0440\u044b\u043b\u0438.<\/p>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0441\u043c\u0441-\u0448\u043b\u044e\u0437 \u0441 \u043a\u043e\u043c-\u043f\u043e\u0440\u0442\u043e\u043c &#8211; \u043e\u043a\u043e\u043b\u043e 500\u0433\u0440\u043d, \u043b\u0438\u0431\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0441 \u043a\u0430\u0431\u0435\u043b\u0435\u043c \u0438 \u0442.\u043f.<\/p>\n<p>\u041d\u0430\u0448\u0435\u043b \u0432 \u0445\u043e\u0437\u044f\u0439\u0441\u0442\u0432\u0435 PCMCIA GSM-modem Sony Ericsson GC89 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043d\u0438\u043a PCMCIA-PCI (100 + 70\u0433\u0440\u043d).<\/p>\n<p>\u0412\u0441\u0442\u0430\u0432\u0438\u043b \u0432 \u0438\u043c\u0435\u044e\u0449\u0443\u044e\u0441\u044f \u043c\u0430\u0448\u0438\u043d\u043a\u0443 \u0441 FreeBSD 8.0, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u043e\u0441\u044c \u043a\u0430\u043a:<\/p>\n<blockquote>\n<pre><a href=\"http:\/\/lists.freebsd.org\/mailman\/listinfo\/freebsd-bugs\">none1 at pci0<\/a>:3:0:1:       class=0x070002 card=0x000318de chip=0x434414e4 rev=0x03 hdr=0x00\n    vendor     = 'Broadcom Corporation'\n    device     = 'EDGE\/GPRS data and 802.11b\/g combo cardbus [GC89]'\n    class      = simple comms\n    subclass   = UART\n    bar   [10] = type I\/O Port, range 32, base 0x1000, size 256, enabled<\/pre>\n<p>kernel: cardbus0: &lt;simple comms, UART&gt; at device 0.0 (no driver attached)<\/p><\/blockquote>\n<p>\u041f\u043e\u0440\u044b\u043b\u0441\u044f \u0432 \u0438\u043d\u0435\u0442\u0435 &#8211; \u043f\u0430\u0442\u0447\u0438\u043c:<\/p>\n<blockquote>\n<pre>add it string:\n{ 0x14e4, 0x4344, 0xffff, 0, \"Sony Ericsson GC89 PC Card\", 0x10},\nto file\nsys\/dev\/uart\/uart_bus_pci.c<\/pre>\n<\/blockquote>\n<p>\u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u044f\u0434\u0440\u043e: make buildkernel &amp;&amp; make installkernel<\/p>\n<p>\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<blockquote><p>uart2: &lt;16550 or compatible&gt; port 0x1000-0x10ff irq 11 at device 0.0 on cardbus0<\/p>\n<p>\u0432 \u0434\u0435\u0432\u0430\u0439\u0441\u0430\u0445 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f cuau2<\/p><\/blockquote>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0441\u043c\u0441 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e (\u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u043c-\u043a\u0430\u0440\u0442\u0443 :)):<\/p>\n<p>\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u043c\u0441\u044f <strong>cu -l \/dev\/cuau2 -s 57600<\/strong> (\u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 115200 \u0441\u044b\u043f\u0430\u043b\u0441\u044f \u043c\u0443\u0441\u043e\u0440 &#8211; \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0435 \u0432\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c) b \u0432\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<blockquote><p>AT+CFUN=1<br \/>\nAT<br \/>\nAT+CGREG=1<br \/>\nAT+CMGF=1<br \/>\nAT+CMGS=&#8221;+380501430001&#8243;<br \/>\n&gt;test,CTRL+Z<\/p><\/blockquote>\n<p>\u0441\u043c\u0441 \u043f\u0440\u043e\u0448\u043b\u0430.<\/p>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043c\u0441 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \/usr\/ports\/comms\/smstools3.<\/p>\n<p>smsd.conf \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0442\u0430\u043a\u043e\u0439:<\/p>\n<blockquote><p>devices = GSM1<br \/>\nlogfile = \/var\/log\/smsd.log<br \/>\nloglevel = 5<\/p>\n<p>[GSM1]<br \/>\ndevice = \/dev\/cuau2<br \/>\nbaudrate = 57600<br \/>\n#incoming = yes<br \/>\npin = ignore<\/p><\/blockquote>\n<p>\u0414\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u043b\u0435\u0432\u0435\u043b \u0432 7, \u0434\u043b\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0441\u043c\u0441 &#8211; incoming=yes, \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043c &#8211; \u0431\u044b\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 &#8211; \u043f\u043e\u044d\u0442\u043e\u043c\u0443 init \u0443\u0431\u0440\u0430\u043b \u0441\u043e\u0432\u0441\u0435\u043c.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0441\u043c\u0441 \u0441\u044b\u043f\u0430\u043b\u043e \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0442\u0438\u043f\u0430:<\/p>\n<blockquote><p>Cannot handle \/var\/spool\/sms\/outgoing\/send_WJReV3: Access denied. Check the file and directory permissions.<\/p><\/blockquote>\n<p>\u0414\u043b\u044f \u0444\u0438\u043a\u0441\u0430 \u043f\u0440\u0430\u0432\u0438\u043c \/usr\/local\/bin\/sendsms, \u0442\u0430\u043c \u0431\u044b\u043b\u043e smsd_user=&#8221;smsd&#8221;. \u041c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 <strong>smsd_user=&#8221;uucp&#8221;<\/strong><\/p>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043c\u0441:<\/p>\n<blockquote><p>sendsms 380501430001 &#8216;Test&#8217;<\/p><\/blockquote>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442!<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 Freebsd \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e ssh, \u0438 \u0442\u0443\u0442 \u043c\u0435\u043d\u044f \u0436\u0434\u0430\u043b \u043e\u0431\u043b\u043e\u043c &#8211; \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0435\u0433\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u044e\u0437\u0435\u0440\u0430 \u0438 \u0441\u043d\u043e\u0432\u0430 \u0441\u044b\u043f\u0430\u043b\u0438\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043f\u0435\u0440\u043c\u0438\u0448\u0448\u0435\u043d\u0430\u043c\u0438. \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u043b\u0433\u0438\u0445 \u043c\u0443\u0447\u0435\u043d\u0438\u0439, \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u0441\u043a\u0440\u0438\u043f\u0442 sendsms &#8211; \u0434\u043e\u0431\u0430\u0432\u0438\u043b chmod 666 $TMPFILE:<\/p>\n<blockquote><p>chmod 666 $TMPFILE<\/p>\n<p>chown $owner $TMPFILE<\/p><\/blockquote>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043c\u0441 \u0441\u0442\u0430\u0441\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/p>\n<p><a href=\"http:\/\/www.lissyara.su\/articles\/freebsd\/programms\/smstools_3\/\" target=\"_blank\">http:\/\/www.lissyara.su\/articles\/freebsd\/programms\/smstools_3\/<\/a><\/p>\n<p><a href=\"http:\/\/smstools3.kekekasvi.com\/\" target=\"_blank\">http:\/\/smstools3.kekekasvi.com\/<\/a><\/p>\n<p>P.S.: \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u043e\u0434\u0435\u043c \u043d\u0435 \u0432\u0442\u044b\u043a\u0430\u043b &#8211; \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u0438\u043d\u0438\u0442:<\/p>\n<blockquote><p>devices = GSM1<br \/>\nlogfile = \/var\/log\/smsd.log<br \/>\nloglevel = 5<\/p>\n<p>[GSM1]<br \/>\ndevice = \/dev\/cuau2<br \/>\nbaudrate = 57600<br \/>\n#rtscts = no<br \/>\ninit = AT+CFUN=1<br \/>\ninit2 = AT+CREG=1<br \/>\nincoming = yes<br \/>\npin = ignore<\/p><\/blockquote>\n<p>\u0415\u0449\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0441\u043c\u0441 &#8211; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433:<\/p>\n<blockquote><p>devices = GSM1<br \/>\nlogfile = \/var\/log\/smsd.log<br \/>\nloglevel = 5<br \/>\neventhandler = \/usr\/local\/share\/smstools\/fwd2mail<\/p>\n<p>[GSM1]<br \/>\ndevice = \/dev\/cuau2<br \/>\nbaudrate = 57600<br \/>\n#rtscts = no<br \/>\ninit = AT+CFUN=1<br \/>\ninit2 = AT+CREG=1<br \/>\nincoming = yes<br \/>\npin = ignore<\/p><\/blockquote>\n<p>\u0421\u0430\u043c \u0441\u043a\u0440\u0438\u043f\u0442 fwd2mail:<\/p>\n<blockquote><p>#!\/bin\/sh<\/p>\n<p>if [ &#8220;$1&#8221; = &#8220;RECEIVED&#8221; ]; then<br \/>\nmail -s &#8220;SMS&#8221; youremail@domain.com &lt; $2<br \/>\nfi<\/p><\/blockquote>\n<p>Smsd gives two or three arguments to the eventhandler. The first one is SENT, RECEIVED, FAILED, REPORT or CALL.<\/p>\n<p>The second one is the SMS file filename.  The third argument is the message id of the SENT message, it is only used if you sent a message successfully with status report enabled.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u043c-\u043b\u0438\u0431\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0441\u043c\u0441.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d. \u0420\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u0441\u043c\u0441 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0447\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0437\u0430\u043a\u0440\u044b\u043b\u0438. \u0421\u0430\u043c\u044b\u0439 \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0441\u043c\u0441-\u0448\u043b\u044e\u0437 \u0441 \u043a\u043e\u043c-\u043f\u043e\u0440\u0442\u043e\u043c &#8211; \u043e\u043a\u043e\u043b\u043e 500\u0433\u0440\u043d, \u043b\u0438\u0431\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0441 \u043a\u0430\u0431\u0435\u043b\u0435\u043c \u0438 \u0442.\u043f. \u041d\u0430\u0448\u0435\u043b \u0432 \u0445\u043e\u0437\u044f\u0439\u0441\u0442\u0432\u0435 PCMCIA GSM-modem Sony Ericsson GC89 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043d\u0438\u043a PCMCIA-PCI (100 + 70\u0433\u0440\u043d). \u0412\u0441\u0442\u0430\u0432\u0438\u043b \u0432 \u0438\u043c\u0435\u044e\u0449\u0443\u044e\u0441\u044f \u043c\u0430\u0448\u0438\u043d\u043a\u0443 \u0441 FreeBSD 8.0, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u043e\u0441\u044c \u043a\u0430\u043a: none1 at pci0:3:0:1: class=0x070002 card=0x000318de chip=0x434414e4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,5],"tags":[],"class_list":["post-228","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-gadgets","category-hardware"],"_links":{"self":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=228"}],"version-history":[{"count":0,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/228\/revisions"}],"wp:attachment":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}