Translate

Posts mit dem Label phone werden angezeigt. Alle Posts anzeigen
Posts mit dem Label phone werden angezeigt. Alle Posts anzeigen

Samstag, 11. Januar 2014

Der User "smsd" muss für /var/www/...... Zugriff beechtigt werden

und das geht so:

Rechte für smsd für das www Vereichnis erteilen

sudo adduser smsd www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www
Es ist natuerlich sicherer, wenn die php scripte NICHT im www liegen!


Getting ALL! SMS parameters from smstools - by eventhandler activated script

#!/usr/bin/php
<?php

error_reporting(E_ALL);
ini_set("display_errors", 1);

//übergabeparameter aus smstools3

$sms_type = $argv[1];
$sms_file   = $argv[2];



$sms_file_content = file_get_contents($sms_file);
$i = strpos($sms_file_content, "\n\n");
$sms_headers_part = substr($sms_file_content, 0, $i);
$sms_message_body = substr($sms_file_content, $i + 2);
$sms_header_lines = split("\n", $sms_headers_part);
$sms_headers = array();

foreach ($sms_header_lines as $header)
{
  $i = strpos($header, ":");
  if ($i !== false)
    $sms_headers[substr($header, 0, $i)] = substr($header, $i + 2);
}

// select and get all header informations
$h_vonhandy    = $sms_headers["From"];
$h_toa              = $sms_headers["From_TOA"];
$h_smsc           = $sms_headers["From_SMSC"];
$h_sent             = $sms_headers["Sent"];
$h_received      = $sms_headers["Received"];
$h_subject        = $sms_headers["Subject"];
$h_modem       = $sms_headers["Modem"];
$h_imsi            = $sms_headers["IMSI"];
$h_report         = $sms_headers["Report"];
$h_alfabet         = $sms_headers["Alphabet"];
$h_length          = $sms_headers["Length"];


// your code 2 follow


?>

Sonntag, 5. Januar 2014

original /etc/smsd.conf

nano /etc/smsd.conf

change

devices = GSM1

to
devices = E169

delete 2nd incoming, its redundant

delete              [GSM1] and [GSM2] definitions



change last lines

[E169]
#init =
device = /dev/ttyUSB0
incoming = yes
#pin =
baudrate = 19200


then

/etc/init.d/smstools restart


logfile 4 debugging:

nano /var/log/smstools/smsd.log
 

loading

apt-get update
apt-get upgrade
aptitude install smstools
nano /etc/smsd.conf

Complete SMSinbound system based on whezzy in a 35€ Raspyberry Pi

.....affordable, cheap, community, inbound, inboundsms, international, mobile, mobilephone, phone, pi, private, raspberry, raspberry pi, server, service, sms, web, www, inbound, inbound system, afric, ameri, europe, Kenya, Tanzania, Tansania, Estern Africa, Eastern Arika, Uganda, Ruanda, stand alone, infration, infmr, information, board, infoss, infosys, infoboard, sms2web, sms2email, sms gateway, gate, gateway

some links about SMS inbound services

https://www.twilio.com/blog/2012/04/get-started-with-twilio-sms-receiving-incoming-sms-quickstart.html

http://blog.hubspot.com/blog/tabid/6307/bid/32433/When-SMS-Text-Messaging-Actually-Makes-Sense-for-Marketers.aspx

http://www.clxnetworks.com/mobile-enterprise-messaging/inbound-sms-messaging/

 http://www.any-sms.info/inbound.html?gclid=CMXOjvTo57sCFQhZ3god8wUAng





blog now available in 57 languages

this blog is availble in 57 languages now! Select yours above!
----

affordable, cheap, community, inbound, inboundsms, international, mobile, obilephone, phone, pi, private, raspberry, raspberry pi, server, service, sms, web, www

benötigte Teile: für den Bau eines SMS inbound servers

1 x Raspberry Pi
1 x Gehäuse
1 x Handyladegerät
1 x schnelle SDHC Card, 32 GB preferred
1 x CAT 5 Netzkabel
1 x HDMI Anschlusskabel für ext. Monitor zur Kontrolle
1 x taugliches GSM Modem (hier: Huawei E169... sehr gut!)
--------------------------------------------------------------------------
+  viel Geduld und Verstand

in strong cooperation with a raspberry pi board


affordable, cheap, community, inbound, inboundsms, international, mobile, obilephone, phone, pi, private, raspberry, raspberry pi, server, service, sms, web, www

using an (old fashioned) HUAWEI USB STICK E169


Extrem kostengünstiger SMS inbound server mit dem Raspberry PI selbst bauen