Comments (71)
As far as I can tell the camera is replying that it lacks the capability to set what we requested. I think perhaps we have to send a different set of commands for this model. I'll try capturing the command with my eco2e maybe it's the same as the eco.
from neolink.
That's what we are trying to figure out. I have a test build I'm working on that more closely follows the format of Reolink. Will hopefully send it to you later
from neolink.
It waits for ability information and checks that we have rfAlarm_rw
premissions.
from neolink.
Enable trace level logging and try again.
export RUST_LOG=trace
Then post the log here so I can see what the camera sent in reply.
from neolink.
Here it is.
from neolink.
Just to confirm this is what we want to turn on/off
from neolink.
This is the message for controlling this:
- Client
Magic | Message ID | Message Length | Encryption Offset | Status Code | Message Class | Payload Offset |
---|---|---|---|---|---|---|
f0 de bc 0a | d5 00 00 00 | 04 05 00 00 | 00 00 00 1a | 00 00 | 14 64 | 5e 00 00 00 |
Meta Payload:
<?xml version="1.0" encoding="UTF-8" ?>
<Extension version="1.1">
<rfId>0</rfId>
</Extension>
Main Payload:
<?xml version="1.0" encoding="UTF-8" ?>
<body>
<rfAlarmCfg version="1.1">
<rfID>0</rfID>
<enable>0</enable>
<sensitivity>1</sensitivity>
<sensiValue>21</sensiValue>
<reduceFalseAlarm>0</reduceFalseAlarm>
<timeBlockList>
<timeBlock>
<enable>1</enable>
<weekDay>Sunday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Monday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Tuesday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Wednesday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Thursday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Friday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Saturday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
</timeBlockList>
<alarmHandle>
<item>
<channel>0</channel>
<handleType>snap,rec,push</handleType>
</item>
</alarmHandle>
</rfAlarmCfg>
</body>
p.s. This is just for reference so I can search in github when then was reverse enginned and why
- Camera
No reply (not even an OK)
from neolink.
Just to confirm this is what we want to turn on/off
from neolink.
This is the message for controlling this:
Let me know if I can make some test for you, to query the commands list
from neolink.
Best thing would be wireshark. Do you know how to use wireshark?
If so have wireshark running on your computer capturing the network traffic then open the official client (on the same computer as wireshark) and disable/enable the pir using that. It will record the packets sent. Filter the packets to only save those going to/from the camera then send the dump to me as a pcap.
from neolink.
Attached.
ArgusEco.pcap.zip
from neolink.
Thanks but unfortunalty your your wireshark dump only contain 18 packets and dosen't have anything to do with either login or changing the PIR. Maybe you filtered out too much or started the capture after already opening the offical client.
from neolink.
Weird. I commonly use wireshark. I have filtered for packets going to/from the camera IP. And I started recording before I switched the PIR.
i can try another capture.
from neolink.
Perhaps you can install our wireshark dissector. It will let you filter on baichuan protocol packets
from neolink.
This is my current filter
baichuan.msg_id && baichuan.msg_id != 3 && baichuan.msg_id != 234 && baichuan.msg_id != 115 && baichuan.msg_id != 33
it will remove al lot of the data we are not interested in like camera feeds and motion detection and wifistatus updates etc
from neolink.
This is the message for reqesting the status this:
- Client
Magic | Message ID | Message Length | Encryption Offset | Status Code | Message Class | Payload Offset |
---|---|---|---|---|---|---|
f0 de bc 0a | d4 00 00 00 | 5e 00 00 00 | 00 00 00 13 | 00 00 | 14 64 | 5e 00 00 00 |
Meta Payload:
<?xml version="1.0" encoding="UTF-8" ?>
<Extension version="1.1">
<rfId>0</rfId>
</Extension>
- Camera
Magic | Message ID | Message Length | Encryption Offset | Status Code | Message Class | Payload Offset |
---|---|---|---|---|---|---|
f0 de bc 0a | d4 00 00 00 | a6 04 00 00 | 00 00 00 13 | c8 00 | 00 00 | 00000000 |
Main Payload:
<?xml version="1.0" encoding="UTF-8" ?>
<body>
<rfAlarmCfg version="1.1">
<rfID>0</rfID>
<enable>1</enable>
<sensitivity>0</sensitivity>
<sensiValue>21</sensiValue>
<reduceFalseAlarm>0</reduceFalseAlarm>
<timeBlockList>
<timeBlock>
<enable>1</enable>
<weekDay>Sunday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Monday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Tuesday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Wednesday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Thursday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Friday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
<timeBlock>
<enable>1</enable>
<weekDay>Saturday</weekDay>
<beginHour>0</beginHour>
<endHour>23</endHour>
</timeBlock>
</timeBlockList>
<alarmHandle>
<item>
<channel>0</channel>
<handleType>snap,rec,push</handleType>
</item>
</alarmHandle>
</rfAlarmCfg>
</body>
from neolink.
A better wireshark capture.... attached
ArgusEco2.pcap.zip
from neolink.
Perhaps you can install our wireshark dissector. It will let you filter on baichuan protocol packets
don't know how
from neolink.
This is the file https://github.com/QuantumEntangledAndy/neolink/blob/master/dissector/baichuan.lua
It need to be put in the right folder. In mac/linux it is ${HOME}/.local/lib/wireshark/plugins/baichuan.lua
On windows it is %APPDATA%\Wireshark\plugins
from neolink.
Looking at your dump there are a few interesting packets 299 and 342. They seem to be sent right after you request the PIR status and before the setting of the PIR. However I cannot decrypt there contents without a password. Perhaps you could set a dummy password during the dump of 123456
and then capture it again. I will need the login message too (id 1) to get the nonce too since the AES encryption key it PASSWORD-NONCE
from neolink.
You can use 140289 to decrypt. I have changed the password.
from neolink.
299
- Client
f0debc0a2b010000680000002f0000000000146468000000
Meta Payload:
<?xml version="1.0" encoding="UTF-8" ?>
<Extension version="1.1">
<channelId>0</channelId>
</Extension>
- Camera:
No reply
342
- Client
f0debc0a56010000eb000000300000000000146468000000
Meta Payload:
<?xml version="1.0" encoding="UTF-8" ?>
<Extension version="1.1">
<channelId>0</channelId>
</Extension>
Main Payload:
<?xml version="1.0" encoding="UTF-8" ?>
<body>
<AiDetectCfg version="1.1">
<chn>0</chn>
<type>people</type>
</AiDetectCfg>
</body>
Notes:
Theres more than one possible payload. This has also been observed:
<?xml version="1.0" encoding="UTF-8" ?>
<body>
<AiDetectCfg version="1.1">
<chn>0</chn>
<type>vehicle</type>
</AiDetectCfg>
</body>
- Camera
f0debc0a560100006e03000030000000c800000000000000
Main Payload:
<?xml version="1.0" encoding="UTF-8" ?>
<body>
<AiDetectCfg version="1.1">
<chn>0</chn>
<type>people</type>
<sensitivity>69</sensitivity>
<stayTime>0</stayTime>
<minTargetHeight>0.30354199</minTargetHeight>
<minTargetWidth>0.17060199</minTargetWidth>
<maxTargetHeight>0</maxTargetHeight>
<maxTargetWidth>0</maxTargetWidth>
<width>72</width>
<height>40</height>
<area>AAAD8AB4AAxgAAAD8AAAAABgAAAD8AAAAAABAAAD//gAAAADAEAD//gAAAAAAAAf//4AAAAAAAAf//8AAAAAAAAf//+AOAABAAAf///AAAABAAD////4AAABAAH////+AAABAAP/////wBAAAAf/////+AAAAA///////gAAAA///////4AAkB///////+AA//////////gA//////////4A//////////8D//////////8B//////////+B///////////x////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</area>
</AiDetectCfg>
</body>
Other differences:
212 (AlarmCfg)
You had no reply for your AlarmCfg message
from neolink.
You didn't seem to get a reply about the PIR detector in the same way I did. But you did get one about AI detection. Do you know if your camera has PIR or does it detect just by AI on vid feed
from neolink.
It has a large PIR on the front:
from neolink.
What are msgs 192 and 319?
from neolink.
. But you did get one about AI detection.
Vehicle detection is disabled, so it should not be correctly decoded.
from neolink.
Vehicle detection decodes ok. It's just marked as disabled in the return message from the camera.
Just to confirm you did turn the PIR on and off during your wireshark right? I think so given what's in the pcap but best to confirm anyways
I'll check the other messages maybe I missed something.
from neolink.
from neolink.
Could you pls check if the attached 2 messages could be PIR ON and PIR OFF? (213 382)
Argus_Eco_3.pcap.zip
from neolink.
Yes 213 is pir on off. It's the message that we already send. When we send the use the neolink pir on/off command. 382 was if I recall header only with no data attached, so it's hard to know what it is for.
from neolink.
But if 213 is PIR, why I found it in the stream but it doesn't work if I send from noelink?
from neolink.
OK the PR to address this is here #53. Once it comiples you can get the builds from here https://github.com/QuantumEntangledAndy/neolink/actions/runs/4594196290
from neolink.
If this fails to work please capture the packets sent by neolink and we will compare them to the offical
from neolink.
OK the PR to address this is here #53. Once it comiples you can get the builds from here https://github.com/QuantumEntangledAndy/neolink/actions/runs/4594196290
Thanks! How much does it normally take to build?
from neolink.
Looks like it is already built. The artefacts are at the bottom on that link (make sure your logged in to GitHub)
from neolink.
Doesn't work either. How can I grab Wireshark streams? neolink is on a Raspberry in the LAN, not on the computer from which Wireshark is initiated.
from neolink.
I figured it out, with tcpdump. But I got only few packets. Attached.
tcp.pcap.zip
from neolink.
I don't see any 213 msg in the stream...
from neolink.
This is another stream with 213 msg! I verified that randomly the command works, but not every time. Some time it fails, and some other it works.
tcp.pcap.zip
from neolink.
Does it always fail with CameraServiceUnavaliable or is there a new message. Now the first pcap you sent seems to be successful. I'll check the second one now.
p.s. You can now also use
neolink pir --config=config.toml
witout on/off to see the current status without setting
from neolink.
Sorry other way around your second pcap is successful.
Your first seems to fail to get the current PIR status
from neolink.
With status code 400. Which is bad request suggesting an error in the format we send. Can I get the password for this so I can decrypt it?
from neolink.
When it fails, it fails with the "Service Unavailable" message.
Then:
./neolink pir giardino --config=neolink_config.toml
[2023-04-03T10:03:54Z INFO neolink] Neolink 99c624137263503aa3f2fc254d89c5189947a0b6 release
[2023-04-03T10:03:54Z INFO neolink::utils] giardino: Connecting to camera at UID: 95270004YFGE16SE
[2023-04-03T10:03:56Z INFO neolink_core::bc_protocol] Relay success 95270004YFGE16SE at 35.180.129.86:51824
[2023-04-03T10:03:56Z INFO neolink::utils] giardino: Logging in
[2023-04-03T10:03:57Z INFO neolink::utils] giardino: Connected and logged in
Error: Unable to get camera PIR state
Caused by:
Camera responded with Service Unavaliable
from neolink.
After 2 or 3 times:
./neolink pir giardino --config=neolink_config.toml
[2023-04-03T10:04:47Z INFO neolink] Neolink 99c624137263503aa3f2fc254d89c5189947a0b6 release
[2023-04-03T10:04:47Z INFO neolink::utils] giardino: Connecting to camera at UID: 95270004YFGE16SE
[2023-04-03T10:04:47Z INFO neolink_core::bc_protocol] Local discovery success 95270004YFGE16SE at 192.168.1.42:22034
[2023-04-03T10:04:47Z INFO neolink::utils] giardino: Logging in
[2023-04-03T10:04:48Z INFO neolink::utils] giardino: Connected and logged in
<?xml version="1.0" encoding="utf-8"?><RfAlarmCfg version="1.1"><rfID>0</rfID><enable>1</enable><sensitivity>0</sensitivity><sensiValue>12</sensiValue><reduceFalseAlarm>0</reduceFalseAlarm><timeBlockList /><alarmHandle /></RfAlarmCfg>
from neolink.
I have an idea. Please wait for next build
from neolink.
Password 123456
tcp.pcap.zip
from neolink.
I noticed in our extension xml neolink does this
<?xml version="1.0" encoding="UTF-8" ?>
<Extension version="1.1">
<channelId>0</channelId>
</Extension>
while reolink does this
<?xml version="1.0" encoding="UTF-8" ?>
<Extension version="1.1">
<rfId>0</rfId>
</Extension>
Just swapped it to rfID in the next build here https://github.com/QuantumEntangledAndy/neolink/actions/runs/4595507575
from neolink.
Not sure if there is a better way to get this rdId field then just setting it to the channelId. Maybe need to look for that
from neolink.
I noticed that once opened the Reolink client, this camera needs few seconds to get connected and operative online. Maybe you should introduce some delay?
Anyway, I am waiting for the new build and will let you know.
from neolink.
I noticed that once opened the Reolink client, this camera needs few seconds to get connected and operative online. Maybe you should introduce some delay? Anyway, I am waiting for the new build and will let you know.
I said this because if I keep opened the Reolink client, than send neolink command, it will never fail.
from neolink.
This is a GIF showing the connection time when I launch the Reolink Client
from neolink.
Maybe this has something to do with the battery camera waking up? The camera usually sends a bunch of messages such as the capabilities after login so maybe I should wait for some of those
from neolink.
I notice that 212 fails if it sends before these capability messages
from neolink.
I think you are right
from neolink.
Maybe you should wait for the capability messages before sending the command.
from neolink.
I'm working on creating something to properly parse tha capability. Since we can use it to give useful error messages such as this camera dosent support pir
from neolink.
Ok. Thank you. Just let me know if you need more tests.
from neolink.
After many tests, I can confirm this: your neolink is correctly working only if I keep the connection alive (either through Client on computer or App on smartphone).
from neolink.
Ok next test build will be here: https://github.com/QuantumEntangledAndy/neolink/actions/runs/4606409632
from neolink.
the build failed
from neolink.
Ah sorry forgot to commit the new file and not just the modified ones.
from neolink.
Ok on its way https://github.com/QuantumEntangledAndy/neolink/actions/runs/4607363019
from neolink.
It works!
Great job!
from neolink.
Are we all good? If so I'll close this and merge
from neolink.
Randomly, it happens that upon a request the connections fails and it responds with:
Error: Unable to get camera PIR state
Caused by:
Camera responded with Service Unavaliable
from neolink.
I need to send the command twice in order to get it working everytime. It seems that first command needs to set the camera alive (failing) and the second goes through.
Sometime one command is enough, but mostly not.
from neolink.
Ok then, since the error code is always 400. I will see about retrying the messages if we get that error code.
from neolink.
Ok retry build is here https://github.com/QuantumEntangledAndy/neolink/actions/runs/4615033288
from neolink.
Reties every 0.5s for 2.5s
from neolink.
Perfect! This is very good, no failures.
Yes, you can merge this. I will keep using this build.
from neolink.
Merged in #53
from neolink.
Related Issues (20)
- Delayed MQTT Motion HOT 5
- Unable to stream from E1 using the latest neolink docker image HOT 2
- Can't connect to Cameras with 0.6.3-rc.1
- <jemalloc>: Unsupported system page size - docker on Debian 12 on rpi5 HOT 10
- Getting Neolink in Home Assistant working HOT 11
- ONVIF Support and Scrypted Two Way Audio HOT 1
- 'RTSP Staring' message should say 'RTSP Starting' HOT 1
- Can't integrate with Home Assistant. HOT 1
- Can't connect to Reolink Argus Track HOT 3
- error resol-vbus config issues HOT 4
- Possible infinite loop in NeoReactor push notification... HOT 9
- mainStream issues
- Neolink does not connect to MQTT broker. WARN: Connection Lost: Dropped connection HOT 2
- Document the Binary XML protocol & Update wireshark dissector. HOT 6
- Neolink causing excessive battery usage
- Registration with reolink servers failed HOT 12
- Neolink Memory Leak / Errors HOT 2
- Support building a MQTT-only version without the gstreamer dependency HOT 5
- Registering new push notification token: Error("missing field `token`", line: 7, column: 1) }) HOT 28
- Reolink Argus PT does not reconnect. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neolink.