mnakada / atomcam_tools

Hack tool for atomcam and wyzecam.
Other
183 stars 22 forks source link

wireless driver improvement #37

Closed gtxaspec closed 2 years ago

gtxaspec commented 2 years ago

@mnakada hello,

I have found updated drivers which work with the wifi cards on our model cameras.

ATBM603x (https://github.com/gtxaspec/atbm_wifi) and RTL8189FTV (https://github.com/gtxaspec/rtl8189ES_linux - check 8189fs branches)

wireless performance and stability have improved for myself and other users with these drivers

perhaps you could investigate for your atomcam_tools user benefit!

have a nice day

mnakada commented 2 years ago

@gtxaspec , Thank you very much! I will check it out.

I am currently working on an implementation to take a time-lapse video. I have already been able to run the command, but have not yet created a web GUI.

Does wyze have libmp4rw.so or libhevc2mp4.so? If these exist, I think the same implementation will work.

gtxaspec commented 2 years ago

@mnakada, yes, wyze also has both libraries, it sounds exciting, as the built-in time lapse function, at least for me, does not work reliably.

mnakada commented 2 years ago

Take a look at libcallback/timelapse.c. You can check if it works with wyze.

The current implementation generates mp4 directly. In the case of mp4, once the file is closed, it cannot be appended to, so it is necessary to keep the file open for a long time. If a reset is applied during the process, the file system may be corrupted. Especially in the case of fat-fs.

It may be better to output the h264 file once and then convert it to mp4 at the end of the process.

gtxaspec commented 2 years ago

sounds great, I will have a look today! thank you for letting me know.

mnakada commented 2 years ago

@gtxaspec , I started to check the build of ATBM603x. How did you build for wyze? Is it on Docker environment? Can you share make options, logs of the build, etc. if you have them?

gtxaspec commented 2 years ago

@mnakada, sure! I will describe both for you, since atomcam can use both chipsets. for rtl8189ftv, checkout the rtl8189fs-T31 branch on https://github.com/gtxaspec/rtl8189ES_linux then, make -j4 ARCH=mips CROSS_COMPILE=/root/mips-gcc472-glibc216-64bit-master/bin/mips-linux-gnu- KSRC=/root/v2/kernel

the configuration options are in Makefile

you can add these options to insmod: rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=3 which are recommended.

gtxaspec commented 2 years ago

for atbm, the config is stored in the .config file, and you can make changes by running make menuconfig to compile: make CROSS_COMPILE=/openmiko/build/mips-gcc472-glibc216-64bit/bin/mips-linux-gnu- KERDIR=/openmiko/build/buildroot-2016.02/output/build/linux-custom arch=mips after you insmod the driver, the driver spams the dmesg with lots of debug info. You can change this with:

echo "LOG_ERR=OFF LOG_WARN=ON LOG_LMAC=ON LOG_SCAN=OFF" > /sys/module/atbm603x_wifi_sdio/atbmfs/atbm_printk_mask

gtxaspec commented 2 years ago

with both of them I was successful building in the docker environment.

mnakada commented 2 years ago

@gtxaspec, Thanks! It worked.