playSMS daemon status NOT running with RED label

Hey guys,

I want to implement playSMS and SMS Tools server in an attempt to create a SMS Gateway using a Raspberry PI 4 4GB and multiple 3G Modems (just for sending/receiving text messages, not a big volume).

So… I have the problem specified in the subject reason of which I can’t send/receive text messages.
My hardware/software config:
Raspberry PI4 4GB with Ubuntu server 20.4 LTS for RPI;
playSMS 1.4.3
smstools3

The same issue I encountered on Raspbian distro.

playsmsd check:

$ playsms/bin/playsmsd /home/playsms/etc/playsmsd.conf check
PLAYSMSD_CONF = /home/playsms/etc/playsmsd.conf
PLAYSMS_PATH = /home/playsms/public_html/playsms
PLAYSMS_LIB = /home/playsms/lib/playsms
PLAYSMS_BIN = /home/playsms/bin
PLAYSMS_LOG = /home/playsms/log/playsms
DAEMON_SLEEP = 1
ERROR_REPORTING = E_ALL ^ (E_NOTICE | E_WARNING)
IS_RUNNING = 1
PIDS schedule = 20269
PIDS ratesmsd = 20271
PIDS dlrssmsd = 20273
PIDS recvsmsd = 20275
PIDS sendsmsd = 20277

Instalation of playsms .sh file was done under sudo
I can’t understand if this is an issue related to file/folder permissions or something else …

Please help me!

playsmsd is running fine. the red label in Report because of wrong path to playsmsd and playsmsd.conf in plugin/feature/playsmslog/config.php:

https://github.com/antonraharja/playSMS/blob/master/web/plugin/feature/playsmslog/config.php#L12-L13

try change them

this requires log checkings, set logstate to 3 in config.php (on web root) and restart playsmsd, and then send test SMS, see playsms.log

anton

Hey Anton,

Thank you so much for your fast reply. Much appreciated.
I was trying to send SMSes while running Raspbian on my RPI. That playsms daemon error made me conclude the issue with not sending SMS is this. Then, after installing Ubuntu server 20.4 LTS on my RPI, having the same playsms daemon issue here as well, I didn’t try to send SMSes again.
I’ll try again and see how it works.

Now I have another problem regarding my modems. I have several Huawei and 2 ZTE. It seems that Huawei modems work just fine but ZTE modems are not creating /dev/ttyUSBx entries and the ID of them under lsusb is 19d2:2000 which is not ok.
Interesting is that same modems worked just fine on Raspbian which is a debian distro as ubuntu…

looks like modeswitch stuff: Ubuntu 9.10 + USB Modem 3G SpeedUp SU-8000U | My notebook (I know its in Bahasa, but try to translate and googling about the topic)

additional step, you need persistent name for your modems: Persistent paths for dynamic device file | My notebook

Hey Anton,

Sadly I have again that red label. Yesterday it worked after I changed those 2 paths to reflect the correct locations to daemon and conf files.
I had to restart my R PI, I opened the web app again and on Reports -> View logs section says the daemon is not running. I started the daemon manually (I have to find a way and set it up to start at startup), I refreshed Reports->View logs section and the label is still red. I checked public_html/playsms/plugin/feature/playsmslog/config.php and I have the right paths there…

I found nothing wrong in my box, so I dont know how exactly that could happen in your raspi. Check again from console if playsmsd check_json says playsmsd is running, then its running.

/home/playsms/bin/playsmsd /home/playsms/etc/playsmsd.conf check_json

If json returns says playsmsd is running, and you have put correct path in config.php, then when you refresh it should shown green.

If still red maybe web cached ? or maybe somehow playSMS web cannot run shell_exec function, but I doubt it since its working once (before you restarted raspi)

anton

Hey again,

I ignored this issue (red label from log section page) and went further with smstools3 installation.
Please confirm how should the cell phone number look in config, let’s take as example the UK prefix:

  1. +44 xxxxxxxxxxxx
  2. 0044 xxxxxxxxxxxx
  3. 44 xxxxxxxxxxx

I have another question regarding “Default Sender ID” field (Settings -> Main configuration -> Default Sender ID).
What should I put here? I suppose this field doesn’t change the sender ID which is the cell phone number no matter what I add there.

test directly with smstools2, see whats working, but should be at least +44xxxxxxxxx and 0xxxxxxxxx

anton

I really appreciate your support and how fast you are answering.

This thread is transforming to a multi-question thread. I have another one for you.
playsms daemon has to be executed under sudo or regular user?

Under normal user, dont run as root. Your installation should also be done by normal user or make sure file and folders permission belongs to normal user.

Anton

hmm… unfortunately, the installation was made under sudo. would that be a problem ?
If yes, is there any command under daemon to uninstall playsms in order to reinstall it under regular user or just delete the content of the folder where it was installed?

To uninstall just remove files and folders related to playSMS.

Here is example of installation under normal user:

Anton

Question: does the web app have the capability to store in the DB all the text messages (SMSes) sent/received/in pending?

Anyways, I’m trying to identify what’s the problem on sending/receiving text messages. I even tried to simulate receiving a SMS and it’s not working. dunno why…

    • 2020-05-04 16:17:52 PID5eb0074cbac20 - L3 recvsmsd # id:1 dt:2020-05-04 16:17:19 sender:+40769712484 m:<message_redacted_by_me> receiver:<redacted_by_me> smsc:dev
    • 2020-05-04 16:17:52 PID5eb0074cbac20 - L3 recvsms_process # dt:2020-05-04 16:17:19 sender:+40769712484 m:<message_redacted_by_me> receiver:<redacted_by_me> smsc:dev
    • 2020-05-04 16:17:52 PID5eb0074cbac20 - L3 recvsms_process # unhandled datetime:2020-05-04 16:17:19 sender:+40769712484 receiver:<redacted_by_me> message:<message_redacted_by_me>

its working, its just unhandled. It means no feature in playSMS recognizing your keyword, probably you haven’t set up any.

Unhandled SMS went to Reports->Sandbox.

anton

Indeed, all my simulated sent SMSes are on Sandbox section. But why? and what can I do to solve this issue?

I’ve managed to send SMSes from your app, which is super cool. now I don’t get it why I can’t see replies in Inbox. All relies simulated or real ones are in Sandbox. Is there anything else I have to configure?

My final project will have multiple 3G Modems used for sending/receiving SMSes. This technical solution will be used by multiple users (<10).
How does the app organize SMSes sent and received by a user.
What if 2+ users use the same modem/SIM to send/receive SMSes?

That’s not an issue, its the way it is. Browse and search this forum, read them, there are ways how to handle incoming SMS, how to get them into user’s Inbox, etc.

anton

Try configure from Settings->Route incoming SMS for handling incoming SMS with unknown keyword.

Incoming SMS with known keyword, keywords that is added by going through menus in Features, will be handled by configured Feature.

See Reports too to see where your incoming SMS go to.

anton