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

WizardInternetBackendError or InternetBackendError #38

Closed
eaandersen opened this issue Oct 19, 2016 · 43 comments
Closed

WizardInternetBackendError or InternetBackendError #38

eaandersen opened this issue Oct 19, 2016 · 43 comments

Comments

@eaandersen
Copy link

I've attempted to pair/register more than one client to the same bluetooth controller and always receive the "InternetBackendError" error message. Can you please explain the error code?

@Emill
Copy link
Collaborator

Emill commented Oct 19, 2016

Yes. It means our server couldn't be reached. Do you have Internet
connection?

Could you possibly send me a Wireshark capture of the network traffic?

Den 19 okt. 2016 6:43 em skrev "eaandersen" notifications@github.com:

I've attempted to pair/register more than one client to the same bluetooth
controller and always receive the "InternetBackendError" error message. Can
you please explain the error code?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#38, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABlXat3lFoInY9PFRaKzG3A-ys_rkgFSks5q1kjJgaJpZM4KbM2M
.

@eaandersen
Copy link
Author

Thank you for the reply. I have an internet connection on the device. I connect to the RPi remotely without issue and there's no issues connecting to external repositories (i.e. node, python).

The device is connected to a corporate network and it is possible that traffic is blocked by a firewall. Is there a mechanism to add a client without connecting to the Flic server?

@Emill
Copy link
Collaborator

Emill commented Oct 19, 2016

Do you know if dns requests are blocked on your network? Such are made to a
bunch of public dns servers in the Flic executable.

Anyway, could you try an earlier release? There the requests are made a bit
different.

Den 19 okt. 2016 7:38 em skrev "eaandersen" notifications@github.com:

Thank you for the reply. I have an internet connection on the device. I
connect to the RPi remotely without issue and there's no issues connecting
to external repositories (i.e. node, python).

The device is connected to a corporate network and it is possible that
traffic is blocked by a firewall. Is there a mechanism to add a client
without connecting to the Flic server?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#38 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABlXaoe0p_SByzk-2OBJfQIliwOqsJ1Wks5q1lWFgaJpZM4KbM2M
.

@eaandersen
Copy link
Author

Can you please specify the name(s) of the public DNS servers and the flic server name? I will test it out using host or dig from the terminal

As for the earlier release, which one do you recommend? beta v0.1?

@Emill
Copy link
Collaborator

Emill commented Oct 20, 2016

The used servers are 208.67.222.222, 8.8.8.8 and 209.244.0.3. The host "api.flic.io" is the one to be resolved.

You can test beta v0.1. It doesn't have the scan wizard so you have to simply start scan manually and then connect manually when you see it advertises in public mode.

@pfink
Copy link

pfink commented Oct 20, 2016

I have exactly the same problem. First button was verified, but I'm not able to verify more buttons, always getting WizardInternetBackendError. I captured the traffic using Wireshark and two bridged network interfaces on my Windows PC where Wireshark is installed (one interface connected to my RPI, the other one to my router). Just sent the *.pcapng file to flic@shortcutlabs.com

Pinging api.flic.io from my RPI:

ping api.flic.io
PING awseb-e-m-awsebloa-11wojfo0di1sp-1758411329.us-east-1.elb.amazonaws.com (54.209.22.83) 56(84) bytes of data.
^C
--- awseb-e-m-awsebloa-11wojfo0di1sp-1758411329.us-east-1.elb.amazonaws.com ping statistics ---
161 packets transmitted, 0 received, 100% packet loss, time 160010ms

@pfink
Copy link

pfink commented Oct 20, 2016

Remark: I'm not connected to a corporate network or stuff like that, just using a normal router from my ISP. No firewalll for outgoing traffic configured.

@pfink
Copy link

pfink commented Oct 20, 2016

Remark 2: Unlikely that 2 people experiencing this issue at exactly the same time even if the current version is released since July, isn't it? Maybe something is wrong with the verificaton server?

@Emill
Copy link
Collaborator

Emill commented Oct 20, 2016

I checked your wireshark capture and everything looked fine there...
I'll look more into the issue tomorrow.
Could you just tell me, when you try to do the pairing, is the internet error coming out directly or after like 10 seconds? Also, does the flicd program print anything to its console log?

@pfink
Copy link

pfink commented Oct 20, 2016

Thank you!

Output of simpleclient:

startScanWizard
Please click your Flic button!
Found private button. Please hold down it for 7 seconds to make it public.

