|
|
SMS Server Tools 3 Community |
Welcome, Guest. The forum is currently read-only, but will open soon. |
Sat Dec 21, 2024 13:12 |
Login and Post Reply
Page: 1
Author |
Post |
|
#1 Sun Jun 11, 2017 13:04, 91 months ago.
|
Member
Registered: Jun 2017
Location: Arad, Romania
|
Do you have any experience with devices like this one? https://www.aliexpress.com/item/16-PORT-GPRS-MODEM-professional-SEND-RECEIVE-SMS-MSM-Gateway-Mobile-Recharge/1721780447.htmlIs able smstools to deal with this? As i can see there is only one usb conector. Smstools will see this as a single modem or as 16 because inside that is usb hub also? Thank You.
|
|
#2 Sun Jun 11, 2017 15:54, 91 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
If the device provides independent serial interface for each module, like /dev/ttyUSB0, /dev/ttyUSB1 and so on, it can be used with SMSTools3. I do not know if there is a hub inside. You have to ask that from the seller. See also this topic: http://smstools3.kekekasvi.com/topic.php?post=5734#post5734
|
|
#3 Wed Jun 21, 2017 12:07, 91 months ago.
|
Member
Registered: Jun 2017
Location: Arad, Romania
Topic owner
|
The seller is telling me that i will see 16 serial devices under linux/windows, so... i will order one piece and make some tests.
Keke, nice software. Thank You.
|
|
#4 Tue Jul 11, 2017 15:29, 90 months ago.
|
Member
Registered: Jun 2017
Location: Arad, Romania
Topic owner
|
Hello, I got that device, and it works. The modems are seen like ACM devices. My config that worked: [T0] device = /dev/ttyACM0 incoming = yes outgoing = yes signal_quality_ber_ignore = yes cs_convert = yes check_memory_method = 5 status_signal_quality = no Is not working without antena, and every modem has his own power switch. Speed for one modem: 4-5 sec, theoretically volume 11000-12000/hour. No test with 16 sims yet. lsusb on Raspberry pi 3: Bus 001 Device 005: ID 1058:10b8 Western Digital Technologies, Inc. Bus 001 Device 024: ID 04e2:1414 Exar Corp. Bus 001 Device 023: ID 04e2:1414 Exar Corp. Bus 001 Device 022: ID 04e2:1414 Exar Corp. Bus 001 Device 021: ID 04e2:1414 Exar Corp. Bus 001 Device 020: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Some pictures here: http://drgsm.ro/img/« Last edit by ploaie on Tue Jul 11, 2017 15:31, 90 months ago. »
|
|
#5 Thu Jul 20, 2017 05:33, 90 months ago.
|
Member
Registered: Jul 2017
Location: Santiago, Chile
|
Hello,
I have a question, in de smsd.conf, which is the code, because I tried but only can send by 1 modem, I don't understand because not sent by multiple modems
my code:
# Global configuration # Configuration smsd.conf # checkhandler = /usr/local/bin/load_balancing.sh # devices = GSM1,GSM2,GSM3 # logfile = /var/log/smsd.log #loglevel = 6 loglevel = 5 delaytime = 0 delaytime_mainprocess = 0 internal_combine = yes receive_before_send = no logtime_ms = 1 max_continuous_sending = 600 incoming_utf8 = yes umask = 111 stats_interval = 0 #checkhandler = /usr/local/bin/load_balancing.sh smart_logging = yes # trust_outgoing = yes stats = /var/spool/sms/stats outgoing = /var/spool/sms/outgoing checked = /var/spool/sms/checked failed = /var/spool/sms/failed incoming = /var/spool/sms/incoming sent = /var/spool/sms/sent # autosplit = 3 # #Timers for errors (specify how many seconds stop on error) blocktime = 3 errorsleeptime = 3 # [queues] #ALL = /var/spool/sms/all Q1 = /var/spool/sms/modem1 Q2 = /var/spool/sms/modem2 Q3 = /var/spool/sms/modem3 #Q4 = /var/spool/sms/modem4
And the conf for modem is the same.
|
|
#6 Sun Jul 23, 2017 20:21, 90 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Hello cgambi, The load balancing script has a bug. The maximum value of counter is limited to 255 by oversight, and I think that in your system counters are much more than that. Here is a fixed version of load_balancing.sh: #!/bin/bash # --------------------------------------------------------------------------------------- # This example is for three modems, named GSM1, GSM2 and GSM3 using queues Q1, Q2 and Q3. # In the global part of smsd.conf, enable message counters: # stats = /var/spool/sms/stats # Use zero value for interval if statistics files are not used: # stats_interval = 0 # # Enable checkhandler (this script): # checkhandler = /usr/local/bin/load_balancing.sh # # Define queues: # [queues] # Q1 = /var/spool/sms/Q1 # Q2 = /var/spool/sms/Q2 # Q3 = /var/spool/sms/Q3 # # With smsd >= 3.1.7 providers are not needed to define, # with previous versions define the following: # [providers] # Q1 = 0,1,2,3,4,5,6,7,8,9,s # Q2 = 0,1,2,3,4,5,6,7,8,9,s # Q3 = 0,1,2,3,4,5,6,7,8,9,s # # Add queue definition for each modem: # [GSM1] # queues = Q1 # etc... # ---------------------------------------------------------------------------------------
# Settings for this script: STATSDIR=/var/spool/sms/stats MODEMS=( GSM1 GSM2 GSM3 ) QUEUES=( Q1 Q2 Q3 )
# ---------------------------------------------------------------------------------------
NUMBER_OF_MODEMS=${#MODEMS[@]} NUMBER_OF_QUEUES=${#QUEUES[@]} if [ $NUMBER_OF_MODEMS -ne $NUMBER_OF_QUEUES ]; then echo "ERROR: Number of queues does not match number of modems." exit 1 # Message is rejected. fi
read_counter() { local RESULT=0 local FILE=$STATSDIR/$1.counter local COUNTER=0
if [[ -e $FILE ]] then COUNTER=`formail -zx $1: < $FILE` if [ "$COUNTER" != "" ]; then RESULT=$COUNTER fi fi
# Fix 23.7.2017: Use echo output, return value is limited to 255: #return $RESULT echo $RESULT }
# If there is Queue (or Provider) defined, load balancing is ignored: QUEUE=`formail -zx Queue: < $1` if [ -z "$QUEUE" ]; then QUEUE=`formail -zx Provider: < $1` if [ -z "$QUEUE" ]; then
# Read current counters: for ((i = 0; i < $NUMBER_OF_MODEMS; i++)); do # Fix 23.7.2017: Get echo output: #read_counter ${MODEMS[${i}]} #eval COUNTER_${MODEMS[${i}]}=$? tmp=$(read_counter ${MODEMS[${i}]}) eval COUNTER_${MODEMS[${i}]}=$tmp done
QUEUE=${QUEUES[0]} tmp=COUNTER_${MODEMS[0]} COUNTER=${!tmp} for ((i = 1; i < $NUMBER_OF_MODEMS; i++)); do tmp=COUNTER_${MODEMS[${i}]} tmp=${!tmp} if [ $tmp -lt $COUNTER ]; then QUEUE=${QUEUES[${i}]} tmp=COUNTER_${MODEMS[${i}]} COUNTER=${!tmp} fi done
TMPFILE=`mktemp /tmp/smsd_XXXXXX` cp $1 $TMPFILE formail -f -I "Queue: $QUEUE" < $TMPFILE > $1 unlink $TMPFILE fi fi exit 0 'bash' Syntax Highlight powered by GeSHi
|
|
#7 Mon Jul 24, 2017 15:07, 90 months ago.
|
Member
Registered: Jul 2017
Location: Santiago, Chile
|
Hello Keke i made the changes, and i'm still sending by 1 modem. (the first one in the queue).
here is my config file GSM 1, 2, 3:
[GSM1] queues = ALL,GSM1 device = /dev/gsmmodem ignore_unexpected_input = yes detect_unexpected_input = no report = no sending_disabled = no memory_start = 0 send_delay = 0 check_network = 0 voicecall_hangup_ath = yes hangup_incoming_call = yes voicecall_ignore_modem_response = yes regular_run_interval = 60 regular_run_cmd = AT+CSQ regular_run_logfile = /var/log/smsd_run_GSM1.log regular_run_loglevel = 7 init2 = at+cmms=2 pin = ignore status_signal_quality = no outgoing = yes pre_init = no incoming = yes mode = new keep_open = yes keep_messages = no baudrate = 115200 rtscts = yes cs_convert = yes decode_unicode_text = yes internal_combine = yes check_memory_method = 2
here is my config file general:
devices = GSM1,GSM2,GSM3 # logfile = /var/log/smsd.log #loglevel = 6 loglevel = 5 delaytime = 0 delaytime_mainprocess = 0 internal_combine = yes receive_before_send = no logtime_ms = 1 max_continuous_sending = 600 incoming_utf8 = yes umask = 111 stats_interval = 0 checkhandler = /usr/local/bin/load_balancing.sh smart_logging = yes # trust_outgoing = yes stats = /var/spool/sms/stats outgoing = /var/spool/sms/outgoing checked = /var/spool/sms/checked failed = /var/spool/sms/failed incoming = /var/spool/sms/incoming sent = /var/spool/sms/sent # autosplit = 3 # #Timers for errors (specify how many seconds stop on error) blocktime = 3 errorsleeptime = 3 # #[default] #queues = ALL,GSM1,GSM2,GSM3 # [queues] ALL = /var/spool/sms/all GSM1 = /var/spool/sms/modem1 GSM2 = /var/spool/sms/modem2 GSM3 = /var/spool/sms/modem3
Pleas help
|
|
#8 Mon Jul 24, 2017 15:46, 90 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Check the sent message file in /var/spool/sms/sent directory. Has it a Queue: header?
Is a command formail installed in your system? If it's not, it's usually available in procmail package and this command is required by the script.
|
|
#9 Mon Jul 24, 2017 16:04, 90 months ago.
|
Member
Registered: Jul 2017
Location: Santiago, Chile
|
thx for the answer.
I already have the formail command, so that can't be the problem.
but, the sent message file doesnt have any queue header. how do i put that header?
|
|
#10 Mon Jul 24, 2017 16:13, 90 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
The checkhandler should put the Queue header into the file.
Try the following:
- stop the smsd if it's running
- create an outgoing file as usual, without Queue or Provider headers, with a name test1
- run the checkhandler manually: /usr/local/bin/load_balancing.sh /var/spool/sms/outgoing/test1
What happens? Is there any errors seen?
Also cat /var/spool/sms/stats/*.counter and show the results.
|
|
#11 Mon Jul 24, 2017 16:43, 90 months ago.
|
Member
Registered: Jul 2017
Location: Santiago, Chile
|
i ran the checkhandler with a test file as you said, and nothing happened, no error. pi@raspberrypi:/var/spool/sms/outgoing $ ls test1 pi@raspberrypi:/var/spool/sms/outgoing $ /usr/local/bin/load_balancing.sh /var/spool/sms/outgoing/test1 pi@raspberrypi:/usr/local/bin $ cat /var/spool/sms/stats/*.counter GSM1: 1478 GSM2: 0 GSM3: 0 i still have the test file in the outgoing folder this is my test file: To: 5699791XXXX Hello, this is the sms. after run the command, the file now is: To: 5699791XXXX Queue: Q2 Hello, this is the sms. EDIT: in the log file smsd i have this error: 2017-07-24 12:44:25.954,5, smsd: Wrong provider queue Q2 in file /var/spool/sms/outgoing/test1 « Last edit by cgambi on Mon Jul 24, 2017 16:46, 90 months ago. »
|
|
#12 Mon Jul 24, 2017 16:57, 90 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Settings in the config file must be equal with settings in the load balancing script. You originally had queues Q1 and so on, but now you are using GSM1 and so on, which is not correct. Either change the smsd.conf, or change the script:
|
|
#13 Mon Jul 24, 2017 17:11, 90 months ago.
|
Member
Registered: Jul 2017
Location: Santiago, Chile
|
i checked the names and its ok now. i set the queues as Q1 - Q3 and actually, if i create now a test1 file with the queue header, it work, and the sms its sended by the specific modem.
when i send a sms by the playsms api its seems like the messages are not getting the header. what could be wrong?
|
|
#14 Mon Jul 24, 2017 17:20, 90 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Load balancing is ignored if there is Queue or Provider header in the file. When testing, you should not create Queue header by yourself.
Please check which headers are created by the playsms, as it may override the load balancing.
|
|
#15 Mon Jul 24, 2017 18:27, 90 months ago.
|
Member
Registered: Jul 2017
Location: Santiago, Chile
|
ok, i checked the file, and when i created with no headers and then run /usr/local/bin/load_balancing.sh /v ar/spool/sms/outgoing/test1 the file now has a queue header when open it again.
the test file only have:
To: 569XXXXXXXX
hi i'm a sms
and after run the command now i have
To: 569XXXXXXXX Queue: Q2
hi i'm a sms
|
|
#16 Mon Jul 24, 2017 21:43, 90 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Did you check if playsms is creating Queue or Provider header? I do not have playsms installed, so I cannot check what kind of configuration it has. You could stop the smsd and create a new message with playsms. Then you could check what kind of file was created to the outgoing directory. If there is Queue (or Provider) set, it must be disabled in the playsms side. How to do that, I do not know.
|
|
#17 Thu Aug 17, 2017 21:36, 89 months ago.
|
Member
Registered: Jul 2017
Location: Santiago, Chile
|
We're making a load balancer in our custom platform. so we're fine with that. But, there are some troubles with 2 things: 1. i couldn't send more than 6.x (Average) sms per minute. is this the maximum send rate? or should be faster? is there a way to optimize this? 2. I can read in the log file that the sms are sended, but how can i know they delivery status? and if someone reply the sms, where can i read the incoming sms? we've tested replying some sms, but nothing happens. even in the log, there's no clue about sms received This is my Code: some log to send: thanks for the help! regards
|
Login and Post Reply
Page: 1
Time in this board is UTC.
|
|
|
|
|
|
|