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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

191 Views
sky1
Contributor I

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.

0 Kudos
1 Reply

75 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi james,

 

    There is no sensor supported on i.MX8M-EVK,  It means that there is no any sensors hardware related to libsensor.  So you couldn't get corresponding list.

 

Have a nice day!

TIC weidong sun

0 Kudos