Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMDNS - IP and Port numbers

 
Mike NotTelling
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I'm a little stuck in a project I'm making for my Android phone. The project is a simple controller for my Raspberry Pi running XBMC. What I'm trying to do is send some play, pause, next, etc commands to it via http, using the XBMC JSON API.

At the moment, I can send the commands with no problem. However, my method already assumes I know the IP and Port number of the Pi. For example, this command will send XBMC to the home screen:



As you can see, the Port number is 80. But what if someone else has a different ip and port number? It won't work. So, what I'm trying to do is use the JMDNS library to locate my Pi on the wi-fi network, thus saving the user the hassle of manually typing in the IP and Port. But, for some reason the JMDNS library is returning this address:

192.168.0.103:9

Port number 9? What's port number 9? It should be 80. And I can't understand why it isn't. The code obviously works because the IP and hostname are both correct, but this port 9 is really confusing me.

So, I guess my question is this: Does anyone here have any experience with JMDNS and zeroconf on the Android, and also, why wouldn't it return port 80 as expected?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic