xbmc / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.
https://kodi.tv/
Other
18.5k stars 6.3k forks source link

ARM/Android Kodi fails WoL for DLNA #18856

Open gccfla opened 3 years ago

gccfla commented 3 years ago

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

On Android, "Settings>System>Power saving>Try to wakeup remote servers on access" draws a "MACdiscover failed for 192.168.1.92".

Expected Behavior

Here is a clear and concise description of what was expected to happen:

Silence? Or maybe a reassuring message saying MAC address had been ascertained?

Actual Behavior

MAC address, needed for WoL somehow fails.

Possible Fix

Way above my pay grade!

To Reproduce

Steps to reproduce the behavior:

  1. Install working MiniDLNA server with functioning WoL on Linux box and use requisite magic to tell Kodi about it.
  2. Enable "Try to wakeup remote servers on access" in Settings
  3. See the dialog, hear the bell.

Debuglog

The debuglog can be found here:

https://paste.kodi.tv/ujotuhayes.kodi -- problem starts around line 234

Screenshots

Here are some links or screenshots to help explain the problem:

Sorry if I'm missing info. "Team Kodi" on IRC #kodi asked me to submit a bug report. I did my best.

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

All my Kodi boxes are Android. Log is from MiBox4, but same problem on NVidia Shield.

Your Environment

Used Operating system:

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

lrusak commented 3 years ago

I would hedge a bet that the default selinux policy will deny using SIOCGARP on android.

https://android.googlesource.com/platform/system/sepolicy/+/refs/heads/master/public/ioctl_macros

It would be interesting to know if this problem is specific to android though.

The function in question is here https://github.com/xbmc/xbmc/blob/master/xbmc/platform/android/network/NetworkAndroid.cpp#L105

gccfla commented 3 years ago

I installed Kodi 18.9 from Fedora repository on my Linux box (uname -r is 5.9.9-100.fc32.x86_64). I do not get "MAC discover failed..." warning, nor is there a corresponding message in debug log. So your SIOCGARP hypothesis may be right. But ioctl() is a hornets' nest I've lately managed to avoid.

Alas, my sleeping MiniDLNA remains comatose when I try to explore its contents. My tpcdump fu is weak, but after disabling my firewall (which I really hate doing),

# tcpdump -UlnXi enp0s10 ether proto 0x0842 or udp port 9

comes up empty, telling me (I think), no WoL packets are sent.

github-actions[bot] commented 3 months ago

This issue is now marked stale because it has been open over a year without activity. Remove the stale label or add a comment to reset the stale state.