Ad Widget

Collapse

SMS Problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crusader-2004
    Junior Member
    • Mar 2010
    • 3

    #1

    SMS Problems

    23 Dec 2010 22:43:29 SMS not sent 0 | Expected [+CMGS: ] received []

    I get this error in my "Audit" section.
    Cause of this error I get every error and recovery sms three times, which is very much annoying.

    I've found this forum entry:

    Which in #20 says, setting the modem speed to 115200 should solve the problem. Which is all well so far but, if I try to set this baud rate I get this error:

    stty 115200 -F /dev/ttyUSB0
    stty: /dev/ttyUSB0: unable to perform all requested operations

    I can't find a working solution for that problem, some say it could be some driver error some others it is some locked device, anyway it definitly does work with minicom. My question now would be, is there some other way to tell zabbix directly to change the modem connection speed to 115200 so it would connect with this rate by default. That's what minicom is doing since I changed the setting there, and as I already explained minicom does definitly work.

    Any help would be great.
    Thank you in advance.
    Best regards
    Sebastian
  • crusader-2004
    Junior Member
    • Mar 2010
    • 3

    #2
    I am really the only one having this problem?

    Comment

    • volodei
      Junior Member
      • Apr 2011
      • 2

      #3
      Hi!
      Sorry for my bad english

      I have this problem too. When I do "stty -f /dev/ttyU0.0 115200", I have not some errors. But speed of ttyU0.0 dont change, and I have three sms again.

      Comment

      • verus
        Member
        • Feb 2009
        • 67

        #4
        this is the same problem as I have and there are posts about it since 2004 but it seems that zabbix programmers don't want to change anything about it and don't want to give a solution...
        Even if a lot of people have this problem.

        Comment

        • Prometej
          Junior Member
          • Oct 2010
          • 21

          #5
          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...