Open deftdawg opened 1 year ago
As an added sanity check I built it from source on both NixOS and Ubuntu...
curl -LO https://download.silicondust.com/hdhomerun/libhdhomerun.tgz
# nix-shell -p gnumake # on Nix
make
The result is the same... no devices found
on nixos; hdhomerun device 10142C7C found at 192.168.0.19
on KDE Neon
Running sudo hdhomerun_config discover
also did not make a difference.
Could this be some kind of firewall or networking restriction on NixOS?
I've figured out the problem...
Wireshark shows the UDP broadcast originates from a random port (i.e. 57656
) destined for 65001
on the tuner, the response is sent to back from the tuner (65001
) to port libhdhomerun broadcast from (57656
), which is then dropped by the nixos firewall because the port is not a valid destination.
This means the documentation included in the nix for libhdhomerun is misleading: https://github.com/NixOS/nixpkgs/blob/3c7aa07f180ea32026c7c708fcfee6a2448f773a/pkgs/development/libraries/libhdhomerun/default.nix#L5
Rather the user must allow traffic be accepted from the UDP source port 65001
like this:
[deftdawg@maxsun:~]$ hdhomerun_config discover
no devices found
[deftdawg@maxsun:~]$ sudo iptables -I nixos-fw -p udp --sport 65001 -j nixos-fw-accept
[deftdawg@maxsun:~]$ hdhomerun_config discover
hdhomerun device 10142C7C found at 10.0.0.11
Will test if this is effective in /etc/nixos/configuration.nix
:
networking.firewall.extraCommands = "iptables -I nixos-fw -p udp --sport 65001 -j nixos-fw-accept"; # libhdhomerun
UPDATE: After a reboot, I can confirm the above configuration.nix firewall.extraCommands does resolve the problem.
@sielicki
Do you use ipv6?
Do you use ipv6?
I've not specifically enabled it, but my nic does have both IPv4 and IPv6 addresses and my router has public IPv4 and IPv6 addresses.
Wireshark shows the traffic as being IPv4.
Why do you ask?
Describe the bug
I have a HDHomeRun Dual (HDHR-US),
libhdhomerun
/hdhomerun_config discover
is not able to see the device at all, though the device is accessible from a web browser and ping-able from the same machine.The device is operational as shown by![image](https://user-images.githubusercontent.com/4991612/227750265-99d4e35e-4762-44e8-959f-f847ab303f4a.png)
hdhomerun_config
running on an KDE Neon (Ubuntu) machine in the bottom half of this screenshot:I can also stream with it to both Android and IOS devices on the same network.
Steps To Reproduce
Steps to reproduce the behavior:
libhdromerun
to pkgs in nixos/configuration.nixhdhomerun_config discover
Expected behavior
See bottom half of second screenshot where the HDHR device is discovered and it's
device_id
and IP are displayed.Notify maintainers
@titanous
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.