thirtythreeforty / neolink

An RTSP bridge to Reolink IP cameras
https://www.thirtythreeforty.net/posts/2020/05/hacking-reolink-cameras-for-fun-and-profit/
GNU Affero General Public License v3.0
901 stars 152 forks source link

Media Deserialization error #270

Open x011 opened 2 years ago

x011 commented 2 years ago

Versions Neolink software: [2022-05-03T22:37:03Z INFO neolink] Neolink 50b12bd12421f2ee186b862e89a9e4149526caef release neolink 0.4.0 Reolink camera model and firmware: Reolink Argus PT - v3.0.0715_21112344

CPU

$ lscpu
Architecture:                    armv7l
Byte Order:                      Little Endian
CPU(s):                          4
On-line CPU(s) list:             0-3
Thread(s) per core:              1
Core(s) per socket:              4
Socket(s):                       1
Vendor ID:                       ARM
Model:                           4
Model name:                      Cortex-A53

I can watch all 3 cameras on a pc, but on the raspberry pi 3b using the same config file I get the following error:

[2022-05-03T22:36:48Z ERROR neolink::rtsp] Error streaming from camera portao, will retry in 1s: Error while streaming portao

    Caused by:
        0: Media Deserialization error
        1: Parsing error
[2022-05-03T22:36:48Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp write poll aborted
[2022-05-03T22:36:48Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp read poll aborted
vlebourl commented 2 years ago

Hey, I'm facing this as well, I'm not sure how much it impacts the streaming from neolink. I'm not versed into the art of package interception and network sniffing but I'd be happy to help if I can. Let me know!

QuantumEntangledAndy commented 2 years ago

@vlebourl Could you tell me your commit hash it's on the line like this when you run neolink

Neolink 50b12bd12421f2ee186b862e89a9e4149526caef release neolink 0.4.0

@x011 The commit hash you have with 50b12bd12421f2ee186b862e89a9e4149526ca should be good. But could please check that this is the same hash on your Pc and your rpi3. I ask because if your using my docker based rpi3 it may not have the newer code that handles the newer media packet format. So if you could just check that the commit hash is good on the rpi3 for me we could emliminate that as the source of issue.

vlebourl commented 2 years ago
❯ neolink --version
[2022-05-23T12:59:51Z INFO  neolink] Neolink a48cec8bcb8ca66b432b7fdcf3708453483ebe6e release
neolink 0.4.0
QuantumEntangledAndy commented 2 years ago

Ok so the commit a48cec8bcb8ca66b432b7fdcf3708453483ebe6e should have the necessary code. It is possible that Reolink are now using a newer format that is failing to deserialise. I would need a packet capture (or direct access to a camera) to debug this but I unfortunately do not have the time for that. It will just have to be an unsupported firmware until someone can find the time to reverse engineer it.

vlebourl commented 2 years ago

I can provide direct access to the a camera whenever needed, but I don't have the time nor the knowledge to do the reverse engineer myself... Let me know if you have more time at some point. Thanks anyways for the answer.