Ad Widget

Collapse

Zabbix 1.4.4 SMS not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johanpre44
    Member
    • Apr 2006
    • 40

    #1

    Zabbix 1.4.4 SMS not working

    I have a Fedora 7 Box with Zabbix installed (from Fedora Repo) and configured to send emails/SMS's. Emails working fine, but the actins tab reports and error:
    "Expected [OK] received [รบAT+CMEE=2ERROR]"

    Changing the Deguglevel to 4 (for zabbix_server) and checking the log files, I get these lines:
    27360:20080108:163224 Write to GSM modem [ESC]
    27360:20080108:163224 Write to GSM modem [AT+CMEE=2^M]
    27360:20080108:163224 Read from GSM modem [ESC<FA>ESCAT+CMEE=2^MERROR^M]
    27360:20080108:163224 Write to GSM modem [^MESC^Z]
    27360:20080108:163224 Read from GSM modem []
    27360:20080108:163224 Query [update alerts set retries=retries+1,error='Expected [OK] received [ESC<FA>ESCAT+CMEE=2ERROR]' where alertid=5254]

    Using Minicom I do get an error if I "AT+CMEE=2"

    But I can execute the following commands in Minicom without problems:
    AT
    OK
    AT+CMGF=1
    OK
    AT+CMGS="xxxyyyzzzz"
    > testing123
    >
    +CMGS: 17
    AT
    OK

    Please help
    PS: My GSM/SMS device (Teltonika TModemCOM) is based on the Nokia i12 Engine.
  • johanpre44
    Member
    • Apr 2006
    • 40

    #2
    Some More info

    AT+CMEE=1 in minicom returns an OK.

    According to an AT command reference for GSM devices, it seems that all AT+CMEE=2 does is set the Error messages to Verbose rather than Numeric (Don't think my Device supports it then) - AT+CMEE=? returns the support Error messages, which is only 0 and one for my device.

    How can I change this?

    Comment

    • johanpre44
      Member
      • Apr 2006
      • 40

      #3
      AT Commands to get Device Info

      AT+CGMI
      Nokia

      OK
      AT+CGMM
      Nokia 12i

      OK
      AT+CGMR
      V5.11
      26-01-05
      RX-2
      (c) NMP.

      OK
      AT+CGSN
      352540002565967

      Comment

      • alexander
        Junior Member
        • Sep 2007
        • 4

        #4
        2topicstarter
        i've had such error as you.
        my solution is to modify in .../zabbix-1.4.4/src/libs/zbxsms/sms.c this line:
        {"AT+CMEE=2\r" , "OK" , 5 },
        to
        {"AT+CMEE=2\r" , "ERROR" , 5 },
        and recompile...
        works great

        Comment

        • vipp
          Junior Member
          • Jan 2007
          • 10

          #5
          I have the same problem. I tried what you said and now i get this instead.

          Expected [ERROR] received [AT+CMEE=2]

          what can i do the get this working. I am at a lose.

          Thanks for any help.

          Comment

          • alexander
            Junior Member
            • Sep 2007
            • 4

            #6
            if you had
            Expected [SOMETHING] received [EXAMPLE]

            you should try to modify in .../zabbix-1.4.4/src/libs/zbxsms/sms.c this line:
            {"AT+CMEE=2\r" , "SOMETHING" , 5 },
            to
            {"AT+CMEE=2\r" , "EXAMPLE" , 5 },
            and recompile... it should works... SOMETHING AND EXAMPLE are strings that zabbix expected and recived (look in your error message for details)


            how it works?
            zabbix writing AT commands to modem and wait for modem's answer, then compare answer to value which writen in .../zabbix-1.4.4/src/libs/zbxsms/sms.c
            Some commands like AT+CMEE=2 are not critical for sending sms, some are critical, so if you got such error, then modify code and zabbix says that sms sended, but you don't recive it it's mind that command, wich you modify is critical and problem is in your gsm-modem setup...

            sorry for my english =)

            Comment

            • danic
              Junior Member
              • Jan 2008
              • 3

              #7
              sms

              Hi,

              I have the same problem.

              I have correctly connected my gsm modem and i can send sms manually in the console, but zabbix can not send my sms.

              I can not understand the solution for this.

              What is the file to repair the values of the gsm modem, it is necessary to recompile?

              Thanks

              Comment

              • NOB
                Senior Member
                Zabbix Certified Specialist
                • Mar 2007
                • 469

                #8
                SMS: Hint for the developers

                Hi

                this won't help you guys today, but maybe you and others in the future.

                Years ago I had to support a software which waits for calls on a modem line.
                Not that much different than sending SMS but much
                less complex than that, indeed.
                In order to support different modem types I used the library "terminfo"
                so the user could specify a known type of modem or even add a new specification for his model.

                I know, there is a software library called "modemcap" (like termcap for
                terminals) which should do the trick. But either terminfo or termcap is
                available on most Linux/UNIX Systems, anyway.

                I suggest using one of these libraries in the future instead of hard-coded
                request/response strings which fail for some modems but work
                for others. Well designed, this will reduce the number of problems by
                just adding one more (optional ?) dependency of the server on another library.
                I think it's worth thinking about and implementing it !

                Regards

                Norbert.

                Comment

                • ufocek
                  Senior Member
                  • Aug 2006
                  • 161

                  #9
                  Hi

                  I have question where I can put pin code permanently to gsm modem?

                  Albert

                  Comment

                  • John Yta
                    Junior Member
                    • Jan 2008
                    • 3

                    #10
                    to alexander, THANKS !! SMS now works fine!.

                    Comment

                    • ufocek
                      Senior Member
                      • Aug 2006
                      • 161

                      #11
                      Hi

                      I configured my gsm modem Hueawai E220, zabbix send me sms but in action "status table" all the time status is "not sent" but I received sms
                      Zabbix get error: Expected [+CMGS: ] received [] or Expected [OK] received []

                      this is a bug or something else?

                      Comment

                      • alexander
                        Junior Member
                        • Sep 2007
                        • 4

                        #12
                        2danic:
                        "I have correctly connected my gsm modem and i can send sms manually in the console, but zabbix can not send my sms."

                        what zabbix says in monitoring / actions ?

                        "Telepathists in holiday" (с) linux.org.ru

                        "What is the file to repair the values of the gsm modem"
                        /<path to zabbix sourcecode>/src/libs/zbxsms/sms.c

                        "it is necessary to recompile?"
                        Yes, if you will use my solution.

                        2ufocek:
                        "I have question where I can put pin code permanently to gsm modem?"

                        AT+CPIN="<code here>"

                        "this is a bug or something else?"
                        Ask developers =) i think my solution should help with your troubels

                        2John Yta:
                        you're welcome

                        2all: sorry for my english ))
                        Last edited by alexander; 29-01-2008, 11:46.

                        Comment

                        • fableman
                          Member
                          • Oct 2007
                          • 78

                          #13
                          Would be good if the developers hade a text file that we could add with the AT commands we wanted to be used to access all kind of different GSM modems out there.

                          Not everyone is compiling zabbix froum source some are installing from RPM's and cant recompile it.

                          Kinda old thinking to force peopel to change the source code and recompile to get there modems to work.

                          And Zabbix 1.4.4 dont report any errors in log files regarding SMS send errors.!

                          Comment

                          • bee
                            Senior Member
                            • Jun 2007
                            • 133

                            #14
                            still not works

                            Hi,
                            I just got iTegno WM1080A1E for my ZABBIX server. My ZABBIX running under FreeBSD 6-STABLE, and i successfully send a sms from minicom using /dev/cuad0.
                            Unfortunetly, opposite happen with zabbix and the sms alert never reach my mobile phone.
                            I have follow what alexander said:
                            1.
                            HTML Code:
                            change {"AT+CMEE=2\r"  , "OK"       , 5     } to {"AT+CMEE=2\r"  , "ERROR"       , 5     }
                            2. try to comment out {"AT+CMEE=2\r" , "ERROR" , 5 }.
                            Code:
                                   zbx_sms_scenario scenario[] = {
                            /*  0  */       {ZBX_AT_ESC     , NULL          , 0     },      /* Send <ESC> */
                            /*  1   {"AT+CMEE=2\r"  , "ERROR"       , 5     },      verbose error values */
                            /*  1  */       {"ATE0\r"       , "OK"          , 5     },      /* Turn off echo
                            /*  2  */       {"AT\r"         , "OK"          , 5     },      /* Init modem */
                            /*  3  */       {"AT+CMGF=1\r"  , "OK"          , 5     },      /* Switch to tex
                            /*  4  */       {"AT+CMGS=\""   , NULL          , 0     },      /* Set phone num
                            /*  5  */       {number         , NULL          , 0     },      /* Write phone n
                            /*  6  */       {"\"\r"         , "> "          , 5     },      /* Set phone num
                            /*  7  */       {message        , NULL          , 0     },      /* Write message
                            /*  8  */       {ZBX_AT_CTRL_Z  , "+CMGS: "     , 40    },      /* Send message
                            /*  9  */       {NULL           , "OK"          , 1     },      /* ^Z */
                            /* EOS */       {NULL           , NULL          , 0     }
                                            };
                            3. do configure and make && make install

                            but still never received sms, is there something that i miss?

                            Thanks,
                            BEE

                            Comment

                            • bee
                              Senior Member
                              • Jun 2007
                              • 133

                              #15
                              Hi,
                              is there any comment or clue?i'm getting very frustration with it. Most of suggested way had been tried without no luck, and now i do upgrade my zabbix server to:
                              Code:
                              ZABBIX Server (daemon) v1.4.4 (17 December 2007)
                              Compilation time:  Feb  8 2008 17:10:42
                              but again, have no luck.

                              What did i miss?

                              Thanks,
                              BEE

                              Comment

                              Working...