Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Greetings,

 

I have been following the thread about using the accelerometer and I have my code working in the simulator. 

I move it to the device (not on the market yet) and in my ReadData function I am always getting an error of 1 which is the generic EFAILED. I am on the BrewMP Platform 1.0.2.488.

Please note I have been searching for this other document that the API refers to Sensors Messaging Protocol (80-VF213-1).  I suppose this document is buried in the distribution somewhere. 

I have tried two simple commands:

 

One to setup the frequency and one to retrieve the data.  I send the request to get the data after the set command has succeeded. 

 

   STRLCPY(pRequest[0].sns_DataType, AEESENSOR_DATA_TYPE_ACCELX, sizeof(pRequest[0].sns_DataType)); 
   STRLCPY(pRequest[0].sns_Attribute, AEESENSOR_ATTRIBUTE_FREQUENCY, sizeof(pRequest[0].sns_Attribute)); 
   STRLCPY(pRequest[0].sns_Operator, AEESENSOR_CONDITION_NONE, sizeof(pRequest[0].sns_Operator)); 
   pRequest[0].sns_value = 10; 

   STRLCPY(pRequest[1].sns_DataType, AEESENSOR_DATA_TYPE_ACCELY, sizeof(pRequest[1].sns_DataType)); 
   STRLCPY(pRequest[1].sns_Attribute, AEESENSOR_ATTRIBUTE_FREQUENCY, sizeof(pRequest[1].sns_Attribute)); 
   STRLCPY(pRequest[1].sns_Operator, AEESENSOR_CONDITION_NONE, sizeof(pRequest[1].sns_Operator)); 
   pRequest[1].sns_value = 10; 

   STRLCPY(pRequest[2].sns_DataType, AEESENSOR_DATA_TYPE_ACCELZ, sizeof(pRequest[2].sns_DataType)); 
   STRLCPY(pRequest[2].sns_Attribute, AEESENSOR_ATTRIBUTE_FREQUENCY, sizeof(pRequest[2].sns_Attribute)); 
   STRLCPY(pRequest[2].sns_Operator, AEESENSOR_CONDITION_NONE, sizeof(pRequest[2].sns_Operator)); 
   pRequest[2].sns_value = 10; 

   STRLCPY(pRequest[3].sns_DataType, AEESENSOR_DATA_TYPE_DIRANGLE, sizeof(pRequest[3].sns_DataType)); 
   STRLCPY(pRequest[3].sns_Attribute, AEESENSOR_ATTRIBUTE_FREQUENCY, sizeof(pRequest[3].sns_Attribute)); 
   STRLCPY(pRequest[3].sns_Operator, AEESENSOR_CONDITION_NONE, sizeof(pRequest[3].sns_Operator)); 
   pRequest[3].sns_value = 10; 

   result = ISensorUtil_CreateRequest(pMe->m_su,  
                                      ISensorUtil_SNS_CMD_SET,  
                                      pRequest, 4,  
                                      pMe->m_writeBuf, MAX_SIZE_BUFFER, &pRequiredLen);


   result = IPort1_Write(pMe->m_sensor, (byte*)pMe->m_writeBuf, STRLEN(pMe->m_writeBuf)+1, &i);

 

In ReadData i do the following steps:

 

 IPort1_Read(pMe->m_sensor, (byte *)pMe->m_readBuf, MAX_SIZE_BUFFER, &i);

ISensorUtil_IterCreate

ISensorUtil_IterNumMessagesInResponse

ISensorUtil_IterNextErrorCode

ERRORI even tried the basic code from the other thread just to try and read from the port but I always get an error returned from the call to .IterNextErrorCode

 

 

 

Ah ha!!
 
I located the Sensor Messaging Protocol document and now I can see whats going on. 

Ah ha!!
 
I located the Sensor Messaging Protocol document and now I can see whats going on. 

Mike, where did you find the document?  Was it on the BrewMP site or in the SDK?

Mike, where did you find the document?  Was it on the BrewMP site or in the SDK?

the documentation may be found in both Brew & Brew MP API ref.
search for "Accelerometer" in the API ref, you would get a link to the documentation of Sensors Messaging Protocol
Its missing from version 1.0.2.549.1. But should be available in 1.0.2.448, 320, 410, 481.

the documentation may be found in both Brew & Brew MP API ref.
search for "Accelerometer" in the API ref, you would get a link to the documentation of Sensors Messaging Protocol
Its missing from version 1.0.2.549.1. But should be available in 1.0.2.448, 320, 410, 481.

Hello,
 
the current documentation mentiones Sensors Messaging Protocol (80-VF213-1).  Where do we find this document?
 
=>
"The Document Sensors Messaging Protocol (80-VF213-1) does not exist on this site".
 

Hello,
 
the current documentation mentiones Sensors Messaging Protocol (80-VF213-1).  Where do we find this document?
 
=>
"The Document Sensors Messaging Protocol (80-VF213-1) does not exist on this site".
 

Followup to myself:
 
file:///C:/Program%20Files/Qualcomm/Brew%20MP%20SDK/Platforms/1.0.4.601%20Pro/Deprecated/pvs/documentation/Test_Frameworks_API_Reference/doc/Sensor.htm
 
I'd be thankful if anybody could clean up the documentation.

Followup to myself:
 
file:///C:/Program%20Files/Qualcomm/Brew%20MP%20SDK/Platforms/1.0.4.601%20Pro/Deprecated/pvs/documentation/Test_Frameworks_API_Reference/doc/Sensor.htm
 
I'd be thankful if anybody could clean up the documentation.

The link to Sensor Messaging Protocol Document is in correct in 1.0.4 API refrence.
If you want the document please use either version use documentation of 1.0.2 or the location provided in previous post by Jost.

The link to Sensor Messaging Protocol Document is in correct in 1.0.4 API refrence.
If you want the document please use either version use documentation of 1.0.2 or the location provided in previous post by Jost.