• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMDNS - IP and Port numbers

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic