Title: Fastest modem polling

I use kannel purely to receive sms messages using a siemens mc35 gsm modem. I spoke to someone about kannel and they said they used their own program instead of it because it didn't poll the modem fast enough.

The fastest it can poll (using the keepalive) is 1 second. I think the code to modify the polling is :-

Line 904 smsc_at2.c

        if (privdata->keepalive &&
            idle_timeout + privdata->keepalive < time(NULL)) {
            if (at2_send_modem_command(privdata,
                octstr_get_cstr(privdata->modem->keepalive_cmd), 5, 0) < 0) {
                at2_close_device(privdata);
                conn->status = SMSCCONN_RECONNECTING;
                reconnecting = 1;
                goto reconnect;
            }
            idle_timeout = time(NULL);
        }

        if (privdata->sms_memory_poll_interval &&
            memory_poll_timeout + privdata->sms_memory_poll_interval < time(NULL)) {
            at2_read_sms_memory(privdata);
            memory_poll_timeout = time(NULL);
        }

I tried to work it out but I don't get the way it tests against time(NULL). Hopefully someone can help.

+ It might help someone that I created a modems definition for the mc35, maybe this could be added to the cvs.

group = modems
id = siemens_mc35
name = "Siemens MC35"
detect-string = "SIEMENS"
detect-string2 = "MC35"
#As part of the initialization use both sim card and gsm modem (equipment) memory
init-string = "AT+CNMI=1,2,0,0,1+CPMS=MT,MT,MT"
# max specified speed.
speed = 115200
# use both sim card and gsm modem (equipment) memory
message-storage = MT
enable-hwhs = "AT\\Q3"
need-sleep = true
#hopefully this takes the least time.. Would be better to only run the polling AT command ?
keepalive-cmd = AT

To initialize the modem the first time I run kannel after a reboot I still have to load the at driver. Somehow this triggers something that at2 doesn't. Only need to do it once. I'm running the latest cvs version.

G.
---------------------------------------------------------
Giles Westwood | Web Developer
Tel: 0113 216 3983
Mob: 077646 111 48
Email: [EMAIL PROTECTED]
---------------------------------------------------------

Reply via email to