Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 29th July 2010, 17:04
letsharehowto letsharehowto is offline
Junior Member
 
Join Date: Dec 2009
Location: Sai gon - Viet Nam
Posts: 12
Thanks: 0
Thanked 12 Times in 8 Posts
Default SMS Gateway Ubuntu server 9.10 Playsms Smstools3.

Today I will tell you howto setup box which run SMS Gateway with Ubuntu server 9.10, playsms and smstools3.

My box: Intel P4
My cell phone: picture

Create new box with Ubuntu server 9.10. If you don't know, you can google

Softwares install: only choose SSH

Install finished ->Reboot->Logon then active root account, code:

sudo passwd root

Logout then login with root and we later we do everything with root too.
Upgrade box, code:

apt-get update
apt-get upgrade -y

Install some software, code:

apt-get install -y apache2 mysql-server php5 php5-cli php5-cgi php-pear php-db phpmyadmin make gcc sendmail lynx

When box ask password, I choose 111111 for all
Add playsms user, code:

adduser playsms

Then, code:

mkdir -p /var/www/playsms
mkdir -p /var/spool/playsms
mkdir -p /var/log/playsms
chown -R www-data /var/www/playsms
chown -R www-data /var/spool/playsms
chown -R www-data /var/log/playsms
wget http://sourceforge.net/projects/play...ar.gz/download

Unzip, code:

tar -zxvf playsms-0.9.4.tar.gz -C /usr/local/src
cd /usr/local/src/playsms-0.9.4/web
cp -rR * /var/www/playsms
chown -R www-data /var/www/playsms
mysqladmin -u root -p create playsms

When box ask password, type: 111111
Code:

mysql -u root -p playsms < /usr/local/src/playsms-0.9.4/db/playsms.sql

When box ask password, type: 111111
Code:

cd /var/www/playsms
cp config-dist.php config.php
nano config.php

Please find rootpassword (on line 8) and replace with 111111. Save and exit.
Code:

cd /usr/local/src/playsms-0.9.4/bin
cp playsmsd playsmsd.php playsmsd_start /usr/local/bin/
cp playsms /etc/default/
nano /etc/init.d/rc.local

Add:
/usr/local/bin/playsmsd_start
on the bottom of the file (before exit if theres exit command). This way playsmsd_start will start automatically on boot. Save and exit.

Get static for NIC, code:

nano /etc/network/interfaces

Delete all and replace with:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.66
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Edit /etc/resolv.conf, code:

nano /etc/resolv.conf

Delete all and replace with:

nameserver 192.168.1.1

Reboot, code:

reboot

Login with root, download file, code:

wget http://smstools3.kekekasvi.com/packa...3-3.1.3.tar.gz

Unzip, code:

tar -zxvf smstools3-3.1.3.tar.gz -C /usr/local/src
cd /usr/local/src/smstools3
make

Code:

make install

Code:

cd /usr/local/src/playsms-0.9.4
cp contrib/smstools/smsd.conf /etc/
nano /etc/smsd.conf

Please find ttyUSB0 (on line 27) and replace with ttyACM0. Save and exit.

Code:

mkdir -p /var/spool/sms/checked
mkdir -p /var/spool/sms/failed
mkdir -p /var/spool/sms/incoming
mkdir -p /var/spool/sms/outgoing
mkdir -p /var/spool/sms/sent
mkdir -p /var/log/sms
chown -R www-data /var/spool/sms
update-rc.d sms3 defaults
reboot

Browse http://localhost/playsms/ and login using default administrator user
username: admin
password: admin

click Gateway, click Manage smstools, click (click here to active)

Reboot box, code:

reboot

Enjoy

Thanks:

http://www.howtoforge.com
http://www.ubuntu.com
http://playsms.sourceforge.net
http://smstools3.kekekasvi.com

More picture at: http://picasaweb.google.com/116366725840175897341
Attached Images
     
