Read values from X4M03 with C++ on ARM64 platform

Discussion in 'X4M03' started by Al123, Jan 8, 2019.

  1. Al123

    Al123 New Member


    I want to read values from an X4M03 on a Linux ARM64 platform.

    I've been able to compile programs and read values using Module Connector libraries for Linux on an x86 computer. However, there's no Shared Object that can be used on a Linux ARM64/AARCH64 platform, so I'm unable to read sensor values from that platform using Module Connector.

    I've also tried to use the Module Communication Protocol Wrapper by modifying the example code in examples/generic/src/main.cpp based on instructions found in this thread:

    However, the mcpw functions, like mcpw_set_sensor_mode or mcpw_load_profile, all return failure values.
    Console output is shown below:

    "~/Downloads/mcp_wrapper_1.3.1new/examples/generic$ ./mcpw_demo /dev/ttyACM0 x4m300
    Starting mcpw_demo_x4m300.
    Connecting to XeThru module on /dev/ttyACM0.
    Starting serial port read thread.
    mcpw_load_profile failed.
    mcpw_set_noisemap_control failed.
    mcpw_set_detection_zone failed.
    mcpw_set_sensitivity failed.
    mcpw_set_led_control failed.
    mcpw_set_output_control(XTS_ID_PRESENCE_SINGLE) failed.
    mcpw_set_output_control(XTS_ID_PRESENCE_MOVINGLIST) failed.
    mcpw_set_output_control(XTS_ID_BASEBAND_AMPLITUDE_PHASE) failed.
    mcpw_set_sensor_mode failed."

    Calling only the mcpw_ping and mcpw_module_reset functions work though (both return the MCPW_OK signal).

    Is there a way to obtain a Shared Object file for Linux ARM64?
    How do I modify the mcpw example code to work for an X4M03, or could you provide some example code for this module using the mcpw?

    Thanks so much for your help!

  2. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Al123,
    Unfortunately, ModuleConnector does not support Linux ARM64 platform by far, see the reason

    I suggest you switch to the open source MCPW which is written by C, the generic example can be compiled at a generic computer, you can try and transplant to your custom platform. This example only contains functions to read the message from sensors like X4M200/X4M300, for X4M03 you need to add new functions to read radar raw data, the procedure is the same with ModuleConnecter example:
  3. Al123

    Al123 New Member

    I'll take a look, thanks for the reply!
  4. Charlie Shao

    Charlie Shao Moderator Staff Member