Open ubeF opened 2 days ago
@ubeF it's been a while since I worked on this project.
If I remember correctly, the drivers load first which then setup the /dev/video51 instances. It could be that your libraries don't match those that were compiled with the binary.
Do you have a firmware dump?
I don't have a full dump, but i have the relevant files here firmware.zip
/etc/init.d/rcS is run on startup, does some setup stuff, runs /rom/setup.sh and then /ipc/ipc, which handles all of the camera stuff
/rom/setup.sh does not initially exist and is writable, so i used it to start your scripts.
But it turns out that /dev/video51 is not created before /ipc/ipc is run, so stream doesn't work. I poked around /ipc/ipc a bit and i think it might use rts_av_create_chn() to create the video device but I'm not sure what exactly that function does.
Yes, you're right. I remember now!
If you would like more information on that functionality see here.
Doing some research into this camera, it appears to support ONVIF. This means it could potentially have an RTSP server built into the IPC.
It would be interesting to see we could patch this binary to enable it by default.
Yes, you're right. I remember now!
If you would like more information on that functionality see here.
That's precisely the function that throws the error. I analyzed stream with strace and it turns out, that rts_av_create_isp_chn tries to open /dev/video51 expecting it to already exist.
ipc uses rts_av_create_chn which passes the create flag to open, so it actually creates /dev/video51. But i don't think simply replacing that function will work.
I tried to run the RTSPServer on a Sricam SP017, which is a different RTS3930N based IP camera. The server itself seems to work but stream fails to set up the fifo stream in /tmp/h264_high_fifo.
Stream fails after calling rts_av_create_isp_chn(&isp_attr) and outputs "fail to create isp chn, ret = -21". It turns out that rts_av_create_isp_chn tries to open /dev/video51 without previously creating the device.
Is the creation of /dev/video51 already taken care of by a different program in YI Cameras?
I cant find any public information on the rtscamkit library or the camera drivers, so i don't know what rts_av_create_isp_chn actually does and how the camera device is supposed to be set up. Can anyone point me in the direction of the source or some documentation for the library?