# Error starting camera: tof

Source: https://forum.modalai.com/topic/1293/error-starting-camera-tof
Category: Flight Core and Legacy VOXL (https://forum.modalai.com/category/9/flight-core-and-legacy-voxl)
Tags: voxl-cam
Posted: 2022-09-05 18:50:48 UTC by Anubhav
Replies: 2 · Views: 487

## Anubhav · 2022-09-05 18:50:48 UTC

@Alex-Gardner 
Hi,

I am getting an error while running voxl-camera-server it's not getting connected to TOF camera, the output is shown below. 
```
voxl:/$ voxl-camera-server  
WARNING Failed to set priority, errno = 1
This may be because the FIFO scheduler is not available when running in a console.
It should work properly when run as a systemd background process on boot.
WARNING: failed to set scheduler
------ voxl-camera-server: Starting camera server
	Started Camera: tracking
	Started Camera: stereo
ERROR: Invalid Preview Format!
Encountered error starting camera: tof, exiting
	Stopped Camera: tracking
	Stopped Camera: stereo
```
can you tell me how to resolve this issue. below I have also attached voxl-camera-server.conf file. 
```
voxl:/$ cat /etc/modalai/voxl-camera-server.conf 
{
	"version":	0.1,
	"cameras":	[{
			"name":	"tracking",
			"enabled":	true,
			"frame_rate":	30,
			"type":	"ov7251",
			"camera_id":	1,
			"ae_desired_msv":	60,
			"ae_filter_alpha":	0.600000023841858,
			"ae_ignore_fraction":	0.20000000298023224,
			"ae_slope":	0.05000000074505806,
			"ae_exposure_period":	1,
			"ae_gain_period":	1
		}, {
			"name":	"stereo",
			"enabled":	true,
			"frame_rate":	30,
			"type":	"ov7251",
			"camera_id":	2,
			"camera_id_second":	3,
			"ae_desired_msv":	60,
			"ae_filter_alpha":	0.600000023841858,
			"ae_ignore_fraction":	0.20000000298023224,
			"ae_slope":	0.05000000074505806,
			"ae_exposure_period":	1,
			"ae_gain_period":	1
		}, {
			"name":	"tof",
			"enabled":	true,
			"frame_rate":	-1,
			"type":	"pmd-tof",
			"camera_id":	0
		}]
```

Thanks!

## Reply by Guest · 2022-09-06 16:30:45 UTC

Hi,

It looks like you're running a version of camera server that doesn't yet support tof. We did a major refactor of camera server a few months ago and are finally merging tof support back into the mainline. How did you install this version? The complied versions shouldn't be available on any of our non-beta repos.

## Reply by Anubhav · 2022-09-06 17:22:22 UTC

Hi @Alex-Gardner,

The problem is solved and TOF camera is working fine now, previously I have flashed voxl system image 3.8 and now I have again re-flashed it with 3.3 system image. 

Thanks for your input!
