Closed dkerr64 closed 1 year ago
This is kinda what the pause on client is for but it's currently not working right. The main issue is that we outsource our rtsp connections to gstreamer. However there's no simple way to detect if a client is connected in gstreamers api (something to do with how clients and streams are tracked separately). Currently I try to keep track if gstreamer is using our source but it seems to sometimes report false positives/negatives. I plan to look into alternatives once my current rewrite is done.
Also is this connecting to a camera with a UID? The whole udp connection is inefficient. I'm currently working on a rewrite to address this.
If I ever get the time I might try and write a pure rust rtsp which would also remove our gstreamer dependency and make this much easier to handle.
Okay, so yes... I got thinking about this overnight and realized that the right answer is the pause feature you are working on. The most efficient thing is to stop streaming from the camera which will preserve battery power there too. I hope you are successful getting that to work.
I am connecting to an Argus 3 Pro with the UID. I really wish I could connect by IP address but apparently that is not supported for battery powered cameras? I have several PoE powered Reolink cameras and like them, so I bought their battery WiFi as I needed to put it in a location that I could not run ethernet to. I was not expecting the restrictions that come with the battery power. I am hopeful this neolink tool is going to solve these.
I have never had a report of ip based connections working for battery but if you want to try it's port 9000 on whatever ip your device has. I've just managed to get my own battery powered camera and set it up yesterday so I'm hoping to be able to do some proper battery/UID optimisations soon.
The following hack fixes the 100% CPU problem...
while arc_abort_handle.is_live() {
let mut data = stream_data.get_data()?;
if data.is_empty() {
thread::sleep(std::time::Duration::from_millis(10));
} else {
let mut locked_output = output_thread.lock().unwrap();
for datum in data.drain(..) {
locked_output.stream_recv(datum?)?;
}
}
backoff.spin();
}
Diff here... https://github.com/dkerr64/neolink/commit/aa28b9b092c1dfe98562d1bb1fe95d984ecf0685
Adding a 10 millisecond sleep if there is no data to process reduced my CPU consumption to under 25%. I do not know if 10ms is the right value. Increasing it to 50ms made no difference. I consider this something of a hack, the network protocol should allow for the thread to sleep and wake only when new network traffic is received. But short of a major re-write, this at least helps.
I added metering to count how many times I was sleeping before data arrived and 10ms is far too short a sleep, 100ms is more appropriate. Changing from 10ms to 100ms has little impact on overall CPU consumption, but I am never seeing data arrive more frequently than every 100ms, so it makes sense to make the sleep duration higher. I tested with both a wired PoE camera and a WiFi battery camera.
David
Next build I'm working on completely removes the need for this and uses async green threads. You can test it on the tokio branch.
The tokio branch is now merged if you have time I'd appreciate a test to ensure that it is indeed not spinning needlessly now
I am not able to login to either my wired or wireless camera. It fails with the following (tail end of the log)...
[2023-02-22T19:53:10Z DEBUG neolink_core::bcudp::xml] Struct: start to parse "relay"
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched StartElement(relay, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched StartElement(ip, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched Characters(20.231.199.129)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched EndElement(ip)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched StartElement(port, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched Characters(51012)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched EndElement(port)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched EndElement(relay)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched StartElement(nat, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched Characters(NULL)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched EndElement(nat)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched StartElement(sid, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched Characters(435759455)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched EndElement(sid)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched StartElement(rsp, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched Characters(0)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched EndElement(rsp)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched StartElement(ac, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched Characters(435759455)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched EndElement(ac)
[2023-02-22T19:53:10Z DEBUG yaserde::de] Fetched EndElement(R2C_C_R)
[2023-02-22T19:53:11Z DEBUG neolink_core::bc::xml] Struct: start to parse "body"
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(body, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:11Z DEBUG neolink_core::bc::xml] Struct: start to parse "Encryption"
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(Encryption, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(type, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched Characters(md5)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched EndElement(type)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(nonce, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched Characters(63f672ad-oJ2cz6zVnMcfWb5YMLJj)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched EndElement(nonce)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched EndElement(Encryption)
[2023-02-22T19:53:11Z DEBUG neolink_core::bcudp::xml] Struct: start to parse "P2P"
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(P2P, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:11Z DEBUG neolink_core::bcudp::xml] Struct: start to parse "D2C_CFM"
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(D2C_CFM, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(sid, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched Characters(435759455)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched EndElement(sid)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(conn, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched Characters(local)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched EndElement(conn)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(rsp, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched Characters(0)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched EndElement(rsp)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(cid, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched Characters(436439944)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched EndElement(cid)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched StartElement(did, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched Characters(593)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched EndElement(did)
[2023-02-22T19:53:11Z DEBUG yaserde::de] Fetched EndElement(D2C_CFM)
[2023-02-22T19:53:11Z ERROR neolink::rtsp] Driveway: Fatal error: Driveway: Could not login to camera
Caused by:
Camera responded with Service Unavaliable
I observe that the camera discovery process looks different. There is a lot of logging of local (Camera's 192..168.x.y) and external (assigned to me by my ISP) and remote (relay?) IP addresses that simply did not appear in the past. I have not attempted to debug.
btw... Unavailable is spelt wrong in final error message.
Thanks David
Yes we now have three discovery methods. 1. local via broadcast 2. Remote via Reolink, 3. Relay were packets are funnelled through Reolink. I plan to disable 3 by default once I can confirm it works because I do not personally want to contact via them however certain cameras like cellular require it.
Could you send me your wireshark of the discovery it will help me find out what's wrong.
Your camera also connected via relay in this log you should me. Which is a bit odd since local should have succeeded first if your on the same network.
Here is trace level log of the full dialog. This is with a wired camera as it is "simpler" than the WiFi one. It (and the WiFi one) is correctly identifying the local IP address. I have redacted the UID from below log. Not sure about wireguard as I run the cameras on a VLAN that I do not ordinarily connect a "desktop" to. I can certainly tcpdump. It just halts at the end, I have to ctrl-C to get back to command line.
david@neolink:~/github/neolink$ RUST_LOG=trace ~/github/neolink/target/debug/neolink rtsp --config=/home/david/neolink.toml
[2023-02-23T00:42:51Z INFO neolink] Neolink 0.5.2 (unknown commit) debug
[2023-02-23T00:42:51Z WARN neolink::rtsp::gst] Missing the gstreamer plugin `x264 (gst-plugins-ugly)` for `x264enc` element. Required to paused certain cameras
[2023-02-23T00:42:51Z WARN neolink::rtsp::gst] Missing the gstreamer plugin `libav (gst-libav)` for `avdec_h264` element. Required to paused certain cameras
[2023-02-23T00:42:51Z WARN neolink::rtsp::gst] Missing the gstreamer plugin `libav (gst-libav)` for `avdec_h265` element. Required to paused certain cameras
[2023-02-23T00:42:51Z INFO neolink::rtsp] Starting RTSP Server at 0.0.0.0:8554
[2023-02-23T00:42:51Z INFO neolink::rtsp::states] Driveway: Connecting to camera at UID: <redacted>
[2023-02-23T00:42:51Z DEBUG neolink_core::bc_protocol] Trying uid <redacted>
[2023-02-23T00:42:51Z DEBUG neolink_core::bc_protocol] Starting Relay
[2023-02-23T00:42:51Z DEBUG neolink_core::bc_protocol] Starting Local discovery
[2023-02-23T00:42:51Z DEBUG neolink_core::bc_protocol] Starting Remote discovery
[2023-02-23T00:42:51Z TRACE mio::poll] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE
[2023-02-23T00:42:51Z TRACE mio::poll] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
[2023-02-23T00:42:51Z DEBUG neolink_core::bc_protocol::connection::discovery] Broadcasting to: [(255.255.255.255, 2015), (255.255.255.255, 2018), (192.168.21.255, 2015), (192.168.21.255, 2018), (192.168.17.255, 2015), (192.168.17.255, 2018)]
[2023-02-23T00:42:51Z TRACE mio::poll] registering event source with poller: token=Token(2), interests=READABLE | WRITABLE
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::discovery] client_id: 1231598911
[2023-02-23T00:42:51Z DEBUG neolink_core::bcudp::xml] Struct: start to parse "P2P"
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(P2P, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG neolink_core::bcudp::xml] Struct: start to parse "D2C_C_R"
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(D2C_C_R, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG neolink_core::bcudp::xml] Struct: start to parse "timer"
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(timer, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(def, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched Characters(3000)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(def)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(hb, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched Characters(10000)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(hb)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(hbt, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched Characters(60000)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(hbt)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(timer)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(rsp, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched Characters(0)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(rsp)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(cid, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched Characters(-383836324)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(cid)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(did, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched Characters(123)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(did)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(D2C_C_R)
[2023-02-23T00:42:51Z DEBUG neolink_core::bc_protocol] Local discovery success <redacted> at 192.168.21.35:40451
[2023-02-23T00:42:51Z DEBUG neolink_core::bc_protocol] Success
[2023-02-23T00:42:51Z INFO neolink::rtsp::states] Driveway: Logging in
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::bcconn] send Wait: Bc { meta: BcMeta { msg_id: 1, channel_id: 0, stream_type: 0, response_code: 56322, msg_num: 0, class: 25876 }, body: LegacyMsg(LoginMsg { username: "21232F297A57A5A743894A0E4A801FC\0", password: "D2C551299E323B1B50DD84E40C5D4F1\0" }) }
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::bcconn] send Complete
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: NewData: 0
[2023-02-23T00:42:51Z DEBUG neolink_core::bc::xml] Struct: start to parse "body"
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(body, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG neolink_core::bc::xml] Struct: start to parse "Encryption"
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(Encryption, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(type, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched Characters(md5)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(type)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched StartElement(nonce, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched Characters(3ECBBBA11576D000)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(nonce)
[2023-02-23T00:42:51Z DEBUG yaserde::de] Fetched EndElement(Encryption)
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::bcconn] send Wait: Bc { meta: BcMeta { msg_id: 1, channel_id: 0, stream_type: 0, response_code: 0, msg_num: 0, class: 25620 }, body: ModernMsg(ModernMsg { extension: None, payload: Some(BcXml(BcXml { encryption: None, login_user: Some(LoginUser { version: "1.1", user_name: "EBDE9DF8831362C69EC1938236A677C", password: "83320505113EA25E8202B4B3B4EEA75", user_ver: 1 }), login_net: Some(LoginNet { version: "1.1", type_: "LAN", udp_port: 0 }), device_info: None, version_info: None, preview: None, system_general: None, norm: None, led_state: None, talk_config: None, rf_alarm_cfg: None, talk_ability: None, alarm_event_list: None, ptz_control: None })) }) }
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::bcconn] send Complete
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE mio::poll] deregistering event source from poller
[2023-02-23T00:42:51Z TRACE mio::poll] deregistering event source from poller
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:51Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z DEBUG neolink_core::bcudp::xml] Struct: start to parse "P2P"
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched StartElement(P2P, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:52Z DEBUG neolink_core::bcudp::xml] Struct: start to parse "D2C_C_R"
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched StartElement(D2C_C_R, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:52Z DEBUG neolink_core::bcudp::xml] Struct: start to parse "timer"
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched StartElement(timer, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched StartElement(def, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched Characters(3000)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched EndElement(def)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched StartElement(hb, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched Characters(10000)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched EndElement(hb)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched StartElement(hbt, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched Characters(60000)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched EndElement(hbt)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched EndElement(timer)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched StartElement(rsp, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched Characters(0)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched EndElement(rsp)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched StartElement(cid, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched Characters(-383836324)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched EndElement(cid)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched StartElement(did, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched Characters(123)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched EndElement(did)
[2023-02-23T00:42:52Z DEBUG yaserde::de] Fetched EndElement(D2C_C_R)
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: UnexpectedData Discovery(UdpDiscovery { tid: 230, payload: UdpXml { c2d_s: None, c2d_c: None, d2c_c_r: Some(D2cCr { timer: Timer { def: 3000, hb: 10000, hbt: 60000 }, rsp: 0, cid: -383836324, did: 123 }), d2c_t: None, c2d_t: None, d2c_cfm: None, c2d_disc: None, d2c_disc: None, r2c_disc: None, c2m_q: None, m2c_q_r: None, c2r_c: None, r2c_t: None, r2c_c_r: None, c2r_cfm: None, c2d_a: None } }) from 192.168.21.35:40451
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacket: Ack
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: Resend
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Flushing
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.RecievedPacker: NewData: 1
[2023-02-23T00:42:52Z TRACE neolink_core::bc_protocol::connection::udpsource] UDPSource.State: Normal
[2023-02-23T00:42:52Z ERROR neolink::rtsp] Driveway: Fatal error: Driveway: Could not login to camera
Caused by:
Camera responded with Service Unavaliable
[2023-02-23T00:42:52Z TRACE mio::poll] deregistering event source from poller
^C
david@neolink:~/github/neolink$
Attached is tcpdump. The camera is 192.168.21.35 and neolink is 192.168.21.171. Interesting is that when neolink halts with an error the camera is still sending packets which of course is going nowhere. tcpdump.txt
Just a note that the tcpdump command I used was:
tcpdump -nvX -i eth0 host 192.168.21.35
So this did not capture the discovery because I filter on the IP address of the camera. I observe in that the first packet captured is from the camera to neolink. So does the discovery protocol pass the local IP address of neolink to the camera and then the camera initiates the connection? Interesting.
When I run tcpdump without filtering on host I can see broadcast packets going out on the net to ports 2015 and 2018. The first packet back from the camera is responding to one of those broadcasts.
I'm getting a 400 response code at line 110 of login.rs...
sub_login.send(modern_login).await?;
let modern_reply = sub_login.recv().await?;
if modern_reply.meta.response_code != 200 {
info!("Got a {:?} response", modern_reply.meta.response_code);
return Err(Error::CameraServiceUnavaliable);
}
Could you dump it with this
tcpdump -i eth0 host 192.168.21.35 -W tcpdump.pcap
So that it is in a format that wireshark can import please
Here you go. I confirmed that this loads into wireshark (tcpdump requires lowercase -w). Also attached is the corresponding trace from neolink. I had to zip the file as GitHub rejected pcap format tcpdump.pcap.zip trace.txt
Edited to add that it is late here (US eastern) so I can't do any more testing tonight.
Something I forgot to mention. One difference I noticed between the prior version and this one is that the modern login message from the new version is tagged with msg_num=0
while the prior one was tagged with msg_num=1.
Just in case that made any difference I forced this to 1 by initializing the variable to 1. Of course it made no difference. But does maybe suggest that some other messages were going back-and-forth to the camera in the prior version that is missing from this one.
I mention this because I forgot to blackout this change before capturing the above tcpdump/trace. So if you notice that in the trace and are wondering what is going on, this is why...
david@neolink:~/github/neolink$ git diff
diff --git a/crates/core/src/bc_protocol.rs b/crates/core/src/bc_protocol.rs
index b8a5c41..ded7cca 100644
--- a/crates/core/src/bc_protocol.rs
+++ b/crates/core/src/bc_protocol.rs
@@ -292,7 +292,7 @@ impl BcCamera {
debug!("Success");
let me = Self {
connection: Arc::new(conn),
- message_num: AtomicU16::new(0),
+ message_num: AtomicU16::new(1),
channel_id,
logged_in: AtomicBool::new(false),
credentials: Credentials::new(username, passwd),
david@neolink:~/github/neolink$
I simplified things by changing my config file to connect direct to the camera IP:9000 so no discovery required. Attached zip file has tcpdump capture of both old (working) and new (not working). You can see that things differ very quickly. There looks to be one exchange of packets after (or with) the legacy login which is not happening in the new version. Looking at packet size its possible that the new version is combining two into one? Archive.zip
I think it is going wrong at packet 8 (of new) which has 373 byte length. In the old I think this is two packets (12 and 14).
The problem with the tcpdump is that after the legacy login the data is encrypted. Where in neolink can we add a log message for the unencrypted data before it is sent, and after it is received?
My analysis of the network dump...
The "old" dump shows...
f0debc0a
010000001b0100000....
The "new" dump shows...
f0debc0a010000001b010000000...
observe that this is combination of packets 12 and 14 from the 'old' version. While the data is identical at the start, it differs later on in the packet. Possibly different encryption keys? Packets 6 and 10 are almost identical between runs, but I would hope that the keys change.0000 f0 de bc 0a 01 00 00 00 00 00 00 00 00 00 00 00 ................
0010 90 01 00 00 00 00 00 00 ........
Data: f0debc0a0100000000000000000000009001000000000000
[Length: 24]
90 01
represent 0x0190, or error 400.Hopefully this is enough to help implement a fix. Looks to me like the camera does not like data combined into a single packet.
David
Yes I think it has to do with your AES encryption. I changed the way encryption is setup during negotiation and I think I need to leave it using the weak BC encrypt for one more frame.
If you implement a fix you would like me to test can you put it into the features/jpeg branch please. Thanks
Fix should now be in master and features/jpeg
Thank you. Can confirm that I am able to login again. And also that streaming is no longer pegging CPU usage at 100%. Another issue has surfaced but that warrants its own issue I think. Will open a new one.
I think can close this one as fixed.
Ok I'll mark this as closed for now then
Simply running neolink rtsp causes the CPU to peg at 100%, even on my 4-core i7 container. It does this even if nothing is connected to the rtsp port and streaming. I assume this is because some transformation is taking place on every incoming packet from the camera.
This is very inefficient... the transformation should only take place if something is actually connected to the rtsp port. If not just throw away the packets without conversion.