This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC26X2R1: AoA Raw IQ Data Question - Possible Bug in SDK python code

Part Number: LAUNCHXL-CC26X2R1

Hello,

I believe I have found a bug in the simplelink_cc13x2_26x2_sdk_5_10_00_48 python scripts.

I'm working on my application code and have written a debug output to csv for the IQ data and some of my calculations. I am simultaneously outputting the raw data using the RTLS_CMD_AOA_RESULT_RAW mode that is built into the python and firmware code in the sdk. When I compare the results, I see the I and Q data is swapped in my debug output compared to the RTLS_CMD_AOA_RESULT_RAW output. I am testing in connected mode (not in passive mode).

The structure definition in rtls_ctrl_aoa.h for rltsAoaResultRaw_t includes the structure "AoA_IQSample_Ext_t"

The structure definition in AOA.h for AoA_IQSample_Ext_t is copied below. Note that in this definition, for passive (connectionless) mode, "Q" is before "I". For non-passive (connected) mode "I" is before "Q".

/// @brief 32 bit IQ Sample structure
typedef struct
{
// Note that Passive takes the samples directly from RF core RAM
// Hence the format is different than the Master
#ifdef RTLS_PASSIVE
int16_t q; //!< Q - Quadrature
int16_t i; //!< I - In-phase
#else
int16_t i; //!< I - In-phase
int16_t q; //!< Q - Quadrature
#endif
} AoA_IQSample_Ext_t;

When I look at the structure definitions in the python script "ss_rtls.py", I see the following structure for non-passive (connected) mode:

class AoaResultRaw(NpiRequest, AsyncReq, FromNwp):
command = Commands.RTLS_CMD_AOA_RESULT_RAW
struct = Struct(
"connHandle" / Int16ul,
"rssi" / Int8sl,
"antenna" / Int8ul,
"channel" / Int8ul,
"offset" / Int16ul,
"samplesLength" / Int16ul,
"samples" / GreedyRange(Struct(
"q" / Int16sl,
"i" / Int16sl,
)),
)

When I look at the structure definitions in the python script "ss_rtls.py", I see the following structure for passive (connectionless) mode:

class ClAoaResultRaw(NpiRequest, AsyncReq, FromNwp):
command = Commands.RTLS_CMD_CL_AOA_RESULT_RAW
struct = Struct(
"syncHandle" / Int16ul,
"rssi" / Int8sl,
"antenna" / Int8ul,
"channel" / Int8ul,
"offset" / Int16ul,
"samplesLength" / Int16ul,
"samples" / GreedyRange(Struct(
"q" / Int16sl,
"i" / Int16sl,
)),
)

Note that "Q" is listed before "I" in both of these structures. I believe that "I" should be before "Q" in the non-passive (connected) structure in the ss_rtls.py script. Please let me know if you agree with this.

If I have missed something and RTLS_CMD_AOA_RESULT_RAW output to csv for non-passive (connected) mode should be working correctly, I'll continue to look elsewhere for my bug. 

Thank you for your support.