Reply With Quote
The Following 4 Users Say Thank You to letsharehowto For This Useful Post:
corysquires (29th August 2010), falko (30th July 2010), Onn (5th August 2010), symbioticit (21st October 2010)
Sponsored Links
  #2  
Old 29th August 2010, 19:40
corysquires corysquires is offline
Junior Member
 
Join Date: Aug 2010
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

What model phone are you using? is there a hardware compatibility list somewhere with phones / modems that are compatible... Excellent article!
Reply With Quote
  #3  
Old 30th August 2010, 17:22
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,145
Thanks: 4
Thanked 55 Times in 51 Posts
Default

two things

(1) rather use this to submit the howto: http://www.howtoforge.com/add_howto and format it nicely

(2) use Ubuntu 10.04 - it's the latest LTS release
__________________
"Common sense is not as common as commonly believed" by sjau

Auto-Install Script for ISPConfig and Horde on a Vanilla Debian Stable

Need more Repos for Ubuntu? Repository Generator
Need more Repos for Debian? Debian Repository Generator
Reply With Quote
  #4  
Old 31st August 2010, 05:35
letsharehowto letsharehowto is offline
Junior Member
 
Join Date: Dec 2009
Location: Sai gon - Viet Nam
Posts: 12
Thanks: 0
Thanked 12 Times in 8 Posts
Default

Thank you

To corysquires:

This is my phone:

http://www.amazon.com/Motorola-SLVR-.../dp/B000ELOPZ6

And V3 works good too:

http://www.amazon.com/Motorola-V3-Un.../dp/B0009FCAJA

I try Nokia but don't work. I not yet try another brand.

To Onn:

Sorry, I take long time. I'm too busy.

And this is may computer:

http://www.howtoforge.com/forums/showthread.php?t=41911

If do not run, you try.

Code:
lsusb
My quote:

Quote:
root@katy:~# lsusb
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 046d:c00c Logitech, Inc. Optical Wheel Mouse
Bus 002 Device 002: ID 22b8:4902 Motorola PCS Triplet GSM Phone (AT)
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
You will see your phone on list (Motorola PCS Triplet GSM Phone (AT)).

Code:
ls /dev/tty*
My quote:

Quote:
root@katy:~# ls /dev/tty*
/dev/tty /dev/tty19 /dev/tty3 /dev/tty40 /dev/tty51 /dev/tty62
/dev/tty0 /dev/tty2 /dev/tty30 /dev/tty41 /dev/tty52 /dev/tty63
/dev/tty1 /dev/tty20 /dev/tty31 /dev/tty42 /dev/tty53 /dev/tty7
/dev/tty10 /dev/tty21 /dev/tty32 /dev/tty43 /dev/tty54 /dev/tty8
/dev/tty11 /dev/tty22 /dev/tty33 /dev/tty44 /dev/tty55 /dev/tty9
/dev/tty12 /dev/tty23 /dev/tty34 /dev/tty45 /dev/tty56 /dev/ttyACM0
/dev/tty13 /dev/tty24 /dev/tty35 /dev/tty46 /dev/tty57 /dev/ttyS0
/dev/tty14 /dev/tty25 /dev/tty36 /dev/tty47 /dev/tty58 /dev/ttyS1
/dev/tty15 /dev/tty26 /dev/tty37 /dev/tty48 /dev/tty59 /dev/ttyS2
/dev/tty16 /dev/tty27 /dev/tty38 /dev/tty49 /dev/tty6 /dev/ttyS3
/dev/tty17 /dev/tty28 /dev/tty39 /dev/tty5 /dev/tty60
/dev/tty18 /dev/tty29 /dev/tty4 /dev/tty50 /dev/tty61

You will see /dev/ttyAMC0 on list.

Make sure your wire is good.

RUN SMS SERVER ON REAL COMPUTER. DO NOT RUN ON VMWARE.

When you send SMS, box send immediately. When recived SMS, box wait about 3 to 20 seconds.

