Popular A9 mini Wi-Fi camera & the HA challenge

i have this one…
used this software on PC : HIDVCAM FOR PC - Hidvcam , so easy to wireshark then, as it looks for local devices on the lan…
Is your port 554 open on that IP address? can you check with nmap?

I’m stuck with the following error when compiling:

Anyone with experience about this error or similar?

Ok, now I’m able to compile. I achieved this by using an older complier.
Still no success, the code cannot be bigger than 835584 bytes. The code I found yields 1177644 bytes.

Sweet&Sour news, I have managed to compile and upload (see the build date) the code that could enable the camera to stream by connecting to port 80 however, the camera got bricked:

A hand from someone with “fresh” C knowledge would be appreciated.

1 Like

Hello! Could you please share your code? I’d like to help but I can’t do much without the code.

The code I use is the one in the link shared by freeser above in post #116.

Take a look a this link 麻雀一号BK7252音视频开发板基础篇01-开发环境搭建 - 知乎 to get acquittance with the package.

Feel free to send me a private message to dive into the details. It could be a quite steeping curve to get into the matter. I can also update you on the changes I did to the code to downsize the binary file.

BTW, the camera is not 100% bricked so I guess (I hope) I can get it back to “life” quite easily.

1 Like

judging by that screenshot, it’s not bricked at all. it looks as if the power key is configured wrong in that code and the firmware immediately turns off the camera…

that’s right, therefore I said it is not 100% bricked however I need to see if I manage to manually engage it to the Wi-Fi to pull the original firmware from the manufacture’s repository (see post #44). BTW, the firmware does not turn off the camera however that green “pwr_btn” message repeats continuously in an infinite loop… another tweak that needs to be done to the code to correct it, hopefully the only one.

The interesting thing I learned is that the IP network configuration, and many other parameters, is done on the OS (RT-Thread). That configuration is then merged with the code, compiled and the bin file generated. What I missed was the Wi-Fi configuration in the RT-Thread, see here, therefore I need to set it up manually.

2 Likes

Hi guys, I have bought A9 (naxclow) camera and try to get from it something without original V720 app. In AP mode, I have no success to get live-video from it, but i able to download a content from it. Live video also works
My script and more details available here: https://github.com/intx82/a9-v720

1 Like

Hi Danli
I think i have the same camera,
PCB A9_B V1.3_220516

and I’m trying to use your scripts to enable live feed from the camera.
but not having much luck could you explain abit on how ?

I’m starting in “pairing mode” (blinking blue light)
then manually connecting to wifi

msh />wifi w0 join MY_WIFI_123 password1234

IP UP: 192.168.1.96

msh />ifconfig
network interface: ap
MTU: 1500
MAC: 22 00 00 20 58 2b
FLAGS: UP LINK_DOWN ETHARP BROADCAST IGMP
ip address: 0.0.0.0
gw address: 0.0.0.0
net mask  : 0.0.0.0
network interface: w0 (Default)
MTU: 1500
MAC: 22 00 00 20 58 2a
FLAGS: UP LINK_UP ETHARP BROADCAST IGMP
ip address: 192.168.1.96
gw address: 192.168.1.254
net mask  : 255.255.255.0
dns server #0: 8.8.8.8
dns server #1: 0.0.0.0
msh />

I have updated the device IP 192.168.1.96 in both a9_live.py and a9_naxclow.py

I get theese errors

root@Debian ~/a9-v720-master# python3 src/a9_naxclow.py -l -o live.avi -r -i
Traceback (most recent call last):
  File "/root/a9-v720-master/src/a9_naxclow.py", line 81, in <module>
    with conn_tcp(host[0], port) as sock:
  File "/root/a9-v720-master/src/conn_tcp.py", line 25, in __enter__
    self.open()
  File "/root/a9-v720-master/src/conn_tcp.py", line 19, in open
    self._socket.connect((self._host, self._port))
ConnectionRefusedError: [Errno 111] Connection refused

any suggestions ?

fun little project haha

Rune

Hi

Inside original source could be found several types of connection, first of them is TCP (but inside original source it called UDP) and works on 6123 port, the second one is UDP and protocol is quite different (in original code it has a suffix PP). For this project has been used only one type - TCP. But seems on your camera TCP port has been closed. To check this, you can open a ‘Wireshark’ and try to sniff what’s happens when you make a connection, if it simply closes TCP port after first message, then seems camera changes a proto after becoming wifi-client. It would be nice to attach somewhere yours cap-files.

The second one, you can try to send any UDP packet into 6123 port, my camera responds with ICMP error, if not, seems it waits for udp commands, which, tool right now is not support.

And the final one, that you can try - reset camera to default parameters, and try to connect.

Also, did you seen naxclow word in logs (ie com.naxlow.camera, etc)? And what is the prefix of default camera’s AP name? (i have a NAX)

Better to use cmd arg instead of changing IP in script. To specify host, use arg -c [ip:[port]]
ie:

python3 src/a9_naxclow.py -l -o live.avi -r -i -c 192.168.1.96

Does camera pinging?

thanks Danil
i will do some playing around.

here is a couple of sniplets from my log

com.naxclow.Camera_v0-1.1.20

codeBuildTime:2022年 12月 01日 星期四 16:02:07 CST

\ | /
- RT - Thread Operating System
/ | \ 3.1.0 build Dec 1 2022

i can ping its IP address
Reply from 192.168.1.96: bytes=32 time=15ms TTL=255

the AP mode SSID is Nax_0800c0010E2D






Rune

Looks the same, what about wireshark capture?

I will try on my camera and let you know there

i havent used wireshark in a long time. need to figure it out again :wink:

ok, i confirm your issue, after establishing connection to the AP, camera lost the connection. Will investigate.

Good news, i have implemented a command to connect camera to home AP. Use argument --set-wifi SSID PWD

okay sweet. so i still need to WIFI config from the terminal or config via the APP? but then use the script with the parameters too ?

Nope, i can say even more, seems it will be not possible to do this with this script after connection to AP.
My quick investigation lead that all TCP/UDP ports are closed, and camera goes to register to the Chinese server. (it’s why i don’t trust any of this aliexpress shit). Details on picture

DO NOT CONNECT THIS CAMERA TO THE INTERNET No one knows, maybe your photo will be interested to some guy from naxclow

i will try to have some fun with naxclow server, maybe i can make a fake one

haha… . ya… chineese cameras… maby block the IP in my firewall

I have some progress with a fake server, more details in fake_server.md in repo. And i even can run some commands like reboot, or scan wifi networks around, but i still could not get any Audio/Video stream.

Guys, it could be very helpful if someone make a wireshark capture on already registered account.
Will be very appreciated. It’s a very interesting thing.