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

No results ? #7

Open
metal3d opened this issue Sep 5, 2014 · 3 comments
Open

No results ? #7

metal3d opened this issue Sep 5, 2014 · 3 comments

Comments

@metal3d
Copy link

metal3d commented Sep 5, 2014

Hi,

I'm trying to complete my tool by discovering xbmc jsonrpc service that is published via zeroconf.

Avahi-tools give me the correct output:

$ avahi-browse -a -d local
...
+ wlp2s0 IPv4 XBMC (raspbmc)                                _xbmc-events._udp    local
+ wlp2s0 IPv4 XBMC (raspbmc)                                _xbmc-jsonrpc-h._tcp local
+ wlp2s0 IPv4 XBMC (raspbmc)                                _xbmc-jsonrpc._tcp   local

But, taking your example in README, I've got no response...

package main

import (
    "fmt"
    "github.com/armon/mdns"
)

func main() {

    entriesCh := make(chan *mdns.ServiceEntry, 4)
    go func() {
        for entry := range entriesCh {
            fmt.Printf("Got new entry: %v\n", entry)
        }
    }()

    // Start the lookup
    mdns.Lookup("_xbmc-jsonrpc._tcp", entriesCh)
    close(entriesCh)
}

What am I doing wrong ?

Thanks :)

EDIT:

It seems that I can only lookup services on localhost. I tried with "_workstation._tcp" and the program only return my current computer...

@armon
Copy link
Member

armon commented Sep 7, 2014

Might be related to #6

@metal3d
Copy link
Author

metal3d commented Sep 12, 2014

Yeah, maybe... I tried the dns command with some names that are returned by avahi-browse and I've got no response...

@vodolaz095
Copy link

i have the same problem too

Got new entry: &{steel\ [70:18:8b:86:54:2b]._workstation._tcp.local. steel.local. 192.168.1.9 fe80::7218:8bff:fe86:542b 9  192.168.1.9 true true}
2014/11/03 02:00:41 [INFO] mdns: Closing client {0xc208032038 0xc208032040 0xc208032048 0xc208032050 true 0xc2080043c0 {1 0}}

when i have 5 PCs with avahi in my network, that can be seen by avahi discovery

@joshcarter joshcarter mentioned this issue Jun 1, 2015
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