playSMS in Windows

I got a good news to share with you guys: playSMS works in Windows !

My test environment was:

  • Laptop
  • Windows 7 Home Edition
  • Cygwin 1.7.7
  • Kannel 1.4.3
  • playSMS 0.9.5.1
  • WampServer 2.0i
  • GSM modem Q2406B, USB (now its freakin cheap! USD 25-35 in Jakarta)

I’m happy, it really works :) All playSMS feature seems to be running properly, including the push update of delivery status (from Sent to Delivered).

Below are global steps I’ve done:

  • Plug GSM modem to laptop
  • Install USB-to-serial driver for this modem, the driver came with a CD found inside the box
  • Found out the modem com port, in my case its com16
  • Download cygwin 1.7.7 from http://www.cygwin.com
  • Run setup.exe (cygwin installer), install from Internet, choose closest mirror (I was using kambing), select package: gcc, make, libxml2-devel, openssl-devel, choose to install dependencies, and wait.. last step, put icon in desktop
  • Download kannel 1.4.3 (gateway-1.4.3.tar.gz) from http://www.kannel.org
  • Copy the gateway-1.4.3.tar.gz to C:/cygwin/usr/local/src (my cygwin was on C:/cygwin)
  • Run cygwin, a cmd-like terminal pops up, it really looks like a Linux console
  • From that terminal navigate to /usr/local/src (cd /usr/local/src), extract gateway-1.4.3.tar.gz (tar -zxf gateway-1.4.3.tar.gz)
  • STOP HERE, pay attention, you need to patch a bit the kannel source code
    • from inside gateway-1.4.3, navigate to directory gwlib, or easier using Windows Explorer go to C:/cygwin/usr/local/src/gateway-1.4.3/gwlib
    • edit thread.c (use Notepad++, UltraEdit or Wordpad, but don’t use plain notepad)
    • go to line 137, and comment that block
      • /* <– add this
        if (ret != 0)
        panic(0, “%s:%ld: %s: Mutex failure! (Called from %s:%ld:%s.)”,
        __FILE__, (long) __LINE__, __func__, file, (long) line, func);
        if (mutex->owner == gwthread_self())
        panic(0, “%s:%ld: %s: Managed to lock the mutex twice! (Called from %s:%ld:%s.)”,
        __FILE__, (long) __LINE__, __func__, file, (long) line, func);
        mutex->owner = gwthread_self();
        and this –> */
    • save thread.c and go back to gateway-1.4.3 (cd ../)
  • Compile kannel, ./configure, make, make install, the usual drill
  • Install WampServer, its a plain simple Apache+MySQL+PHP in Windows, by default its in C:/wamp, document root is in C:/wamp/www, my playSMS was in C:/wamp/www/playsms, and I can open it from http://localhost/playsms
  • Install playSMS, edit the config.php, do the playSMS installation just like in Linux (but note the path, see below)
  • Get kannel.conf from playsms contrib directory and save it in C:/cygwin/etc/
  • Most important info:
    • no changes in slash form (use / not or )
    • refer the root in Linux (/) to C:/cygwin (case sensitive)
    • /var/log/playsms would need to be changed to C:/cygwin/var/log/playsms, make path changes in config.php and in kannel.conf
    • my modem port, COM16, inside kannel.conf it became /dev/com16 (case sensitive)

That’s all the global steps :) *Small* little things like init scripts, run as a service, complete step-by-step.. currently I don’t have time for that. But if you know Kannel, ever to install it in Linux once or twice, have experience in installing playSMS, I guess it shouldn’t be a problem for you to follow my global steps above and go from there.

Have fun!

Resources:

Advertisements

