SMS Gateway Ubuntu server 9.10 Playsms Smstools3.

Discussion in 'HOWTO-Related Questions' started by letsharehowto, Jul 29, 2010.

  1. letsharehowto

    letsharehowto New Member

    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/playsms/files/playsms/Version 0.9.4/playsms-0.9.4.tar.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/packages/smstools3-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 Files:

  2. corysquires

    corysquires New Member

    What model phone are you using? is there a hardware compatibility list somewhere with phones / modems that are compatible... Excellent article!
     
  3. sjau

    sjau Local Meanie Moderator

  4. letsharehowto

    letsharehowto New Member

    Thank you :)

    To corysquires:

    This is my phone:

    http://www.amazon.com/Motorola-SLVR-L7-Unlocked-Slot-International/dp/B000ELOPZ6

    And V3 works good too:

    http://www.amazon.com/Motorola-V3-Unlocked-Player-International-Warranty/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:

    You will see your phone on list (Motorola PCS Triplet GSM Phone (AT)).

    Code:
    ls /dev/tty*
    My quote:


    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.
     
  5. corysquires

    corysquires New Member

    Moto Drivers

    Hi I plug in the phone to USB and Ubuntu does not recognize, are there additional drivers to load?
     
  6. letsharehowto

    letsharehowto New Member

    Attached Files:

  7. corysquires

    corysquires New Member

    I believe my Mototorola L6i is not compatable... :mad:
     
  8. corysquires

    corysquires New Member

    tried SLVR L7 and it does not work either :confused:
     
  9. pras

    pras New Member

    Hi I tried with the Motorola RAZR.... without success...
    I run the lsusb and I got

    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 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 003: ID 058f:6362 Alcor Micro Corp. Hi-Speed 21-in-1 Flash Card Reader/Writer (Internal/External)
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    I try to send sms without success....

    any suggestion please.....?

    Thanks
     
  10. letsharehowto

    letsharehowto New Member

    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-L7-Unlocked-Slot-International/dp/B000ELOPZ6
    - And this phone works good too: http://www.amazon.com/Motorola-V3-Unlocked-Player-International-Warranty/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-server-ubuntu-10.10-maverick-meerkat-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/letsharehowto/Ubuntu1010Playsms# )
    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:

    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:

    Findown where usb port cellphone use:

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

    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/letsharehowto/Ubuntu1010Playsms#5535297544327981986 )

    username: admin
    password: admin

    ( http://picasaweb.google.com/letsharehowto/Ubuntu1010Playsms#5535297526305094706 )

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

    ( http://picasaweb.google.com/letsharehowto/Ubuntu1010Playsms#5535297476944974002 )

    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:

  11. wasanzy

    wasanzy New Member

    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?
     
  12. ahmedy

    ahmedy New Member

    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...
     
  13. falko

    falko Super Moderator ISPConfig Developer

    Are there any errors in your logs?

    You could add the commands to /etc/rc.local, this is the last script to be executed in the boot process so that you don't have to do this manually:

    Code:
    /etc/init.d/sms3 stop
    /etc/init.d/sms3 start
    /usr/local/bin/playsmsd_start stop
    /usr/local/bin/playsmsd_start start
     
  14. mporcile

    mporcile New Member

    smtp settings

    Hi, excellent post, i use your explanatiosn and my smstools+playsms work fine!
    my problem is the smtp settings, i dont know how to make to send mail from playsms using my ubuntu box. You can help me?
    (and sorry for my bad english !)

    thanks a lot.

    Mariano Porcile
     
  15. nhabep

    nhabep Banned

    Add bellow quote into the bottom of the file (before exit if theres exit command) then save and exit:
    Are there any errors in your logs?
     

Share This Page