Hello Zephyrs,
I'm developing a shell module for the sensor drivers and I want to
validate if the device name passed from the user is a sensor device.
I have the CONFIG_USERSAPCE=y.
After calling "dev = device_get_binding(argv[1])" I call the
"Z_SYSCALL_DRIVER_SENSOR(dev, sample_fetch)" and I get the following
error message:
thread 0x2000064c (1) does not have permission on sensor driver
0x20005ac8 [0000]
syscall cmd_get_sensor failed check: access denied
Some questions:
1 - How do I grant permission to the running thread to access the
sensor driver object?
2 - Even having the CONFIG_USERSAPCE=y set when calling
"sensor_sample_fetch" it seems that it is calling the
"_impl_sensor_sample_fetch" directly instead of
"Z_SYSCALL_HANDLER(sensor_sample_fetch, dev)" defined in the
drivers/sensor/sensor_handlers.c file. How can I have the current
thread using the userspace syscalls?
Regards,
--
*dS
Diego Sueiro