This box help me alot to take care my bussiness. Example: when I have disscount, I can send SMS to my custommer; when I fix finish their something, I can tell them; when they want to know my price, they send SMS to box: : "PR xxxx" (with xxxx is my service) , box will automatic send back to them my prices which I set...

Can you try again. Good luck.

To sjau:

I will try . Thanks.

PS: When I have time, I will tell you how to setup box which remind you via email when he recived SMS.
Reply With Quote
  #5  
Old 1st September 2010, 02:45
corysquires corysquires is offline
Junior Member
 
Join Date: Aug 2010
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Moto Drivers

Hi I plug in the phone to USB and Ubuntu does not recognize, are there additional drivers to load?
Reply With Quote
  #6  
Old 1st September 2010, 05:29
letsharehowto letsharehowto is offline
Junior Member
 
Join Date: Dec 2009
Location: Sai gon - Viet Nam
Posts: 12
Thanks: 0
Thanked 12 Times in 8 Posts
Default

You don't need more drive. Make sure everything clean and stick together.
When you plug phone into box, phone be charging too.
This is my wires: (picture below)

When I used the cheap one, Ubuntu does not recognize:
http://www.thegioididong.com/DTDD/Ph...780&BranchId=0
I don't know how about the expensive one and another phone.
Your phone same my phone?
Good luck!
Attached Images
 
Reply With Quote
  #7  
Old 1st September 2010, 05:37
corysquires corysquires is offline
Junior Member
 
Join Date: Aug 2010
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by corysquires View Post
Hi I plug in the phone to USB and Ubuntu does not recognize, are there additional drivers to load?
I believe my Mototorola L6i is not compatable...
Reply With Quote
  #8  
Old 3rd November 2010, 13:35
letsharehowto letsharehowto is offline
Junior Member
 
Join Date: Dec 2009
Location: Sai gon - Viet Nam
Posts: 12
Thanks: 0
Thanked 12 Times in 8 Posts
Default SMS Gateway with Ubuntu server 10.10, playsms and smstools3.

Today I will tell you howto setup box which run SMS Gateway with Ubuntu server 10.10, playsms and smstools3.

My box:

-Intel(R) Pentium(R) Dual CPU E2200 @ 2.20GHz, 2 cores
-Memory: 2G

My cell phone:

- http://www.amazon.com/Motorola-SLVR-.../dp/B000ELOPZ6
- And this phone works good too: http://www.amazon.com/Motorola-V3-Un.../dp/B0009FCAJA

We have 4 steps:

-Setup Ubuntu server 10.10 box.
-Install Playsms.
-Install Smstools3.
-Config Playsms.

1/- Setup Ubuntu server 10.10 box:

-Create new box with Ubuntu server 10.10. If you don't know, this link will help you: http://www.howtoforge.com/perfect-se...at-ispconfig-3

-When box get dhcp IP address, press Cancel (remember do quickly), then input IP manual. In my case, my IP is: 192.168.1.66. Netmask: 255.255.255.0. Gateway: 192.168.1.1. Name server address: 192.168.1.1.

