Attached to this message is a patch to at2 to have
modem definitions outside the source
I want you to test it and check if it's working and
some comments/advise to some issues:
1. I'm opening a "kannel.conf" that is hard
coded on the code. It's not easy to pass the full
Cfg struct to smsc_at2, and it's not easy to pass
the config filename also. If we have a modem-def
configuration with the filename value in smsc
group, there's gonna be several modem-def for each
smsc = at2. How can
I say to at2 where is kannel.conf ?
now that we have a include directive in
configuration, at2
could read directly a modems.conf or the normal kannel.conf that includes the
modems.conf, or have the modems groups directly
at kannel.conf
2. at2_read_modems returns a ModemDef * structure.
I should do a gw_free(ModemDef), but what
about the Octstr inside it ? (I haven't yet looked
at list* functions). gw_free destroys everything,
or should I do a destroy_modemdef() and
octstr_destroy every octstr and then gw_free the ModemDef?
3. the function at2_read_modems accept id string or
idnumber. This way, we could directly read the
modem definition for the modemtype, or cicle
through it until returning NULL in detect_modem, as you
can see at the code
4. I've tested with Ericsson T68 and Nokia 6210
with success, defining modemtype and/or speed or
letting kannel detect the modem and
speed
(I haven't yet discovered the right at+cnmi
for ericsson :((( )
5. grp = list_extract_first(grplist) returns a
CfgGrp, shouldn't I destroy it later ? list_destroy(grp, NULL)
gaves me an error and list_destroy((List*) grp,
NULL) crashes :(
6. in modems definition, I've included a
keepalive-cmd. This way, I can set ericsson and Nokia to do a
AT+CBC;+CSQ and receive +CBC: 0,63 (on batery, 63%
full) and +CSQ: 15,99 (gsm signal quality) :)
7. At line 520, I've set timeout waiting for +CPIN
reply to 10 seconds, could you test it with the that
modem that takes too
long to reply?
8. added a colon to +CMT search (+CMTI:) to prevent
it from receiving +CMTI:
9. Where's the sim/me memory patch ?
;)
I'll wait for comments.
|
diff
Description: Binary data
modems.conf
Description: Binary data