Skip to main content
Alejandro Martin
Associate
April 25, 2017
Question

SPWF01SA Firebase

  • April 25, 2017
  • 2 replies
  • 1216 views
Posted on April 25, 2017 at 14:09

I am using an X-NUCLEO-IDW01M1 module to which I send AT commands and I want to authenticate in Firebase.

I open the socket and send the information, but the server always responds with an error.

Can you help me?

    This topic has been closed for replies.

    2 replies

    Gerardo GALLUCCI
    ST Employee
    April 25, 2017
    Posted on April 25, 2017 at 19:12

    Hi,

    can you please add more info? Some UART log, server URL, which kind of error, etc.

    BR

    j

    Alejandro Martin
    Associate
    April 25, 2017
    Posted on April 25, 2017 at 19:26

    I send with Tera Term to de module:

    AT+S.SOCKON=www.googleapis.com,443,s,ind

    AT+S.SOCKW=00,205

    POST /identitytoolkit/v3/relyingparty/verifyPassword?key=AIzaSyAWe3iwVt4wDuzZ6lDzav9m7x2G3IokoTQ

    Host: www.googleapis.com

    Content-Length: 60

    {'email':'

    mailto:electronica1@aviatel.com

    ','password':'123456'}

    And the server back to me:

    HTTP/1.0 411 Length Required

    Content-Type: text/html; charset=UTF-8

    Referrer-Policy: no-referrer

    Content-Length: 1564

    Date: Fri, 21 Apr 2017 19:01:46 GMT

    <!DOCTYPE html>

                   <html lang=en>

                                   <meta charset=utf-8>

                                                         <meta name=viewport content='initial-scale=1, minimum-scale=1, width=device-width'>

                                                 <title>Error 411 (Length Required)!!1</title>

                                                                                                <style>

              *{margin:0;padding:0}html,

    code{font:15px/22px arial,sans-serif}html{

    background:#fff;color:#222;

    padding:15px}body{margin:7% auto 0;max-width:390px;min-height:

    180px;padding:30px 0 15px}* > body{background:url(//

    http://www.google.com/images/errors/robot.png

    ) 100% 5px no-repeat;padding-right:205px}

    p{margin:11px 0 22px;overflow:hidden}ins{

    color:#777;text-decoration:

    none}a img{border:0}@media screen and (max-width:772px){body{

    background:none;margin-top:0;

    max-width:none;padding-right:

    0}}#logo{background:url(//

    http://www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png

    ) no-repeat;margin-left:-5px}@

    media only screen and (min-resolution:192dpi){#logo{

    background:url(//

    http://www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png

    ) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//

    http://www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png

    ) 0}}@media only screen and (-webkit-min-device-pixel-

    ratio:2){#logo{background:url(

    //

    http://www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png

    ) no-repeat;-webkit-background-

    size:100% 100%}}#logo{display:inline-

    block;height:54px;width:150px}

                                </style>

                                          <a href=//

    http://www.google.com/

    ><span id=logo aria-label=Google></span></a>

                    <p><b>411.</b> <ins>That’s an error.</ins>

                                                                  <p>POST requests require a <code>Content-length</code> header.  <ins>That’s all we know.</ins>

    Gerardo GALLUCCI
    ST Employee
    April 26, 2017
    Posted on April 26, 2017 at 21:50

    Try to set Content-type too. JSON?

    Alejandro Martin
    Associate
    April 26, 2017
    Posted on April 26, 2017 at 23:12

    I tryed, but nothing changes.