<now I'm holding the button for 7 seconds, after that the following messages directly appear>

Found public button 80:xx:da:xx:c9:4b F01xxxlL, connecting...     // id + MAC address masked by me
Connected, now pairing and verifying...

<very short delay here, maybe 500ms or less>

Scan wizard done with status WizardInternetBackendError

Output of flicd:

Accepted new client
server error 0              //appears at the exact same time as WizardInternetBackendError

@Emill
Copy link
Collaborator

Emill commented Oct 21, 2016

Could you try this: https://drive.google.com/open?id=0B-kW5rSvtUYnb29hNkpUT0xEaGs on your Raspberry Pi?
It adds some logging in the flicd output from the web request.

@pfink
Copy link

pfink commented Oct 21, 2016

Hi,
I just tried with your patched version, but behaviour is exactly like before, no additional log messages.

@Emill
Copy link
Collaborator

Emill commented Oct 21, 2016

Right.. try this one :)
I added even more logging
https://drive.google.com/open?id=0B-kW5rSvtUYnQWJldTBLN1pQOEk

@pfink
Copy link

pfink commented Oct 21, 2016

I don't know why, but with this version it works fine! After I successfully added a second button, I switched back to the original flicd version to be sure and tried to connect a third button -> error message appears. Switching back to your patched version and trying to connect the third button again -> works fine.

I always used the same sqlite db for everything.

Log of a verify process on the patched version which worked fine:

Accepted new client
Connected
Wrote 98
Got 1024 bytes
Got 1024 bytes
Got 848 bytes
Got 1024 bytes
Got 1024 bytes
Got 897 bytes
Wrote 635
Got 91 bytes
Got 1024 bytes
incoming data 953 byes
Got 58 bytes
Incoming 1 0
got close
send close
Server response length: 953
First line: HTTP/1.1 200 OK
Wrote 69
Closing

@Emill
Copy link
Collaborator

Emill commented Oct 21, 2016

That's strange... There is nothing different among them at all except the logging. Maybe you could try a few other times?

@pfink
Copy link

pfink commented Oct 21, 2016

Ah, now I could reproduce the error with the version with logging (tried to connect again with a new db):

Accepted new client
Connected
Wrote 98
Got 1024 bytes
Got 1024 bytes
Got 848 bytes
Got 1024 bytes
Got 176 bytes
Got 1024 bytes
Got 721 bytes
Wrote 635
Got 91 bytes
Got 1024 bytes
incoming data 949 byes
Got 58 bytes
Incoming 1 0
got close
send close
Wrote 69
Closing
server error 0

@eaandersen
Copy link
Author

I used the original beta version (v.0.1) to test multiple devices and it worked fine. All of the devices were successfully registered in the sqlite database. To test out the newer release, I copied the sqlite database pre-populated from v0.1 to the folder with the latest release and all 4 buttons work nicely.

You may want to patch v.0.3 with networking methods included in the original version.

As a workaround, I'm ok to use v0.1 to populate new devices in the database and move it to the newer release folder.

@Emill
Copy link
Collaborator

Emill commented Oct 21, 2016

Ahaaa, found the bug.
Try this one now, it should always work: https://drive.google.com/open?id=0B-kW5rSvtUYnbnRRM2lCUnBVblE

@pfink
Copy link

pfink commented Oct 21, 2016

Works great, successfully tested 5 button verifications 2 times 👍

@eaandersen
Copy link
Author

Thank you for the update. Are you planning to push the changes to Github? Or do you prefer we use the file uploaded to Google Drive?

@Emill
Copy link
Collaborator

Emill commented Oct 25, 2016

Yes I'll update the github repo as soon I get time.

Den 24 okt. 2016 8:15 em skrev "eaandersen" notifications@github.com:

Thank you for the update. Are you planning to push the changes to Github?
Or do you prefer we use the file uploaded to Google Drive?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#38 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABlXaokThGotxFIlf_GguatmIykimHLGks5q3PWhgaJpZM4KbM2M
.

@idserda
Copy link

idserda commented Nov 10, 2016

I'm having this same issue, but then on a regular Ubuntu system. When will a binary for this be available?

Emill added a commit that referenced this issue Nov 10, 2016
Emill added a commit that referenced this issue Nov 10, 2016
@Emill
Copy link
Collaborator

Emill commented Nov 10, 2016

@idserda I just created a new release. Could you try that one?

@Korydween
Copy link

