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

Player discovery doesn't appear to work #7

Open
grawity opened this issue Sep 11, 2014 · 7 comments
Open

Player discovery doesn't appear to work #7

grawity opened this issue Sep 11, 2014 · 7 comments
Labels

Comments

@grawity
Copy link

grawity commented Sep 11, 2014

If I'm understanding the UI correctly, opening the "Players" screen should list all discovered players in the LAN. However, it shows nothing at all, besides the title.

I have both Avahi and mpd running on my laptop (3rd line):

Laptop$ avahi-browse -arkp | grep wlan0 | grep IPv4
+;wlan0;IPv4;rain;_ssh._tcp;local
+;wlan0;IPv4;rain;_sftp-ssh._tcp;local
+;wlan0;IPv4;grawity\064rain;_mpd._tcp;local
+;wlan0;IPv4;RAIN;_smb._tcp;local
+;wlan0;IPv4;grawity\064rain;_pulse-server._tcp;local
+;wlan0;IPv4;grawity\064rain\058\032Built-in\032Audio\032Analog\032Stereo;_pulse-source._tcp;local
+;wlan0;IPv4;grawity\064rain\058\032Cedar\032HDMI\032Audio\032\091Radeon\032HD\0325400\0476300\032Series\093\032Dig;_pulse-sink._tcp;local
+;wlan0;IPv4;grawity\064rain\058\032Built-in\032Audio\032Analog\032Stereo;_pulse-sink._tcp;local
+;wlan0;IPv4;rain\032\09148\0585d\05860\058e8\05865\0588f\093;_workstation._tcp;local
+;wlan0;IPv4;grawity\039s\032laptop;_http._tcp;local
=;wlan0;IPv4;rain;_ssh._tcp;local;rain.local;192.168.1.6;22;
=;wlan0;IPv4;rain;_sftp-ssh._tcp;local;rain.local;192.168.1.6;22;
=;wlan0;IPv4;grawity\064rain;_mpd._tcp;local;rain.local;192.168.1.6;6600;
=;wlan0;IPv4;RAIN;_smb._tcp;local;rain.local;192.168.1.6;445;
=;wlan0;IPv4;grawity\064rain;_pulse-server._tcp;local;rain.local;192.168.1.6;4713;"cookie=0xb34f6dd1" "fqdn=rain.nullroute.eu.org" "uname=Linux x86_64 3.16.2-1-ARCH #1 SMP PREEMPT Sat Sep 6 13:12:51 CEST 2014" "machine-id=067d8bfe341b445487660bf2c983c2ec" "user-name=grawity" "server-version=pulseaudio 5.0"
=;wlan0;IPv4;grawity\064rain\058\032Built-in\032Audio\032Analog\032Stereo;_pulse-source._tcp;local;rain.local;192.168.1.6;4713;"form-factor=internal" "class=sound" "product-name=5 Series/3400 Series Chipset High Definition Audio" "vendor-name=Intel Corporation" "icon-name=audio-card-pci" "description=Built-in Audio Analog Stereo" "subtype=hardware" "channel_map=front-left,front-right" "format=s16le" "channels=2" "rate=44100" "device=alsa_input.pci-0000_00_1b.0.analog-stereo" "cookie=0xb34f6dd1" "fqdn=rain.nullroute.eu.org" "uname=Linux x86_64 3.16.2-1-ARCH #1 SMP PREEMPT Sat Sep 6 13:12:51 CEST 2014" "machine-id=067d8bfe341b445487660bf2c983c2ec" "user-name=grawity" "server-version=pulseaudio 5.0"

But the only mDNS queries the laptop receives are for _googlecast._tcp services.

I noticed the app has its own mDNS library. Maybe it conflicts with Android's built-in mDNS support? (I'm running 4.4.4 on Nexus 5.)

@eisnerd
Copy link
Owner

eisnerd commented Sep 11, 2014

It would be better to be just falling back to JmDNS for older androids, like https://github.com/dongyunli/zeroService, but I use Mupeace on 4.4.4 as well as Jelly Bean and Gingerbread. There are JmDNS updates I can try as well as android.net.nsd, but I'm struggling to guess where the issue is or how to debug it, so those would be shots in the dark.

Would you be able to check logcat for errors or warnings around the time of opening the view?

Thanks for posting the above details.

@eisnerd
Copy link
Owner

eisnerd commented Sep 11, 2014

https://github.com/eisnerd/dmix/raw/c83aec8aea9aca5f9bc1d94710ca4a8ed84d5010/Mupeace-debug.apk has an update JmDNS, in case it makes any difference. On a quick try it seems worse to me, actually.

@grawity
Copy link
Author

grawity commented Sep 11, 2014

logcat doesn't seem to have anything when opening the player discovery:

I/ActivityManager(  746): START u0 {cmp=org.musicpd.android/.ServerBonjourListActivity} from pid 16341
D/dalvikvm(16341): GC_FOR_ALLOC freed 1031K, 11% free 19293K/21508K, paused 16ms, total 17ms
I/ActivityManager(  746): Displayed org.musicpd.android/.ServerBonjourListActivity: +122ms
D/dalvikvm( 1227): GC_FOR_ALLOC freed 492K, 5% free 18874K/19844K, paused 22ms, total 23ms
D/dalvikvm( 1227): GC_FOR_ALLOC freed 437K, 5% free 18921K/19844K, paused 15ms, total 15ms
W/Mupeace (16341): Disconnecting (15000 ms timeout)
D/JMPDComm(16341): Mpd command : close

(It does freeze for maybe two seconds after returning...)

I tried Mupeace-debug.apk and it doesn't seem to be any different.

@eisnerd
Copy link
Owner

eisnerd commented Sep 13, 2014

https://github.com/eisnerd/dmix/raw/downloads/Mupeace-debug.apk now has a build with mdnsjava instead of JmDNS. It's loads faster for me and more likely to get bug fixes if that's where the problem lies.

@grawity
Copy link
Author

grawity commented Sep 13, 2014

Yes, this version does work. (Though it shows grawity\@rain instead of grawity@rain, but that's okay.)

@grawity
Copy link
Author

grawity commented Sep 13, 2014

(I also tested whether the player list updates automatically; if I start mpd, it shows up in the list instantly, but does not disappear when stopped. So after a few mpd restarts, I had four identical player entries. It's not really an issue though.)

@eisnerd
Copy link
Owner

eisnerd commented Sep 13, 2014

Ah. It should update. I switched to a CopyOnWriteArrayList, but the deletes were done through an iterator and, "Element-changing operations on iterators themselves (remove, set, and add) are not supported." Thanks for testing this. I hadn't even bothered to try that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants