Ad Widget

Collapse

Expected [+CMGS: ] received [+CME ERROR: invalid input value]: For SMS alerts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • linuxlover.chaitanya
    Junior Member
    • Oct 2012
    • 1

    #1

    Expected [+CMGS: ] received [+CME ERROR: invalid input value]: For SMS alerts

    Hello all,

    I am new here on Zabbix forums and toZabbix as a whole.
    I have deployed Zabbix on Cent OS 6 64 bit system and on a whole I am really happy with it.
    I have been able to add servers to monitoring and make some few changes and add email alerting and actions. I have not yet tweaked graphs and templates and use the default.

    Now with the issue.
    I have been trying to use GSM modem connected to system using serial port to send SMS alerts. But somehow Zabbix is not able to send the alerts on SMS.

    Expected [+CMGS: ] received [+CME ERROR: invalid input value]
    This is what the error in the audit logs look like. And as there is no CME error code, I have not been able to decipher what went wrong and where and how to correct it. I am not sure what Zabbix is expecting and what it is receiving.
    I have searched Zabbix forums and google for the error but have found nothing. I may be searching something wrong.
    Anyone who has this error before or has any idea where should I start?

    PS: I am able to send SMS using minicom.

    Any help would be highly appreciated.

    Regards
    Chaitanya
  • Prometej
    Junior Member
    • Oct 2010
    • 21

    #2
    FILE sms.c
    Code:
    #define>ZBX_AT_ESC<---->"\x1B"
    #define ZBX_AT_CTRL_Z<->"\x1A"
    
    <------>zbx_sms_scenario scenario[] =
    <------>{
    <------><------>{ZBX_AT_ESC<--->, NULL<><------>, 0},<->/* Send <ESC> */
    <------><------>{"AT+CMEE=2\r"<>, ""/*"OK"*/<-->, 10},<>/* verbose error values */
    <------><------>{"ATE0\r"<----->, "OK"<><------>, 10},<>/* Turn off echo */
    <------><------>{"AT\r"><------>, "OK"<><------>, 10},<>/* Init modem */
    <------><------>{"AT+CMGF=1\r"<>, "OK"<><------>, 10},<>/* Switch to text mode */
    <------><------>{"AT+CMGS=\""<->, NULL<><------>, 0},<->/* Set phone number */
    <------><------>{number><------>, NULL<><------>, 0},<->/* Write phone number */
    <------><------>{"\"\r"><------>, "> "<><------>, 10},<>/* Set phone number */
    <------><------>{message<------>, NULL<><------>, 0},<->/* Write message */
    <------><------>{ZBX_AT_CTRL_Z<>, ""<--><------>, 20},<>/* Send message */
    <------><------>{NULL<-><------>, "+CMGS: "<--->, 30},
    <------><------>{NULL<-><------>, ""<--><------>, 10},
    <------><------>{NULL<-><------>, ""<--><------>, 5},<->/* ^Z */
    <------><------>{NULL<-><------>, NULL<><------>, 0}
    <------>};
    
    <------>zbx_sms_scenario<------>*step = NULL;
    <------>struct termios<><------>options, old_options;
    <------>int<---><------><------>f, ret = SUCCEED;
    Edit as I have in the code file sms.c.
    Recompile zabbih server and the problem is still with the three-error sending SMS (although sent 3 SMS) should disappear. Good luck to you.

    manual AT command from GSM Modems

    Comment

    Working...