Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Arduino + ESP8266 - Problems using Modem from Contrib #362

Open
rafaelb4rreto opened this issue Jun 28, 2018 · 3 comments
Open

Arduino + ESP8266 - Problems using Modem from Contrib #362

rafaelb4rreto opened this issue Jun 28, 2018 · 3 comments

Comments

@rafaelb4rreto
Copy link

rafaelb4rreto commented Jun 28, 2018

Hello!

As discussed in post #297 , the files from contrib/src/modem seems to have wrong #includes.
So I put all the files from /contrib/src/modem and from /contrib/src/modem/db and the contrib/src/SerialTransceiver.h renamed to "SerialTransceiver2.h" in the same dir of the sketch and changed the #includes untill the code from the sketch get sucessfully compiled.
The sketch is a copy of the example in /contrib/examples/FirebaseSerialTerminal_ESP8266/FirebaseSerialTerminal_ESP8266.ino (for test the protocol from the terminal). The only modification in the .ino was "#include <SerialTranceiver.h>" to "#include "SerialTranceiver2.h""

Opening the terminal, the ESP8266 send "Connected: 192.168.bla.bla". Ok!
Then I put the command "BEGIN_DB <my_host> <my_secret>" and the board send "+OK". Cool!

But when I put "SET blabla" or "NETWORK" or "SET: blabla" it returns "-FAIL Invalid command 'SET'.
", for exemple.
AND the most strange is that the board understand the command "GET", but it always returns something like: "GET /blabla.json: connection refused".

Has anyone got this working? Does someone know what is happening? Thanks!

@kotl
Copy link
Collaborator

kotl commented Jun 28, 2018 via email

@rafaelb4rreto
Copy link
Author

rafaelb4rreto commented Jun 30, 2018

Ok! I will suggest a pull when I fix it.

I fixed this bug: But when I put "SET blabla" or "NETWORK" or "SET: blabla" it returns "-FAIL Invalid command 'SET'.", for exemple.

Basically the binary_search() in firebase-arduino/contrib/src/modem/SerialTransceiver.cpp, line 28, was not working.

But now all the others commands return "-FAIL GET /blabla.json: connection refused", for exemple.

I dont know what to do anymore.

@rafaelb4rreto
Copy link
Author

Using the FirebaseDemo_ESP8266 example I had the same output of the #357 and it never get connected:

"
connected with abcdefg-P2, channel 1
dhcp client start...
wifi evt: 0
.....ip:192.168.17.33,mask:255.255.255.0,gw:192.168.17.1
wifi evt: 3
.
connected: 192.168.17.33
[HTTP-Client][begin] host: abcdefg.firebaseio.com/ port: 443 url: /number.json?auth=Q23eQzlxbK2laaabbbnAdmrbxq6QpppoooFXMGZm httpsFingerprint: B8 4F 40 70 0C 63 90 E0 07 E8 7D BD B4 11 D0 4A EA 9C 90 F6
[hostByName] request IP for: abcdefg.firebaseio.com/
[hostByName] Host: abcdefg.firebaseio.com/ lookup error: -5!
[HTTP-Client] failed connect to abcdefg.firebaseio.com/:443
[HTTP-Client][returnError] error(-1): connection refused
[HTTP-Client][returnError] error(-4): not connected
[HTTP-Client][end] tcp is closed
setting /number failed:
"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants