0

I am working with an app that uses ports 8000 and 9987 over wifi to talk to android devices. It works great on everything but my Google TV.

Here is part of what I get in my Java Console when I try to use it

...
Connecting to: http://192.168.2.9:8000/_version?version=71  
It did not work.java.net.ConnectException: Connection refused: connect  
java.net.ConnectException: Connection refused: connect  
...

That is the correct IP for the gtv.

Can it be done?

Gary F
  • 180
  • 1
  • 2
  • 8
  • I am looking at the AnyMote documentation. Seems like overkill when I just want those two ports to be open. But it looks interesting :-) – Gary F Mar 04 '13 at 21:15

1 Answers1

1

It is not clear from your description if the server component is running on the GTV device or the client. Also, you cannot assume that any particular port number would always be available to your apps. They could be used by other apps. You need to design assuming that you might not be able to bind to a particular port number. You could try a sequence of port numbers starting from your default port number, but make sure you have some way of uniquely identifying your process bound to a port. Or you could design a network broadcast discovery protocol that would tell your clients at which port the app is bound.

We have used port numbers like 8080 on GTV devices, so it is possible to use port numbers like that.

Leon Nicholls
  • 4,623
  • 2
  • 16
  • 17
  • The app starts on gtv and eventually hands things off to a server - somewhere... I have no control of the server. It does work on other android devices. Sounds like I can not do it on GTV. Thanks – Gary F Mar 04 '13 at 19:13