AnsweredAssumed Answered

How to get a sensor list from my MCIMX8M-EVK board in Android Sensor Framework?

Question asked by James Yang on Jun 10, 2018
Latest reply on Jun 11, 2018 by Wigros Sun

Hi,

I have two imx boards, MCIMX6Q-SDB and MCIMX8M-EVK.

 

I developed Android App. to get a sensor list of these boards.

 

1. MCIMX6Q-SDB

 

SensorList App. shows the sensor list of this board as follows.

--------------------------------------------------------------------------------

Number of Sensors=5

Freescale 3-axis Accelerometer

Type: TYPE_ACCELEROMETER

Vendor: Freescale Semiconductor Inc.

Version: 1

Resolution: 5.985504E-4

MaximumRagne: 19.6133

Power: 0.3

 

.......

--------------------------------------------------------------------------------

This information is same as that of sensor.cpp in $(MY_ANDROID)/vendor/nxp-opensource/imx/libsensors

 

static const struct sensor_t sSensorList[] = {

{
.name = "Freescale 3-axis Accelerometer",
.vendor = "Freescale Semiconductor Inc.",
.version= 1,
.handle = SENSORS_ACCELERATION_HANDLE,
.type = SENSOR_TYPE_ACCELEROMETER,
.maxRange = RANGE_A,
.resolution = CONVERT_A,
.power = 0.30f,
.minDelay = 2500,
.fifoReservedEventCount = 0,
.fifoMaxEventCount = 32,
.stringType = SENSOR_STRING_TYPE_ACCELEROMETER,
.requiredPermission = 0,
.maxDelay = 640000,
.flags = SENSOR_FLAG_CONTINUOUS_MODE,
.reserved = {}
},

...

 

2. MCIMX8M-EVK

 

SensorList App. shows no sensor information

--------------------------------------------------------------------------------

Number of Sensors=0

--------------------------------------------------------------------------------

sensor.cpp in $(MY_ANDROID)/vendor/nxp-opensource/imx/libsensors_sensorhub

has sensor information, but SensorList App. can't get this.

 

static const struct sensor_t sSensorList[] = {
{
.name = "Freescale Sensor Hub Accelerometer",
.vendor = "Freescale Semiconductor Inc.",
.version= 1,
.handle = SENSORS_ACCELERATION_HANDLE,
.type = SENSOR_TYPE_ACCELEROMETER,
.maxRange = RANGE_A,
.resolution = CONVERT_A,
.power = 0.30f,
.minDelay = 2500,
.fifoReservedEventCount = 0,
.fifoMaxEventCount = 0,
.stringType = SENSOR_STRING_TYPE_ACCELEROMETER,
.requiredPermission = 0,
.maxDelay = 640000,
.flags = SENSOR_FLAG_CONTINUOUS_MODE,
.reserved = {}
},

...

 

MCIMX6Q-SDB board has real H/W sensors, but MCIMX8M-EVK does not.

I think that the absence of real sensors has no effect to get the sensor list in sensors.cpp.

Is this correct?

 

Please help me to solve this problem.

How to get a sensor list from my MCIMX8M-EVK board in Android Sensor Framework?

 

Thanks very much in advance.

Outcomes