Amplitude phase data from X4M300

Discussion in 'Presence Sensor' started by Waleed Eltaweel, Jan 10, 2018.

  1. Waleed Eltaweel

    Waleed Eltaweel New Member

    Hi,

    I am working on a distance tracking solution on arduino using X4M300, I'm re-using the arduino library made for X2M200 that is posted in resources.

    I have successfully loaded the profile presence2 and I'm receiving the presence_single(0x723bfa1e) and presence_movinglist(0x723bfa1f) by default.

    I'm trying to enable the amplitude phase output by sending the command:

    0x41 - 0x10 - 0x0000000d - 0x00000001

    and I receive acknowledgment:

    0x7D - 0x10 - 0x6D - 0x7E

    but then I still only receiving the moving list and presence single only..

    I tried to disable presence single to make sure I'm using the set output correctly, and I can successfully stop the presence single..
    any idea why I can't receive the amplitude phase data ?
     
  2. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Waleed,

    I checked with MCPW example, got some information that might be helpful to you.
    There is one function called mcpw_set_output_control in MCPW, it calls function createSetOutputControlCommand, which shows the structure of command:
    start + XTS_SPC_OUTPUT + XTS_SPCO_SETCONTROL + output_feature(uint32_t) + output_control(uint32_t) + CRC + end

    //Output control
    #define XTID_OUTPUT_CONTROL_DISABLE (0)
    #define XTID_OUTPUT_CONTROL_ENABLE (1)
    // output_feature id for X4M300
    #define XTS_ID_PRESENCE_SINGLE 0x723bfa1e
    #define XTS_ID_PRESENCE_MOVINGLIST 0x723bfa1f
    #define XTS_ID_BASEBAND_IQ 0x0000000c
    #define XTS_ID_BASEBAND_AMPLITUDE_PHASE 0x0000000d

    Keep in mind that XeThru serial protocol assumes litle-endian byte order.
    Please check if you have used the correct command.