
Here's a step by step guide for accessing video and audio stream data of cheap Chinese X5/A9/etc cameras using the iLnk/iLnkP2P/PPPP protocol. Those cameras can be bought for as low as 1$ and are sometimes battery powered, but they still come in various models.
This demonstration will use a cam-reverse project by David Ventura, which is written in NodeJS. Here's the repository with full readme:
https://github.com/DavidVentura/cam-reverse
First, you need a camera. I bought one here:

The box arrived slightly dent, but camera is still in one piece:



By the way, my camera is using XF16 chip, you can see details here: https://www.elektroda.com/rtvforum/topic4074636.html
Still, we don't need to open the case now. Just power it via USB.
Then, you need to run cam-reverse with NodeJS. You can build it from source, but I'd recommend to get precompiled CJS file:

Of course, also install NodeJS if you don't have it yet.
The default command to run the server is very simple:
node dist/bin.cjs http_server
However, this will NOT work in many cases. This is because you may have multiple network interfaces (like VMware adapters), and they will not be checked unless specified. That's why I recommend creating config.yml:
http_server:
port: 5000
logging:
level: debug
use_color: true
# If you are crossing broadcast domains (VLANs) then
# you need to specify all IPs as unicast targets
discovery_ips:
- 192.168.238.1
Enter your network adapter IP that is in the same network as camera.
For the start, we will just put camera in AP mode and connect to its WiFi:

Run the app with config specified:
node bin.cjs http_server --config_file <your_config.yml>
This should detect the cam:

Now you can access the stream:




You can also pair camera with your WiFi:
node dist/bin.cjs pair --ssid <SSID> --password <PASSWORD>
This way you should be able to have multiple cameras in NodeJS page, but I haven't tested that yet.
I've did some initial tests with this project, and it seems to work, however XF16 chip gets warm and I'm not yet sure how to connect it to Home Assistant. I will try to investigate it futher and provide more information in another topic. Let me know if you have any A9 cameras, did you try to access the video stream? Is your camera also getting warm? Stay tuned!
Cool? Ranking DIY Helpful post? Buy me a coffee.