2017-04-25 05:09 AM
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?
2017-04-25 10:12 AM
Hi,
can you please add more info? Some UART log, server URL, which kind of error, etc.
BR
j
2017-04-25 10:26 AM
I send with Tera Term to de module:
AT+S.SOCKON=www.googleapis.com,443,s,ind
AT+S.SOCKW=00,205POST /identitytoolkit/v3/relyingparty/verifyPassword?key=AIzaSyAWe3iwVt4wDuzZ6lDzav9m7x2G3IokoTQHost: www.googleapis.comContent-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=//
><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>
2017-04-26 02:50 PM
Try to set Content-type too. JSON?
2017-04-26 04:12 PM
I tryed, but nothing changes.
2017-04-27 02:46 AM
Add HTTP/1.1 in the first line (take a look
)