+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Newbie level 2
    Points: 18, Level: 1

    Join Date
    Feb 2019
    Posts
    2
    Helped
    0 / 0
    Points
    18
    Level
    1

    AT+CIPSEND >130 bytes send failed

    Hello I am new to the ESP8266 In this i have tried to send data to MQtt using CIPSEND AT command But in that i am facing some issues Could some one help me to solve this.

    The problem is when i am trying to send data to the Mqtt server using AT+CIPSEND the module re tunes SEND FAIL but, it was only when the total bytes is more than 130 if it is less than 130 bytes means returning SEND OK could you help me to solve this issue

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 52,005, Level: 55

    Join Date
    Apr 2011
    Location
    Minneapolis, Minnesota, USA
    Posts
    12,757
    Helped
    2540 / 2540
    Points
    52,005
    Level
    55

    Re: AT+CIPSEND >130 bytes send failed

    A signed variable with length one byte can be a value from -128 to +127. Does your program store your message length in a variable? Supposing it is dimensioned as 'one byte signed', then that could be the reason why you get an error from a message containing more than 127 characters. It is common for the sending computer to add 'eot' ('end of transmission') which adds 3 letters to the first 127, making 130.

    I could be wrong.



    •   AltAdvertisement

        
       

  3. #3
    Newbie level 2
    Points: 18, Level: 1

    Join Date
    Feb 2019
    Posts
    2
    Helped
    0 / 0
    Points
    18
    Level
    1

    Re: AT+CIPSEND >130 bytes send failed

    Quote Originally Posted by BradtheRad View Post
    A signed variable with length one byte can be a value from -128 to +127. Does your program store your message length in a variable? Supposing it is dimensioned as 'one byte signed', then that could be the reason why you get an error from a message containing more than 127 characters. It is common for the sending computer to add 'eot' ('end of transmission') which adds 3 letters to the first 127, making 130.

    I could be wrong.
    as iam new to it i cant get you can you explain it elaborately

    Hear iam send the character array when iam send array size of 129 byte it is publishing when it exceed 130byte only send fail.But in AT+CIPSEND can support themax length of 2048bytes



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 52,005, Level: 55

    Join Date
    Apr 2011
    Location
    Minneapolis, Minnesota, USA
    Posts
    12,757
    Helped
    2540 / 2540
    Points
    52,005
    Level
    55

    Re: AT+CIPSEND >130 bytes send failed

    Quote Originally Posted by Akash.Meras View Post
    as iam new to it i cant get you can you explain it elaborately
    My reply was merely speculation based on my experience with computers and communications and AT commands. I don't have specific experience with ESP8266 nor MQtt. For you to make progress may require knowledge of details in both those units, as to protocols for communications, necessary steps in opening a channel between sender and receiver, notifications of success or failure, etc.

    Consider further questions:

    * What do you see happening in the receiving unit? When transmission is successful? When it is not?

    * What does the receiver do with an incoming message?
    * Can it receive 2048 bytes?
    * Does it produce error notifications?
    * Can you command the units to display verbose messages at all times during a communication?

    It is common to have a buffer in the sender and receiver. It might be handled automatically or it may require that you set parameters.

    In the end you may need to break up a message into lengths that transmit successfully. Say 125 characters. Assemble the segments in the receiving computer.



--[[ ]]--