X4M03 python examples

Discussion in 'X2 & X4 SoC' started by Christoph Rothfuß1, Mar 21, 2018.

  1. Christoph Rothfuß1

    Christoph Rothfuß1 New Member

    Are there any examples exept the simple_xep_plot.py for the x4M03? I've read that this board is designed for developer who will make there own DSP algorithms, but isn't there any other example regarding this board? In another post I've read, that in the moduleconnector the x4_pulsedoppler.py can be modified to work with the X4M03, which are neccessary modification therefore?
     
    andrey goverdovsky likes this.
  2. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Christoph,
    The original firmware only supports raw radar data output, you can use XEP_plot_record_playback.py in Module Connector to read these data. X4M03 does not have doppler data output, only X4M200/X4M300 have doppler analysis now, so x4_pulsedoppler.py does not work with X4M03.
    There is one simple example showing how to develop firmware for X4M03: XEP X4 Distance Demo.
     
  3. Christoph Rothfuß1

    Christoph Rothfuß1 New Member

    Hi Charlie,
    thank you for your fast response! Is it possible to get the algorithm which are used in the firmware of X4M200/X4M300, so I can try to modify them for X4M03?
     
  4. Charlie Shao

    Charlie Shao Moderator Staff Member

    It is based on the open source XEP platform as X4M03 running, but the DSP part is closed.
     
  5. Christoph Rothfuß1

    Christoph Rothfuß1 New Member

    So closed or not closed? Because in the email notification to your last answer it says '...but the DSP is not closed'...
     
  6. Charlie Shao

    Charlie Shao Moderator Staff Member

    Sorry, I made a mistake, it is closed.
     
  7. Ash

    Ash New Member

    Hi, Charlie,
    May I please know that where can I find the hex file for original firmware comes with X4M03 which default only supports raw radar data output? Since i programmed it with "distanceDemo XEP example but now I want to re-program it with default firmware to run the simple_xep_plot python scripts.
    Please suggest~ Thanks.
    BR
    /Ash
     
  8. Charlie Shao

    Charlie Shao Moderator Staff Member

    Yes, of course. This firmware is called XEP. You can find it from XeThru Community resource page.
    XEP binary: https://www.xethru.com/community/resources/xep-binary.88/
    XEP source code: https://www.xethru.com/community/resources/xep-source.90/
     
    Ash likes this.
  9. Mykhailo Sorochev

    Mykhailo Sorochev New Member

    Hi Guys,
    anybody can confirm distance measurement accuracy? It says 1mm?
     
  10. Georg Michel

    Georg Michel New Member

    Millimeters are only feasible differentially by exploiting the carrier phase. The absolute distance is determined by the bandwidth which is sufficient for a few centimeters, depending on the multipath environment.

    Cheers
    Georg
     
  11. Ash

    Ash New Member

    Hi Charlie,

    Thanks for your support so far.
    well, i am running the example SimpleXepPlot.py on visual studio (using python)..but its shows error like...
    [you have to specify device, e.g.: python record.py -d /dev/ttyACM0
    Press any key to continue . . .]

    Since i tried the same using Anaconda cmd , it works while defining the proper com port like "python SimpleXepPlot.py -d COM8". Also while using visual studio (python env.) the device is defined as "device_name = "COM8". I didnt get the reason of error. I tried to debug too...showing the error at..

    (options, args) = parser.parse_args()
    if not options.device_name:
    print "you have to specify device, e.g.: python record.py -d /dev/ttyACM0"
    sys.exit(1)

    Please suggest. Thanks.
     
  12. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Ash, I do not have experience on visual studio python env, just google how to give arguments under this environment. I think this is the problem.
     
  13. Ash

    Ash New Member

    Thanks Charlie for your reply.
    But then how can I debug the example code as given? I tried on pycharm too, it come up with error message: "there is no pymoduleconnector".....please help. Thanks.
     
  14. NSANGOU CHOUAIBOU

    NSANGOU CHOUAIBOU Active Member

    Hi Ash,
    Use Python in Anaconda distribution.
    B.R,
    Chouaibou.
     
    Charlie Shao likes this.
  15. Ash

    Ash New Member

    Hi Chouaibou,
    thanks for your reply. well, i have anaconda cmd window installed and i prefer it to run the python example application. But i dont know how to debug a python script using/on anaconda cmd window. please suggest. Thanks.
    BR
    /Ash
     
  16. NSANGOU CHOUAIBOU

    NSANGOU CHOUAIBOU Active Member

    Hi Ash,
    First of all, your python script in module connector has to perform his task and then if you want to debug for any reason, you will just add code lines in your script to display data on the cmd window console or in Spyder. Use Spyder IDE (in Anaconda) to open your python script from the computer folder and modify it, if you want.

    B.R,
    Chouaibou.
     
    Last edited: Dec 14, 2018
  17. Ash

    Ash New Member

    Hi Chouaibou, thanks for your reply.
    I will try accordingly. Thanks

    Best Regards,
    /Ash