Closed hblanken closed 11 months ago
Further testing reveals:
./neolink image --config=neolink.toml --file-path=/XX/neolink 4Gcam1 --use-stream
[2023-07-26T06:26:46Z INFO neolink] Neolink 52ad743bea54e545e834ab48eca6d35d97155af3 release
[2023-07-26T06:26:46Z INFO neolink::utils] 4Gcam1: Connecting to camera at UID: 95270005EUHXX
[2023-07-26T06:26:46Z INFO neolink_core::bc_protocol] 4Gcam1: Trying map discovery
[2023-07-26T06:26:51Z INFO neolink_core::bc_protocol] 4Gcam1: Trying relay discovery
[2023-07-26T06:26:53Z INFO neolink_core::bc_protocol] 4Gcam1: Relay success 95270005EUHXXX at 20.124.250.86:55278
[2023-07-26T06:26:53Z INFO neolink::utils] 4Gcam1: Logging in
[2023-07-26T06:26:55Z INFO neolink::utils] 4Gcam1: Connected and logged in
[2023-07-26T06:26:58Z INFO neolink::image::gst] appsrc name=thesource ! h265parse ! decodebin ! jpegenc snapshot=TRUE
! filesink location=/XX/neolink.jpeg
thread 'tokio-runtime-worker' panicked at 'A Tokio 1.x context was found, but it is being shutdown.', /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.27.0/src/runtime/time/entry.rs:553:13
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
I have also difficulties to connect to the cellular camera GO PT with the snapshot function. Sometimes it works without any changes in the config sometimes don't. Also the regular streaming function works sometimes and sometimes don't. If I leave it running after some hours sometimes it connects. Perhaps this log helps
@nhzgh Could you test using #123, builds are here or docker pull quantumentangledandy/neolink:fix-async_lookup_and_register
it attempts to address some discovery issues
@hblanken if your issue is just the discovery then please try the above too. If there is something else let me know.
The tokio panic might not be an issue is may just be a result of the way I terminate the threads before everything finishes shutting down. Do you still get the picture in this case?
Do you still get the picture in this case?
Yes I do.
thanks for the quick update; I still get mixed results here. I attach two logs: first is a failed one, the second one is with success. same settings.
success log is to long to insert here… I attached only the last part. Before are 5 times errors with
neolink_1 | Error: Failed to connect to the camera, check credentials and network
neolink_1 |
neolink_1 | Caused by:
neolink_1 | 0: Failed to connect to camera orto at UID: XXXXX on channel 0
neolink_1 | 1: Cannot contact camera at given address
@nhzgh your log suggests that you are not using the build I linked. Please use the neolink with the bug fixes and try again
@nhzgh I have actually merged the bug fixes into master now, so you could also just download v0.5.15
Strange I downloaded on macOS and on docker and both say
Neolink e384fb6153366f10cf77b4c43f6e8e49bfbc0949 release
Ah nevermind I misread the commit hash :(.
I tried again with master 42ee79051240077587388fcf61ab3dd036b56f16 When it fails it exits fast, when it succeeds it seem to try a little bit longer. Could I log something else?
The best log would probably be trace level of just neolink_core. But trace level is only avaliable on debug builds. You'd have to compile from source
Hmm looking at your log file the relay port from the R2C_C_R is always zero. For some reason reolink is not sending a valid relay ip/port. How are your wireshark/tcpdump skills? This might be easier to see in the network packets. Since in the log I can only see one half of the communincations
I have done a Wireshark dump of one failed attempt Terminal via neolink 2023-08-03 um 10.04.45.pcap.zip
Ah the dump suggests that neolink is considering zero port connections as valid. I will change that, and see if it helps.
Ok can you try #125 build will be here when ready in about an hour
Thank you now it seems to work on the first try!
Merged and now done in v0.5.16
Describe the bug Image cannot be captured via cellular Reolink Go Plus
I can connect to Reolink Go Plus via cellular discovery, awesome!! 👍 Even though main video stream is choppy, but substream is stable. (I am still optimising the gstreamer and ffmpeg settings) It takes 3-4 map and relay discovery attempts and then connects.
To Reproduce bug Steps to reproduce the behavior. Example:
Create configuration file: [[cameras]] name = "4Gcam1" username = "xxx" password = "xxx" uid = "95270005XXXXXX" discovery = "cellular"
Launch Neolink:
./neolink image --config=neolink.toml --file-path=/XX/neolink 4Gcam1
./neolink image --config=neolink.toml --file-path=/XX/neolink 4Gcam1 --use-stream
image capture fails
Expected behavior should use cellular method for discovery, map and relay trys once and then exits. Maybe further retries will fix this
Versions Neolink software: latest release Reolink camera model and firmware: Reolink Go Plus 3.0
neolink::utils] 4Gcam1: Connecting to camera at UID: 95270005EXXXXX [2023-07-26T06:14:58Z INFO neolink_core::bc_protocol] 4Gcam1: Trying map discovery [2023-07-26T06:15:04Z INFO neolink_core::bc_protocol] 4Gcam1: Trying relay discovery [2023-07-26T06:15:09Z INFO neolink_core::bc_protocol] 4Gcam1: Discovery failed Error: Failed to connect to the camera, check credentials and network