Popular A9 mini Wi-Fi camera & the HA challenge

This camera is used with HD IOT Camera for Android or V99 Cam for IOS.
I would NOT recommend to use these app. Theese app require way too many permissions on your phone !
Manufacturer also provide a link to the APK.

I captured this packet, which seems to be what tha app send to setup the camera wifi configuration.
In this exemple camera was configured to connect to :
SSID : Hotspot
Pwd : 12345678

----
# Packet 3154 from capture.pcapng
- 1537
- 111.099448136
- 10.42.0.190
- 10.42.0.218
- UDP
- 326
- 62511 ā†’ 36285 Len=284
0000   84 cf bf 8a c6 a3 c8 47 8c 7f df 37 08 00 45 00   .......G...7..E.
0010   01 38 01 9a 00 00 ff 11 a3 2f 0a 2a 00 be 0a 2a   .8......./.*...*
0020   00 da f4 2f 8d bd 01 24 a4 06 f1 d0 01 18 d1 00   .../...$........
0030   00 68 11 0a 02 61 0c 01 00 00 00 00 00 00 01 01   .h...a..........
0040   01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01   ................
0050   01 01 49 6e 72 75 72 71 6e 75 01 01 01 01 01 01   ..Inrurqnu......
0060   01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01   ................
0070   01 01 30 33 32 35 34 37 36 39 01 01 01 01 01 01   ..03254769......
0080   01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01   ................
0090   01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01   ................
00a0   01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01   ................
00b0   01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01   ................
00c0   01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01   ................
00d0   01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01   ................
00e0   01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01   ................
00f0   01 01 31 2f 31 2f 31 2f 31 01 01 01 01 01 01 01   ..1/1/1/1.......
0100   01 01 31 2f 31 2f 31 2f 33 34 34 01 01 01 01 01   ..1/1/1/344.....
0110   01 01 31 2f 31 2f 31 2f 31 01 01 01 01 01 01 01   ..1/1/1/1.......
0120   01 01 31 2f 31 2f 31 2f 31 01 01 01 01 01 01 01   ..1/1/1/1.......
0130   01 01 31 2f 31 2f 31 2f 31 01 01 01 01 01 01 01   ..1/1/1/1.......
0140   01 01 01 01 01 01                                 ......

The data inside packet should looks like this:

00000000  84 cf bf 8a c6 a3 c8 47  8c 7f df 37 08 00 45 00  |.......G...7..E.|
00000010  01 38 01 9a 00 00 ff 11  a3 2f 0a 2a 00 be 0a 2a  |.8......./.*...*|
00000020  00 da f4 2f 8d bd 01 24  a4 06 f1 d0 01 18 d1 00  |.../...$........|
00000030  00 68 11 0a 02 61 0c 01  00 00 00 00 00 00 00 00  |.h...a..........|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000050  00 00 48 6f 73 74 73 70  6f 74 00 00 00 00 00 00  |..Hostspot......|
00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000070  00 00 31 32 33 34 35 36  37 38 00 00 00 00 00 00  |..12345678......|
00000080  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000f0  00 00 30 2e 30 2e 30 2e  30 00 00 00 00 00 00 00  |..0.0.0.0.......|
00000100  00 00 30 2e 30 2e 30 2e  32 35 35 00 00 00 00 00  |..0.0.0.255.....|
00000110  00 00 30 2e 30 2e 30 2e  30 00 00 00 00 00 00 00  |..0.0.0.0.......|
00000140  00 00 00 00 00 00                                 |......          |

I posted what i captured when i have setup the cam with SSID Hostspot and the pwd 12345678 on the app.
I runed this capture, when the camera was already connected to my test AP wifi Hostspot runing wireshark.

Camera reboot and reconect to AP wifi. So i thought the configuration was well performed.

I was expected something like you reply.

Could you please share with me a link to aliexpress (or other store) where you have bought this camera? Iā€™d like to test a few

https://fr.aliexpress.com/item/1005004887594506.html

1 Like

Thanks, will buy few for test
Today iā€™ve received two cameras from this link https://www.aliexpress.com/item/1005004866601088.html and itā€™s works with my server

I got the same model here https://fr.aliexpress.com/item/1005004804060501.html
But it was brokenā€¦ itā€™s charging but not starting

What is the frame rate of your A9 (v720) camera?
While testing your code I saw it always below 10 fps and often dropped down. This is strange as in AP mode stream send using TCP connection, so probably there is some problem with camera firmware code.

This camera declared as HD, but it send jpeg pictures of 640x480 size. I wonder if somebody managed to change the video resolution.

PS I made some minor changes to encode live video with audio using ffmpeg.

Make a pull-request please.

There is a timer inside to align frame rate to 10 fps, if you are talking about AP mode. (@see a9-v720/a9_live.py at 219c6b409c6a5442cd1a92064b4aed426161490f Ā· intx82/a9-v720 Ā· GitHub)

But, anyway, in both modes, i didnā€™t have more than 10 fps on high detailed images. Seems, slow CPU couldnā€™t have enough power to encode a JPEG picture, sometimes i have up to 15-20 fps and then slowdown to 3-5 fps

Related to camera resolution, inside my camera i have a label ā€˜GC0319ā€™ and found in UART logs that it use a driver for GC0329, which is only 0.3mp (640x480). So, as usually with Chinese stuff, itā€™s good that it works

Yes, same here. It can start with 15-20 fps then drop to 3, but never produce stable 10fps.
According to the specs this CPU has VGA (720p max?) CMOS sensor interface/hw Jpeg encoder running at 96MHz clock, which should be powerful enough to produce 15-20 fps without frame drops. From the other side the poorly designed WiFi module could cause this.
Some numbers:
Camera can do 30fps, Beken SDK limit to 20 fps maximum.
10 fps mjpeg of 640x480 resolution will produce ~2,5Mbps stream (A-law audio 64Kbps)
Maximum Wi-Fi speed of this CPU is 54Mbps, as well as drop down to 24Mbps or even 11Mbps should provide sufficient throughput.

Itā€™s blocked somewhere inside, because written video files to SD card also have 10fps frame rate. This issue is not related to Wi-Fi. Also, can notice that FPS is higher if used -i argument. They call it ā€˜IR-Ledā€™, but really itā€™s simply monochrome output

I didnā€™t see any IR/MONO LEDs inside the camera I have. The camera chassis prepared for them - black ring around the camera sensor. But there is no such board with LEDs inside. Only I could see some pins on the main board marked IR.

Same for mine.
Aliexpress description says the camera has IR capability, but did not mention any IR LED.
It is possible to activate/deactivate IR filter.

a9 iā€™ not only one device which supports by v720 app, inside decompiled app sources iā€™ve found mentions about doorbell with camera, etc.

Related to name ā€˜IR-Ledā€™, first of all, there is IR pins on PCB, which seems related to it, and the second, enabling this feature (via -i arg) simply change camera mode to black and white (monochrome)

Hello. Itā€™s possible to run your server on OpenWrt?

Yes, should work, only thing - default web interface of openwrt (LUCI?) should be moved from 80 port

To recap this thread, as of today there have been no known successful efforts of building a custom firmware for these cameras, right? The bootloader is encrypted and we cannot have our own apps work on this hardware. Is that correct?