Snap shot from camera

I recently purchased a BPi M1 with a ov5640 autofocus camera. I do have experience with Raspberry pi and Linux. But I am unable to take a picture with this unit. I did get camera to work as a cctv with out recording capabilities. First, how can I capture an image? Second, how can i enable the autofocus? Thank you in advance.

Well i m here for the same…Hopefully someone will post an accurate solution here.