Re: [PATCH] smsc_at2.c error string

Alvaro Cornejo <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi Vincent

Is that in the latest CVS?

I got this as error string:


cat /var/log/kannel/x1p7_movimx2.log |grep -i error |more

2009-06-18 06:08:41 [29762] [14] DEBUG: AT2[movimx2]: <-- +CMS ERROR:
no network service
2009-06-18 06:08:41 [29762] [14] ERROR: AT2[movimx2]: CMS ERROR: +CMS
ERROR: no network service
...

2009-06-18 21:16:59 [29762] [13] DEBUG: AT2[movimx1]: <-- +CMS ERROR: congestion
2009-06-18 21:16:59 [29762] [13] ERROR: AT2[movimx1]: CMS ERROR: +CMS
ERROR: congestion
...

2009-06-18 07:28:05 [29762] [14] DEBUG: AT2[movimx2]: <-- +CMS ERROR:
unassigned (unallocated) number
2009-06-18 07:28:05 [29762] [14] ERROR: AT2[movimx2]: CMS ERROR: +CMS
ERROR: unassigned (unallocated)
number
2009-06-18 07:28:40 [29762] [14] DEBUG: AT2[movimx2]: memory check error
2009-06-18 07:28:40 [29762] [14] ERROR: AT2[movimx2]: Couldn't connect
(retrying in 10 seconds).
2009-06-18 07:30:16 [29762] [14] DEBUG: AT2[movimx2]: <-- +CMS ERROR:
unassigned (unallocated) number
2009-06-18 07:30:16 [29762] [14] ERROR: AT2[movimx2]: CMS ERROR: +CMS
ERROR: unassigned (unallocated)
number
2009-06-18 07:31:54 [29762] [14] DEBUG: AT2[movimx2]: <-- +CMS ERROR:
no network service
2009-06-18 07:31:54 [29762] [14] ERROR: AT2[movimx2]: CMS ERROR: +CMS
ERROR: no network service
2009-06-18 07:32:41 [29762] [14] DEBUG: AT2[movimx2]: <-- +CMS ERROR: congestion
2009-06-18 07:32:41 [29762] [14] ERROR: AT2[movimx2]: CMS ERROR: +CMS
ERROR: congestion
2009-06-18 07:33:00 [29762] [14] DEBUG: AT2[movimx2]: <-- +CMS ERROR:
unassigned (unallocated) number
2009-06-18 07:33:00 [29762] [14] ERROR: AT2[movimx2]: CMS ERROR: +CMS
ERROR: unassigned (unallocated)
number
2009-06-18 07:34:56 [29762] [14] DEBUG: AT2[movimx2]: <-- +CMS ERROR:
no network service
2009-06-18 07:34:56 [29762] [14] ERROR: AT2[movimx2]: CMS ERROR: +CMS
ERROR: no network service
2009-06-18 07:35:47 [29762] [14] DEBUG: AT2[movimx2]: memory check error
2009-06-18 07:35:47 [29762] [14] ERROR: AT2[movimx2]: Couldn't connect
(retrying in 10 seconds).
2009-06-18 07:37:04 [29762] [14] DEBUG: AT2[movimx2]: <-- +CMS ERROR: congestion
2009-06-18 07:37:04 [29762] [14] ERROR: AT2[movimx2]: CMS ERROR: +CMS
ERROR: congestion

...

2009-06-18 12:23:06 [29762] [14] DEBUG: AT2[movimx2]: <-- +CMS ERROR:
network out of order
2009-06-18 12:23:06 [29762] [14] ERROR: AT2[movimx2]: CMS ERROR: +CMS
ERROR: network out of order

...

I use:

Kannel bearerbox version `cvs-20090513'. Build `May 12 2009 19:25:12',
compiler `4.1.2 20070626 (Red Hat 4.1.2-13)'.


Regards

Alvaro



|-----------------------------------------------------------------------------------------------------------------|
Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via
SMS y GPRS online
              Visitenos en www.perusms.NET www.smsglobal.com.mx y
www.pravcom.com



On Thu, Jun 18, 2009 at 11:17 AM, Vincent
CHAVANIS<[email protected]> wrote:
> This is already as it.
>
> error(0, "AT2[%s]: +CMS ERROR: %s (%d)", octstr_get_cstr(privdata->name),
> at2_error_string(errcode), errcode);
>
> Vincent.
>
>
> Alvaro Cornejo a écrit :
>>
>> Hi Vincent
>>
>> Might it be possible to show the message error number/code in the
>> error message text? This way it will be easyer to google for
>> additional information.
>>
>> someting like:
>>
>>
>>     case 0:
>>         /*
>>          * Station cannot be reached because, although the number is in a
>>          * valid format, it is not currently assigned (allocated).
>>          */
>>        return "[0] Unassigned (unallocated) number (+CMS) or No
>> connection to phone (+CME)";
>>    case 2:
>>        return "[2] Phone-adaptor link reserved";
>>     case 3:
>>         /*
>>          * This can be a lot of things, depending upon the command,
>> but in general
>>          * it relates to invaid parameters being passed.
>>          */
>>         return "[3] Operation / Parameter(s) not supported";
>>    case 5:
>>        return "[5] PH-SIM PIN required";
>> ...
>>
>>     default:
>>        return "[code] Error number unknown. Ask google and add it";
>>
>> This will also help people parse the logs
>>
>> Regards
>>
>> Alvaro
>>
>>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.