@Emill just for the feedback, I'm currently working with the new release and it works perfectly! Thanks.

@Emill Emill closed this as completed Nov 21, 2016
@Christiandk1986
Copy link

I am having this issue also from the newest github verison. How do I resolve?

@Emill
Copy link
Collaborator

Emill commented May 30, 2020

This is an already fixed issue. Exactly what issues do you have?

@Christiandk1986
Copy link

When I try to connect I get the following error (RPI 4, running 32bit Raspbian):

startScanWizard
Please click and hold down your Flic button!
Found private button. Please hold down it for 7 seconds to make it public.
Found public button 80:e4:da:74:XXXX F023dCiI, connecting...
Connected, now pairing and verifying...
Scan wizard done with status WizardInternetBackendError

@Emill
Copy link
Collaborator

Emill commented May 30, 2020

Have you managed to connect the button to an Android or iOS device successfully?
If you have and fliclib-linux-hci doesn't work, please capture the network traffic using Wireshark, as well as run "sudo btmon" in a separate terminal to log the bluetooth packets, and post the results after a failed attempt.

@Christiandk1986
Copy link

I have paired the buttons many times before - always with ease. I do also have all the button adresses written down - am I able to use those to connect without the ScanWizcard?

@Emill
Copy link
Collaborator

Emill commented May 30, 2020

Yes, but that won't make any difference. ScanWizard is simply a utility that performs scan and then connects.

@Christiandk1986
Copy link

Bluetooth monitor ver 5.50
= Note: Linux version 4.19.118-v7l+ (armv7l) 0.153041
= Note: Bluetooth subsystem version 2.22 0.153046
= New Index: DC:A6:32:B1:XX:XX (Primary,UART,hci0) [hci0] 0.153049
= Open Index: DC:A6:32:B1:XX:XX [hci0] 0.153051
= Index Info: DC:A6:32:B1:XX:XX (Cypress Semiconductor Corporation) [hci0] 0.153052
@ USER Open: flicd (privileged) version 2.22 {0x0002} [hci0] 0.153056
@ MGMT Open: bluetoothd (privileged) version 1.14 {0x0001} 0.153059
@ MGMT Open: btmon (privileged) version 1.14 {0x0003} 0.153114

@Christiandk1986
Copy link

What am I looking for in Wireshark (rather than posting the entire log, which is huge)

@Christiandk1986
Copy link

Update: I have just tried installing a fresh Rasbian on a Pi Zero W and I keep getting the same error.

@Cyriuz
Copy link

Cyriuz commented May 31, 2020

I have the same issue I think on a RPI 4 with hassio; the flicd output is:

TLS alert error: 46
server error 0

I can't seem to ping api.flic.io either but it answers on http

@Emill
Copy link
Collaborator

Emill commented May 31, 2020

@Cyriuz Do you use the latest published flicd here?
https://api.flic.io/ping could be used to test the server.

@davidjabon
Copy link

I also consistently keep getting the WizardInternetBackendError when attempting to connect the button to RaspberryPi Zero. The button connects fine to a phone. I made sure to remove it from the phone before attempting to connect it to the RaspberryPi.

@davidjabon
Copy link

ping api.flic.io doesn't work, perhaps by design.

wget https://api.flic.io/ping returns

--2020-05-31 15:45:26-- https://api.flic.io/ping
Resolving api.flic.io (api.flic.io)... 52.203.43.128
Connecting to api.flic.io (api.flic.io)|52.203.43.128|:443... connected.
ERROR: The certificate of ‘api.flic.io’ is not trusted.
ERROR: The certificate of ‘api.flic.io’ has expired.

curl https://api.flic.io/ping returns correctly: {"success":true}

@Cyriuz
Copy link

Cyriuz commented May 31, 2020

@Emill Using latest from here yes.

Both wget and curl work fine for me for api.flic.io, even inspecting the cert everything looks fine.

Can I somehow get more info from flicd which certificate it has a problem with?

@Emill
Copy link
Collaborator

Emill commented May 31, 2020

For some reason the web server chose to send an expired intermediate certificate that affects some TLS clients. It should be fixed now so could you please try again?

@Christiandk1986
Copy link

Thx - It is working now!

@Cyriuz
Copy link

Cyriuz commented May 31, 2020

Yes, it works now, thank you!

@Emill
Copy link
Collaborator

Emill commented May 31, 2020

Nice! and sorry for the inconvenience...

@davidjabon
Copy link

Thanks. It works now.

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

8 participants