cancel
Showing results for 
Search instead for 
Did you mean: 

When I follow the instructions in section 3.3 (Kernel compilation) of VL53L5CX_Linux_Getting_started_with_Rpi.pdf the test program doesn't run.

BBald.1
Associate II

It displays the error message "Failed to open /dev/stvmvl53l5"

If I run the test program in user mode it works fine.

1 REPLY 1
John E KVAM
ST Employee

Running in user mode is far and away the easiest way to do it.

Debugging kernel modules is a real pain.

But some devices (like cell-phones) do not allow user-level code to communicate with the I2C bus directly. This prevents user code which might have been downloaded from the AppStore from gaining access to eeproms and other sensitive data that might be on the I2C bus.

Our solution was to create a kernel module that user-level programs can call that translate your requests into I2C accesses.

So unless you are building a protected system, I would not bother with the Linux driver.

Now if you are a kernel developer and 'insmod' is something you do a lot, feel free to play with the kernel driver.

But it's not going to be easy.

Our Linux developers have verified they can do it, but that doesn't mean anyone can. (I can do it, but with a lot of help.)

In order to debug what might have gone wrong, I'm going to need a list of all the commands you issued up to the error.

I'm guessing a step got missed somewhere - either in our documentation or in your execution of the instructions.

Think a bit on if you really want the Linux kernel version.

And if you do. begin the procedure and send a listing of the transcript.

-john


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'