-When box ask Host name, I choose: cat.mouse. (We use Sendmail to send email to remind us when box recieves sms. And if you don't want Ubuntu startup slows down at Starting Mail Transport Agent (MTA) sendmail you have to choose long hostname, example: "cat.mouse". If you choose short name: "catmouse", box boot up, box shutdown and box remind you when sms come is very slow.)

-When box ask software to install, only choose OpenSSH.

Finish install, reboot box.

Logon and active root account:

Code:
sudo passwd root
Logout then login with root and later do everything with root too.

Upgrade box:

Code:
apt-get update && apt-get upgrade -y
Reboot box:

Code:
reboot
2/- Install Playsms:

Logon with root and install some softwares:

Code:
apt-get install -y apache2 mysql-server php5 php5-cli php5-cgi php-pear php-db phpmyadmin libapache2-mod-php5 gcc sendmail
When box ask password, I choose 111111 for all.

( http://picasaweb.google.com/letshare...tu1010Playsms# )
Add playsms user:

Code:
adduser playsms
Create playSMS web root, spool and log and set ownership to user www-data:

Code:
mkdir -p /var/www/playsms
mkdir -p /var/spool/playsms
mkdir -p /var/log/playsms
chown -R www-data /var/www/playsms
chown -R www-data /var/spool/playsms
chown -R www-data /var/log/playsms
Download Playsms:

Code:
wget http://biznetnetworks.dl.sourceforge.net/project/playsms/playsms/Version%200.9.5.1/playsms-0.9.5.1.tar.gz
Unzip:

Code:
tar -zxvf playsms-0.9.5.1.tar.gz -C /usr/local/src
Copy files and directories inside 'web' directory to playSMS web root and set ownership again to user www-data:

Code:
cd /usr/local/src/playsms-0.9.5.1/web
cp -rR * /var/www/playsms
chown -R www-data /var/www/playsms
Setup database:

Code:
mysqladmin -u root -p create playsms
When box ask password, type: 111111 then press Enter.

Code:
mysql -u root -p playsms < /usr/local/src/playsms-0.9.5.1/db/playsms.sql
When box ask password, type: 111111 then press Enter.

Copy config-dist.php to config.php and edit config.php:

Code:
cd /var/www/playsms
cp config-dist.php config.php
Fill required field with coutious in config.php file:

Code:
nano config.php
Please find rootpassword (on line 8) and replace with 111111 then save and exit.

Enter bin directory, copy playsms, playsmsd, playsmsd.php, playsmsd_start to directory default:

Code:
cd /usr/local/src/playsms-0.9.5.1/bin
cp playsmsd playsmsd.php playsmsd_start /usr/local/bin/
cp playsms /etc/default/
Make playsmsd_start will start automatically on boot:

Code:
nano /etc/init.d/rc.local
Add bellow quote into the bottom of the file (before exit if theres exit command) then save and exit:

Quote:
/usr/local/bin/playsmsd_start
3/- Install Smstools3:

Download Smstools3:

Code:
wget http://smstools3.kekekasvi.com/packages/smstools3-3.1.14.tar.gz
Unzip:

Code:
tar -zxvf smstools3-3.1.14.tar.gz -C /usr/local/src
Installing smstools3:

Code:
cd /usr/local/src/smstools3
make
make install
Back to playSMS source directory, copy smsd.conf from contrib/smstools/ to /etc:

Code:
cd /usr/local/src/playsms-0.9.5.1
cp contrib/smstools/smsd.conf /etc/
Plug cellphone into box. Make sure everything clean and stick together. When you plug phone into box, phone be charging too. Make sure Ubuntu recognize cellphone:

Code:
lsusb
In my case, quote like this:

Quote:
Bus 008 Device 002: ID 22b8:4902 Motorola PCS Triplet GSM Phone (AT)
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Findown where usb port cellphone use:

Code:
ls /dev/tty*
In my case, quote like this:

Quote:
/dev/tty /dev/tty19 /dev/tty3 /dev/tty40 /dev/tty51 /dev/tty62
/dev/tty0 /dev/tty2 /dev/tty30 /dev/tty41 /dev/tty52 /dev/tty63
/dev/tty1 /dev/tty20 /dev/tty31 /dev/tty42 /dev/tty53 /dev/tty7
/dev/tty10 /dev/tty21 /dev/tty32 /dev/tty43 /dev/tty54 /dev/tty8
/dev/tty11 /dev/tty22 /dev/tty33 /dev/tty44 /dev/tty55 /dev/tty9
/dev/tty12 /dev/tty23 /dev/tty34 /dev/tty45 /dev/tty56 /dev/ttyACM0
/dev/tty13 /dev/tty24 /dev/tty35 /dev/tty46 /dev/tty57 /dev/ttyS0
/dev/tty14 /dev/tty25 /dev/tty36 /dev/tty47 /dev/tty58 /dev/ttyS1
/dev/tty15 /dev/tty26 /dev/tty37 /dev/tty48 /dev/tty59 /dev/ttyS2
/dev/tty16 /dev/tty27 /dev/tty38 /dev/tty49 /dev/tty6 /dev/ttyS3
/dev/tty17 /dev/tty28 /dev/tty39 /dev/tty5 /dev/tty60
/dev/tty18 /dev/tty29 /dev/tty4 /dev/tty50 /dev/tty61
Config smsd.conf:

Code:
nano /etc/smsd.conf
Please find ttyUSB0 (on line 27) and replace with ttyACM0 then save and exit.

Create some important directories for smstools3:

Code:
mkdir -p /var/spool/sms/checked
mkdir -p /var/spool/sms/failed
mkdir -p /var/spool/sms/incoming
mkdir -p /var/spool/sms/outgoing
mkdir -p /var/spool/sms/sent
mkdir -p /var/log/sms
Change permissions on some directories so that web server user can write files on it:

Code:
chown -R www-data /var/spool/sms
To get smstools3 running automatically on every boot, type this command:

Code:
update-rc.d sms3 defaults
Reboot box:

Code:
reboot
4/- Config Playsms:

On client open web browser, at address type:

Login using default administrator user:

( http://picasaweb.google.com/letshare...97544327981986 )

username: admin
password: admin

( http://picasaweb.google.com/letshare...97526305094706 )

Then click Gateway, click Manage smstools, click (click here to active)

( http://picasaweb.google.com/letshare...97476944974002 )

Everything keep default.

Logon server and reboot box:

reboot

Now you can send and recived sms with Playsms. Good luck!

Thanks:

http://www.howtoforge.com
http://www.ubuntu.com
http://playsms.org
http://smstools3.kekekasvi.com

PS:
- I do everything with real computer not "cloud" computer.
- When I send sms, box wait from 3 to 10 second then sms will be send.
- When I recived sms, box wait from 3 to 10 second then sms will be recived.
- For more information you can visit this link: http://tech.groups.yahoo.com/group/playsms-devel/

More picture at: http://picasaweb.google.com/116366725840175897341
Attached Files
File Type: txt Everything I do on server.txt (60.9 KB, 812 views)
Reply With Quote
The Following User Says Thank You to letsharehowto For This Useful Post:
falko (3rd November 2010)
  #9  
Old 28th April 2011, 03:11
wasanzy wasanzy is offline
Junior Member
 
Join Date: Mar 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please, I use Nokia 6310i for your setup. I can send sms but I can't receive and I don't even get any error. What could be the cause?
Reply With Quote
  #10  
Old 24th August 2011, 16:12
ahmedy ahmedy is offline
Junior Member
 
Join Date: Aug 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i`m indonesia, so i`m sorry if my english is bad...i wanna ask something
1. after rebooting my ubuntu i have to restart smstool by /etc/init.d/sms3 stop, then /etc/init.d/sms3 start, if not the message will never delivered
2. i also have to run command /usr/local/bin/playsmsd_start stop than /usr/local/bin/playsmsd_start start after rebooting, if not the status of message will never delivered,..
what is the problem?how i can fix it?
thank you answering my questions...
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Ping over VPN RoMiONeT Server Operation 2 4th July 2010 00:19
Missing Proftpd after Ubuntu 9.10 Upgrade (ISPConfig 2 Perfect Server) dwtj01 HOWTO-Related Questions 0 31st October 2009 04:02
Problems with Postfix Mysql Courier PatrickAdrichem Installation/Configuration 3 13th April 2007 15:44
Email - Ueb-Miau mazhar Installation/Configuration 5 21st December 2005 10:01
The Perfect Setup Suse 9.3 - Postfix problems new_bee05 HOWTO-Related Questions 20 25th November 2005 02:30


All times are GMT +2. The time now is 20:15.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.