SMS Server Tools 3
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. The forum is currently read-only, but will open soon. Fri Nov 22, 2024 05:09
SMSTools3 Community » Help and support Bottom

[answered] Autoconfigure GSM devices (cristian_rougier)

  This topic is locked

Page:  1

Author Post
Member
Registered:
Dec 2009
Location: Argentina
Hi. Sorry repost topic by cristian_rougier.

I need exactly that cristian:
I need an utility like wvdialconf. or any way to auto configure the modems or cell phones attached automatically.

keke say:
Quote
Somebody has to edit smsd.conf, and if it's not a customer, you should do it before smsd is started. There is a startup script /etc/init.d/sms3 available and this script should be used to start and stop the smsd anyways. In some systems this script may be named as init.d/smstools. Modify this script to detect connected modems, for example using wvdialconf, and replace devices line in the smsd.conf before starting a daemon.

And christian:
Quote
Thank you good Idea, i will use wvdialconf and catch the output for modify smsd.conf before starting the daemond.

Cristian. Has do you can use wvdialconf to detect modems? And modify smsd.conf? I need do exactly it.

Thanks in advance.

Pablo

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I subscribed cristian_rougier into this new topic, so he will get an e-mail notification when I'm posting this.

The previous topic was this one.

The next is not what you are asking, but close and may be used as a sample:

In this system I do not use udev or wvdialconf. It has a single modem connected and powered using USB and there is an external hardware (relay) for un-plugging a device. This is required sometimes when a modem needs hardware-reset.

The script init.d/sms3 has an option reset. This option will stop the daemon, call a program RESETMODEMS which defaults to /usr/local/bin/smsd_resetmodems, and then start the daemon again. This script is not included in the package, as it depends on the system. In my case it calls a program which is written using C. This program disconnects a modem and reconnects it after a few seconds. When a modem is connected, it's not sure that it's using the same USB port number than before. The script uses dmesg to detect which port is connected and changes the device setting in the smsd.conf file.

The script is:

#!/bin/bash

conf="/etc/smsd.conf"

/home/keke/serial/reset_modem
sleep 10

tmp=`dmesg | grep "converter now attached to" | tail -1`
device=`echo "$tmp" | awk '{print $NF}'`
device="device = /dev/$device"

prevdevice=`grep "device = /dev/ttyUSB" $conf`

device=${device//\//\\\/}
prevdevice=${prevdevice//\//\\\/}

FILE=`mktemp /tmp/smsd_XXXXXX`
sed "s/${prevdevice}/${device}/g" < $conf > $FILE

# Save permissions of original file:
cat $FILE > $conf
rm $FILE
 
'bash' Syntax Highlight powered by GeSHi


  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.