29 Comments

  1. sir , m n student .. i have wrkd on dis kind of project earlier ..
    sir d thing dat i wanna ask u iz dat if u can sssend me the screenshots of this installation process , it will b really helpfull. plz sir

    Like

    Reply

    1. Hi,

      I’ll try to share them with u, but I can’t make promises when :)

      You can also post questions in mailing list about this, for things that u don’t understand.

      Like

      Reply

  2. Hi Anton,

    You mention that GSM modem Q2406B is 25-35 USD in Jakarta, is it possible to share that information in detail, where to buy that kind of GSM modem? I did some googling and found out that Wavecom Fastrack M1306B uses the similar chipset Q2406B, but the price range for Wavecom Fastrack is about 50 USD. TIA.

    Regards,

    Like

    Reply

    1. Hi,

      I may have received wrong info about this, yes you’re right that particular type is around 40-60. Still its really cheap right? :)

      The one without the B, or other type in the same brand is indeed cheaper, 25-35.

      Like

      Reply

      1. playSMS is not an official application for or endorsed by Clickatell (http://www.clickatell.com).

        But its working when you select gateway clickatell and you entered correct information from Clickatell, they are username and password in clickatell.com and an API ID, all you can read from clickatell’s website.

        Like

    1. Yup you’re right.

      1st, php gettext is not easy to find (or install) in php for windows

      2nd, windows use different name for locale names

      I’m working to fix the issue now.

      Like

      Reply

  3. Where to buy the modem?
    GSM modem Q2406B, USB (now its freakin cheap! USD 25-35 in Jakarta) :twisted:

    Like

    Reply

  4. why kannel.org cannot be accessed ?? so i can’t download gateway-1.4.3.tar.gz …?
    what is your solution ..

    Like

    Reply

  5. I just want to ask this after checking out this. If i want to use playsms do I have to pay to some company like clickatell.com or similar to that..

    Like

    Reply

    1. I mean like sms gateway providers or using this playsms.com do we work as our own gateway providers..

      Like

      Reply

      1. Hi,

        playSMS is an interface for an SMS gateway. So, by installing playSMS only you won’t be able to send any SMS. You need a real SMS gateway to actually send SMS.

        playSMS users –> playSMS –> SMS gateway –> receiver (cellphone)

        if you use clickatell as your SMS gateway, then you need to buy credits from clickatell.

        if you use a GSM modem with SIM card inside, then you need an SMS gateway that can handle that GSM modem, for example kannel, smstools3 or gnokii, then you need to buy credits or topup from operator

        Like

  6. hi how do i make my won sms gateway using an usb gsm modem? a step by step tutorials will be helpful for me.

    Like

    Reply

  7. Dear anton,

    i am trying to install playsms on windows as the info posted here. when i start the playsmsd it give me this error,

    ps: unknown option — o
    Try ps --help' for more information.
    tr: missing operand after ‘’
    Two strings must be given when translating.
    Try 'tr --help' for more information.
    ps: unknown option -- o
    Try
    ps –help’ for more information.
    tr: missing operand after ‘’
    Two strings must be given when translating.
    Try ‘tr –help’ for more information.
    ps: unknown option — o
    Try ps --help' for more information.
    tr: missing operand after ‘’
    Two strings must be given when translating.
    Try 'tr --help' for more information.
    ps: unknown option -- o
    Try
    ps –help’ for more information.
    tr: missing operand after ‘’
    Two strings must be given when translating.
    Try ‘tr –help’ for more information.
    ps: unknown option — o
    Try ps --help' for more information.
    tr: missing operand after ‘’
    Two strings must be given when translating.
    Try 'tr --help' for more information.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    ps: unknown option -- o
    Try
    ps –help’ for more information.
    tr: missing operand after ‘’
    Two strings must be given when translating.
    Try ‘tr –help’ for more information.
    ps: unknown option — o
    Try ps --help' for more information.
    tr: missing operand after ‘’
    Two strings must be given when translating.
    Try 'tr --help' for more information.
    ps: unknown option -- o
    Try
    ps –help’ for more information.
    tr: missing operand after ‘’
    Two strings must be given when translating.
    Try ‘tr –help’ for more information.
    ps: unknown option — o
    Try ps --help' for more information.
    tr: missing operand after ‘’
    Two strings must be given when translating.
    Try 'tr --help' for more information.
    ps: unknown option -- o
    Try
    ps –help’ for more information.
    tr: missing operand after ‘’
    Two strings must be given when translating.
    Try ‘tr –help’ for more information.
    Unable to start playsmsd
    what might be the problem.

    Thank you

    Like

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s