Webthingify icon indicating copy to clipboard operation
Webthingify copied to clipboard

Moz Gateway 0.9.1 and webthings

Open MarcKarasek opened this issue 6 years ago • 7 comments

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 avatar Jan 13 '20 17:01 MarcKarasek

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..

MarcKarasek avatar Jan 13 '20 21:01 MarcKarasek

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

eisengrau avatar Jan 14 '20 09:01 eisengrau

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 avatar Jan 14 '20 15:01 MarcKarasek

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

MarcKarasek avatar Jan 22 '20 16:01 MarcKarasek

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.

MarcKarasek avatar Jan 22 '20 18:01 MarcKarasek

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.

eisengrau avatar Jun 24 '20 11:06 eisengrau

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.

freaktechnik avatar Jul 04 '20 13:07 freaktechnik