Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection refused on example code #7

Closed
crysxd opened this issue Oct 14, 2020 · 12 comments
Closed

Connection refused on example code #7

crysxd opened this issue Oct 14, 2020 · 12 comments

Comments

@crysxd
Copy link

crysxd commented Oct 14, 2020

Hi, I get a connection refused on the example code (basic). I filled in my project id, database secret (tested) and wifi data. The MKR1000 connects to wifi and is listed at the router.

Any idea how I can debug this? I use version 1.1.3

@crysxd
Copy link
Author

crysxd commented Oct 14, 2020

Never mind! My firmware was outdated. After trying for over 2h I just found out....
If anyone has the same issue: https://www.arduino.cc/en/Tutorial/FirmwareUpdater

Maybe it's a good idea to mention this either in the error message or here in the docs :)

@mobizt
Copy link
Owner

mobizt commented Oct 14, 2020

Ok thanks

@mobizt mobizt closed this as completed Oct 14, 2020
@InnerWar01
Copy link

Hi! I'm experiencing the same issue on the example code (connection refused). The firmware is updated to version 19.6.1 and the MKR1000 does connect to WiFi (it shows connected with IP...). I changed the database secret a couple of times still the same problem though.

@mobizt
Copy link
Owner

mobizt commented Apr 28, 2021

@InnerWar01

The library was test with my MKR1000 before I post this comment which it works normally without the problem.

Please try to upload certificate and also add the domain of your Firebase host.

@InnerWar01
Copy link

The Firebase host that I have is myproject-default-rtdb.europe-west1.firebasedatabase.app and for the certificate I am not sure which one to upload. Is it the authDomain?

@mobizt
Copy link
Owner

mobizt commented Apr 28, 2021

@InnerWar01
https://www.arduino.cc/en/Tutorial/FirmwareUpdater#certificate-uploading

Click add domain button and add your project host myproject-default-rtdb.europe-west1.firebasedatabase.app

@InnerWar01
Copy link

InnerWar01 commented Apr 28, 2021

Uploaded the certificate but still get a connection refused.

@mobizt
Copy link
Owner

mobizt commented Apr 28, 2021

@InnerWar01
No internet connectivity, check your router or WiFi hotspot.

Make sure access point is for 2.4G WiFi instead of 5G.

@InnerWar01
Copy link

I'm using a mobile hotspot, it says the broadcast channel uses 2.4GHz and the MKR1000 appears as connected devices.

@mobizt
Copy link
Owner

mobizt commented Apr 29, 2021

@InnerWar01

Let try to update the WiFi101 library.

You must provide the valid host in FIREBASE_HOST e.g. myproject-default-rtdb.europe-west1.firebasedatabase.app without schemes (https://) and backslash at the end.

For FIREBASE_AUTH, try to renew your database secret from Firebase project console.

If you're still cannot connect, the issue is on your device hardware.

Try to change the shorter USB cable to provide more stable power.

@InnerWar01
Copy link

Must be a hardware issue then, thanks for the help!

@gachet
Copy link

gachet commented Dec 7, 2021

@InnerWar01 https://www.arduino.cc/en/Tutorial/FirmwareUpdater#certificate-uploading

Click add domain button and add your project host myproject-default-rtdb.europe-west1.firebasedatabase.app

Nice it works, thanks a lot, It would have been better to explain this in the Readme or in te comments of Basic example, Thanks again,

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

No branches or pull requests

4 participants