Closed iam-TJ closed 5 months ago
Answering my own question (again!). It turns out that neolink fails if there is no IPv4 default route set. It might be worth adding a check for that since it is non-trivial to diagnose. On the amd64 host (not the Raspi AP) I added the Raspi as the default gateway:
sudo ip addr add default via 10.254.1.65
$ ./neolink rtsp --config=argusPT.toml
[2023-10-30T23:43:15Z INFO neolink] Neolink e47a0d5734b0a06b53bd8d78be9ca2f6b8396480 release
[2023-10-30T23:43:15Z INFO neolink::rtsp] Starting RTSP Server at 10.254.1.66:8554
[2023-10-30T23:43:15Z INFO neolink::rtsp] argusPT: Rtsp Staring
[2023-10-30T23:43:15Z INFO neolink::utils] argusPT: Connecting to camera at UID: 95270004T22YP1W5
[2023-10-30T23:43:15Z INFO neolink_core::bc_protocol] argusPT: Trying local discovery
[2023-10-30T23:43:17Z INFO neolink_core::bc_protocol] argusPT: Local discovery success 95270004T22YP1W5 at 10.254.1.64:18304
[2023-10-30T23:43:17Z INFO neolink::utils] argusPT: Logging in
[2023-10-30T23:43:18Z INFO neolink::utils] argusPT: Connected and logged in
[2023-10-30T23:43:18Z INFO neolink::common::camthread] argusPT: Camera time is already set: 2023-10-30 15:39:14.0 +08:00:00
[2023-10-30T23:43:19Z INFO neolink::common::neocam] argusPT: Model Reolink Argus PT
[2023-10-30T23:43:19Z INFO neolink::common::neocam] argusPT: Firmware Version v3.0.0.1045_22061301
[2023-10-30T23:43:20Z INFO neolink::rtsp] argusPT: Avaliable at /argusPT/main, /argusPT/Main, /argusPT/mainStream, /argusPT/MainStream, /argusPT/Mainstream, /argusPT/mainstream, /argusPT
[2023-10-30T23:43:21Z INFO neolink::rtsp] argusPT: Avaliable at /argusPT/sub, /argusPT/Sub, /argusPT/subStream, /argusPT/SubStream, /argusPT/Substream, /argusPT/substream
It failed initially since I had a password ="password"
in the configuration; removing that gave the successful connection shown above. The error was:
[2023-10-30T23:42:48Z ERROR neolink::common::camthread] Login credentials were not accepted
The default gateway doesn't have to lead anywhere - as long as there is one set neolink
succeeeds! On the Raspi I set its gateway to the amd64 host!
So all cameras I have seen are ipv4 only. The reolink servers only take and distribute ipv4 addresses too, so I wrote the code remote/map/relay to reflect this. For local though I think I tried to keep it working on both,
The default bind in neolink is 0.0.0.0
though, so that might be the issue
Closing this as there is not much actionable changes here, we cannot connect to an ipv4 camera if we do not have an ipv4 route
Describe the bug
``No discovery packet is broadcast when
discovery = "local"`Occurs on both Debian 12 amd64 (and Raspbian 12 armhf).
strace
reports:Changing the configuration to use the IPv4 address:
There's a
termshark
(tshark/tdump) monitoring the interface the Argus PT is connected to and no packets are seen originating fromneolink
for either UID or address discovery methods.The local network is IPv6 only and only routes IPv6 externally; I've added a DHCP server on the LOCAL virtual bridge interface for RFC1918 private addresses and the camera uses DHCPv4 to gain its IPv4 of 10.254.1.64 (no sign of it using the IPv6RA nor DHCPv6). The camera immediately starts making DNS queries to a non-existent DNS server (and not-locally-used) at
192.168.1.31
initially asking forpushx.reolink.com
and after a few failures,p2p.reolink.com
. I assume the DNS server address is hard-coded in the camera firmware.I'd like to resolve why neolink is not managing to send the discovery packet. I've tried using `bind = "10.254.1.65" but that seems only relevant to the RTSP server socket.
Another data point: earlier I did a full
nmap
scan of the camera's IPv4 address (nmap -n -p1-65535
) and no ports were discovered open - is this expected?The camera is new; I connected it to the WiFi access point using the Android app QR-code method. (the AP is the RaspberryPi
noc
runninghostapd
and bridging the wireless and wired ports on the virtual bridgeLOCAL
).Anything I can do to help solve this I will; up to and including patching and recompiling.