gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble on Sending a Lot of SMS


From: A. Andria
Subject: Trouble on Sending a Lot of SMS
Date: Wed, 01 Nov 2006 10:10:27 +0700
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

Dear friends,

Perhaps you can give me an enlightenment. I had finished a sms based project. Previously, i am using an old Nokia 5110 and gnokii 0.6.14. 1 Sms was sent about 8 second. And then, because it takes a while to send a sms then we are replacing the old Nokia 5110 with iTegno 3000 GSM modem. Finally, 1 sms was sent about 3.6 to 4 second. It means that i can send 1000 sms in 1 hour. And this thing had been tested (we can send 1000 sms in 1 hour).

All the things running well until 1 weeks ago. We have a trouble when sending 1400 sms, till the next day still 60% sms was sent, so 40% sms are pending. It must all the sms sent in 1.5 hour. I guess that we have a trouble when sending a sms with a have a lot of sms. Or may be in that day the sms provider traffic is to high volume/traffic. Or may be the other things make this problem?

If we are working with gnokii, sometimes after a few minutes gnokii got hang-up or the sms can not stored (save to the database) or can not send (get from the database and sent it out). So, we must stop the gnokii processed daemon and then start it again. But, i think it's a waste time if we are always stop and start it again. And the worst thing is we didn't know when the gnokii got hang-up. Below is my own bash script to handle this situation.

#!/bin/bash
#
# (c) Asep Andria I.W., ST.
# Email  : <address@hidden>
# Mobile : +6285659969486

# ----------------------------------
# Check mysql.sock
# ----------------------------------

MYSQL_SOCK_DIR="/opt/lampp/var/mysql";
MYSQL_SOCK_NAME="mysql.sock";

if [ ! -x "$MYSQL_SOCK_DIR/$MYSQL_SOCK_NAME" ]; then

   echo "Can not found $MYSQL_SOCK_NAME in $MYSQL_SOCK_DIR"
echo "Please check if MySQL Server is running or change the location of $MYSQL_SOCK_NAME"
   echo "Exiting..."
exit 1

fi

# ----------------------------------
# Linking mysql.sock
# ----------------------------------

MYSQL_SOCK_LINK_DIR="/var/run/mysqld";
MYSQL_SOCK_LINK_NAME="mysqld.sock";

if [ ! -x "$MYSQL_SOCK_LINK_DIR/$MYSQL_SOCK_LINK_NAME" ]; then
echo "Can not found $MYSQL_SOCK_LINK_NAME in $MYSQL_SOCK_LINK_DIR"
   echo ""
echo "Trying to linking $MYSQL_SOCK_DIR/$MYSQL_SOCK_NAME to $MYSQL_SOCK_LINK_DIR/$MYSQL_SOCK_LINK_NAME ..." /bin/ln -s "$MYSQL_SOCK_DIR/$MYSQL_SOCK_NAME" "$MYSQL_SOCK_LINK_DIR/$MYSQL_SOCK_LINK_NAME" if [ ! -x "$MYSQL_SOCK_LINK_DIR/$MYSQL_SOCK_LINK_NAME" ]; then echo "Failed to linking $MYSQL_SOCK_DIR/$MYSQL_SOCK_NAME to $MYSQL_SOCK_LINK_DIR/$MYSQL_SOCK_LINK_NAME" exit 1

   else
echo "Success to linking $MYSQL_SOCK_DIR/$MYSQL_SOCK_NAME to $MYSQL_SOCK_LINK_DIR/$MYSQL_SOCK_LINK_NAME" fi

fi

# ----------------------------------
# gnokii smsd path
# ----------------------------------
SMSD_PATH="/usr/local"

while true
do
   killall smsd >/dev/null 2>&1
   sleep 3
$SMSD_PATH/sbin/smsd -u usersms -d sms -c localhost -m mysql >/dev/null 2>&1 &
   sleep 1m
done

Sometimes the mysql.sock location is differ from the os/machine to other. So, in the script above i tried to find the mysql.sock location. If exist ignore it but if not exist create a link one. We need this mysql.sock because gnokii didn't work if gnokii didn't find the mysql socket. Of course this script useful when we want to combine gnokii with MySql database.

To help on troubleshooting the slow moving or failed of sent sms it must there a log or script. Yes, we can find the status from the database but i think it's nice if we have a file that keep all the log of sent sms. But, i didn't find how to do this. I have turn on the debug mode on gnokiirc

Need your help.


--
Regards,

Asep Andria I.W.
http://asepandria.blogspot.com
--





reply via email to

[Prev in Thread] Current Thread [Next in Thread]