How can I read raw data from on-board camera on tx2?

Hello!
We have a tx2 developer kit, and we need to take a picture from the on-board camera with v4l2. We tried to run the following command:
v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=ov5693.raw
This command output nothing, doesn’t exit until press ‘ctrl + c’ key, and the file ‘ov5693.raw’ was generated, but the size of the file is 0 byte.
How should we do if we want to read the raw picture data from the on-board camera by using v4l2?
Thanks.

I can get the raw data by below command.

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=ov5693.raw

Thanks for reply, now the file was fill out with a lot of 0xff 0x3f, not the true picture data.

FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F

@thyme
Try --stream-count=5 the first few frame may have problem.

Yes, it seem to work! is there any tool to convert the data to rgb?

You can try imagej, however due to the memory layout is different with others platform. May cause the color not really correct. You can check the TRM chapter “31.3.6 Pixel Formats Memory Layout” for more detail.

OK! thank you very much!