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

Moz Gateway 0.9.1 and webthings #11

Open
MarcKarasek opened this issue Jan 13, 2020 · 7 comments
Open

Moz Gateway 0.9.1 and webthings #11

MarcKarasek opened this issue Jan 13, 2020 · 7 comments

Comments

@MarcKarasek
Copy link

MarcKarasek commented Jan 13, 2020

I cloned your app and built it. Installed on a Nexus 6 running carbon rom.
Server on phone (port 8088) runs fine. When I try to find it on the gateway it says paring as failed?

Wil post some logs when I get the gateway back up.. it has lost its settings for add-ons and I need to reset things.

@MarcKarasek
Copy link
Author

MarcKarasek commented Jan 13, 2020

Finally got the gateway back up:

Here is a log from the gatewat ssh:

2020-01-13 22:52:35.938 INFO : thing-url: Starting mDNS discovery
2020-01-13 22:52:46.690 INFO : thing-url: Failed to connect to http://192.168.8.159:8088: FetchError: request to http://192.168.8.159:8088/ failed, reason: connect ECONNREFUSED 192.168.8.159:8088
2020-01-13 22:53:09.418 INFO : Pairing timeout
2020-01-13 22:53:09.429 ERROR : Thing was not added
2020-01-13 22:53:09.435 ERROR : addNewThing cancelled

2020-01-13 22:02:44.964 INFO : thing-url: Adapter: ThingURLAdapter id thing-url-adapter pairing cancelled

The server is running on the phone.
I have tried both http and https configured under web-things add-on.. Both are the same failed ECONNREFUSED..

@eisengrau
Copy link

Mentioned similar issue in #10, closed it. This definitely relates. The difference in my case that I ran the gateway on a Debian host.

@MarcKarasek
Copy link
Author

I have compiled the app from the latest src on github and tried this (shoudl be against webthigns 0.12) which is also what the gateway I have is on..

same behavior ECONNREFUSED

@MarcKarasek
Copy link
Author

? Did you have to do anything on the phone to open port 8088?

@MarcKarasek
Copy link
Author

I have checked my phone via OS Monitor and it does not show the phone listening on port 8088.
/proc/net/tcp shows other ports but nothing listening on the webthing server port.

@eisengrau
Copy link

Could be that I have my phone rooted, it was listening on 8088, however the issue remains, it seems like the latest gateway is not compatible with the app.

@freaktechnik
Copy link
Owner

A quick test suggests that with the latest webthing library, the port that is specified is not the port that is bound - though that may also be an issue with android, where 8088 doesn't work without root. However, if I then make a request on the proper port, it seems to crash with java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern : %�NJ for which I have no idea where it'd come from.

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

3 participants