Closed jmtatsch closed 5 years ago
Hi,
is there a reason why you are using such an old version of buildroot? Have you seen the newer toolchains at https://github.com/tssva/ingenic-toolchains?
@jmtatsch I think so. First, kernel can only be compiled with gcc 4.7.x (maybe newer ports appear) and it is a good practice to use the same toolchain to compile all the distribution. Second, the toolchains you point are based on glibc and not on ulibc as we expect.
I'm currently compiling the v4l2rtspserver from scratch but I get
# v4l2rtspserver-v0.0.8 -W 1280 -H 960
log level:500
[NOTICE] /home/vm2/mipsel_uclibc_[ 2230.537843] ###### image_tuning_v4l2_open 4219 #######
toolchain/openfang/_build/buildroot-2014.08/output/build/v4l2rtspserver-v0.0.8/src/main.cpp:622
Create V4L2 Source.../dev/video0
[ERROR] src/V4l2Device.cpp:84
Cannot open device:/dev/video0 Operation not permitted
[ERROR] src/V4l2Device.cpp:67
VIDIOC_STREAMOFF: Bad file descriptor
VIDIOC_REQBUFS: Bad file descriptor
It is based on https://github.com/mpromonet/v4l2rtspserver/tree/v0.0.8.
I don't know. Have you tried our fork https://github.com/Dafang-Hacks/v4l2rtspserver-master ?
I don't know. Have you tried our fork https://github.com/Dafang-Hacks/v4l2rtspserver-master ?
Yes, but it is not stable at all. There are some pre-compiled libraries which may create some problems in my case (I have to recompile them) since the server shut down sporadically.
@jmtatsch Could you test the new rootfs? I didn't use yet the website and scripts but v4lrtspserver is now working.
Awesome, will do on the weekend
Second, the toolchains you point are based on glibc and not on ulibc as we expect.
The toolchains contain both glibc and uclibc.
They also have the advantage of including support for the Ingenic MXU SIMD instruction sets which at some point may be needed. For instance Ingenic uses the MXU instruction set to improve performance of the OpenCV library included with later versions of their sdks.
@tssva Yes, this is a good point. We will see how to solve the support for Ingenic MXU SIMD later.
Do you have some examples with OpenCV to test?
@jmtatsch Do you have the source of autonight?
https://github.com/EliasKotlyar/Xiaomi-Dafang-Software/tree/master/autonight
There is also an open pullrequest for software autonight
https://github.com/EliasKotlyar/Xiaomi-Dafang-Software/tree/master/autonight
There is also an open pullrequest for software autonight
Thanks. I will include it inside v4lrtspserver tools. Later we could make a proper package for all the dafang tools.
@jmtatsch The autonight tool is now working in the current build: https://github.com/anmaped/openfang/tree/master/binaries/rootfs
I don't have tested the version using camera exposure, but it's enabled there using the parameter -S.
Is the v4l2rtspserver completely unpatched? Is it possible to include the stuff like auto night, motor etc as submodule? that way it would be easier to track source changes & more transparent ... in future a build job could run the buildroot script when ever something has changed in the source repo
@jmtatsch Yes I have the same ideia. The source code that is available is the one already patched. I want to create the patches from the original source of v4l2rtspserver as you propose. These changes should be tracked carefully in order to avoid future problems.
Autonight, motor, getimage, etc. are available inside the source package in the tools folder.
The idea is to use https://github.com/mpromonet/v4l2rtspserver as the build point. Everything else are modifications in form of patches. In this way, we are able to maintain the source and recheck for modifications.
@jmtatsch Could you test if mosquito (mqtt) is working well?
@anmaped I will do when i find some time, but I am quite busy with other things right now :(
@anmaped what are you plans regarding motion detection? That is arguably the most important feature of these cams :) You want to got the opencv route?
mqtt is working well by the way
Good. Could you provide a small tutorial how to configure mqtt? We should also describe the configuration parameters in the Gui.
@anmaped what are you plans regarding motion detection? That is arguably the most important feature of these cams :) You want to got the opencv route?
Yes. I think opencv is the best option.
Basically I just added the configuration from dafanghacks mqtt.conf to /etc/mosquitto/mosquitto.conf
# Options for mosquitto_sub & mosquitto_pub
USER=mqtt-user
PASS=mqtt-password
HOST=my_mqtt_server_ip_adress
PORT=1883
Then you can send a test message like that mosquitto_pub -h my_mqtt_server_ip_adress -m "test" -t "mylocation/test_topic"
Sure we can create a gui to change those parameters, however we would need to give cgi script root rights to write in /etc/. Root rights for anything web serving is almost never a good idea :)
Also, do we want one single openfang.conf or do we want the configs scattered over all places such as in dafang hacks?
As we are talking about root, can we add the sudo package to buildroot?
Concerning opencv motion detection, I would be thrilled if that would work out. However, i am afraid that resources are too limited for that. Ingenic wouldn't otherwise feel the need to provide highly optimised motion detection routines.
As we are talking about root, can we add the sudo package to buildroot?
Fixed in 573788d0f31fd96255b197427aa242daa5c32194.
sh /opt/autoupdate.sh
will update to the new version. But there is no exception for config files (some will be overwritten).
We should do a list of directories/files to backup and restore after the update.
After the update /mnt/update somehow is still mounted, so the next update fails with:
mount: mounting PPwPPw on /mnt/update failed: Device or resource busy
although there is https://github.com/anmaped/openfang/blob/aeac4f0983762a0b36f3b46e339fe44b2da0ab15/fs/opt/autoupdate.sh#L20
using the same command manually works.
Could this be a timing issue somehow?
Oh and I seem to have lost my wpa_supplicant.conf during the update :(
Oh and I seem to have lost my wpa_supplicant.conf during the update :(
You can put the file in the second partition. It will be used/copied automatically.
After the update /mnt/update somehow is still mounted, so the next update fails with:
mount: mounting PPwPPw on /mnt/update failed: Device or resource busy
although there isLine 20 in aeac4f0 umount /mnt/update/
using the same command manually works. Could this be a timing issue somehow?
Yes. The problem is that some tools are running and we should shutdown them first. Yet, this update script is outdated, let's see the new one in the next release, which you can find here https://github.com/anmaped/openfang/releases/download/rc05_01/autoupdate.sh.
@tssva Have you been able to compile it? Could you describe the dependencies in terms of the external environment?
Hi,
is there a reason why you are using such an old version of buildroot? Have you seen the newer toolchains at https://github.com/tssva/ingenic-toolchains?