MK2-A210 and Gxsm-2.0 on Ubuntu 10.10

1 2 > >> (Page 1 of 2)
  • Jonghee

    Jonghee - 2011-02-12

    Hi GXSM Team,

    I am trying to implement a STM control system using Gxsm-2.0 software and a
    MK2-A810 controller from SoftDB. I believe it was successful in installing
    Gxsm-2.0 with by applying several tips on this forum because I didn't see any
    error messages during entire installation. However it was not satisfactory to
    install the MK2-A810 driver on Ubuntu. What I mean by “not satisfactory” is
    that I ignored some error messages during “make” step of Sranger driver
    installation and proceeded “make install”.

    Here I describe the detailed summary of what I have done for Gxsm-2.0 and
    Sranger installation.

    1. My pc has Ubuntu 10.10 (32bit) installed and kernel release is 2.6.35-25-generic.

    2. Then I installed the following packages using “sudo apt-get” as preparation of Gxsm and Sranger installation:

    cvs, checkinstall, gnome-common, libglib2.0-dev, libgtk2.0-dev, libgnomeui-
    dev, libgtkglext1-dev, libfftw3-dev, libnetcdf-dev, freeglut3-dev,
    libquicktime-dev, libncurses5-dev, libgtkdatabox-dev, linux-headers-generic,
    automake1.9, netcdf-bin, libesd0-dev

    1. Then checkout the source codes of Gxsm and Sranger.
      $ cvs -z3 co -P

    $ cvs -z3 co
    -P Sranger

    1. Configure, Compile, and Install Gsxm-2.0

    $ cd

    $ cd Gxsm-2.0

    $ ./

    $ make

    $ sudo make install

    I did not have any problem during these procedures.

    1. Configure, Compile, and Install Sranger
      Configure was fine but I faced some error messages as following.

    main.o: In function `open_sound':

    /home/empstm/SRanger/TiCC-project-files/DolbyThx/main.c:140: undefined
    reference to `esd_monitor_stream'

    collect2: ld returned 1 exit status

    make: *** Error 1

    make: Leaving directory `/home/empstm/SRanger/TiCC-project-files/DolbyThx'

    make: *** Error 1

    make: Leaving directory `/home/empstm/SRanger/TiCC-project-files'

    make: *** Error 1

    make: Leaving directory `/home/empstm/SRanger'

    make: *** Error 2

    Then I took following procedures by ignoring errors in compilation and

    $ cd

    $ cd SRanger

    $ ./

    $ make -i

    $ sudo make -i install

    1. Then installed the kernel module for MK2-A810

    $ cd modules-mk2-2.6.x

    $ make -C /usr/src/linux-headers-2.6.35-25-generic/ SUBDIRS=$PWD modules

    $ sudo checkinstall make -C /usr/src/linux-headers-2.6.35-25-generic/
    SUBDIRS=$PWD modules_install

    $ sudo depmod -a

    $ sudo modprobe usb-sranger_mk2

    Then I opened “/lib/udev/rules.d/50-udev-default.rules” and added the
    following comment at the end of file:

    KERNEL=="sranger_mk2_" MODE="0666"

    1. Shutdown PC, power on MK2-A810, and boot PC.

    2. Execute “gxsm2” without any option for the first time and finish configuration of parameters.
      Here are some error(?) messages of “12 lines” of “PCS H USRout: 0 ==> 0000 h”
      since then.

    $ gxsm2

    GXSM-DebugLevel/PI-DebugLevel/ForceGDefaults: 0/0/0

    DSPDev :/dev/sranger_mk2_0


    SR-MK2-HwI::sranger_mk2_hwi_query:: <SRangerMK2:SPM>

    SR-MK2-HwI::sranger_mk2_hwi_query:: ConnectPluginToCDFSaveEvent

    PCS H USRout: 0 ==> 0000 h

    . . . . . . . . .

    . . . . . . . . .

    PCS H USRout: 0 ==> 0000 h

    loaded HwI PI (OK) :: sranger_mk2_hwi-HW-INT-1S-SHORT


    1. I've been testing scanning for a few days after successful Gxsm-2.0 installation and unsatisfactory MK2-A810 driver installation on Ubuntu 10.10 (32bit). So far operation of the MK2-A810 controller looks fine. But I still wanted to fix the error messages shown in step 4. So I was hoping to fix the problem by updating Gxsm-2.0 and Sranger using the python script “”.


    $cd ./Gxsm-2.0/tools


    1. To my regret I got pretty much the same error message during Sranger compilation as following:

    main.o: In function `open_sound':

    /home/empstm/SRanger/TiCC-project-files/DolbyThx/main.c:140: undefined
    reference to `esd_monitor_stream'

    collect2: ld returned 1 exit status

    make: *** Error 1

    make: Leaving directory `/home/empstm/SRanger/TiCC-project-files/DolbyThx'

    make: *** Error 1

    make: Leaving directory `/home/empstm/SRanger/TiCC-project-files'

    make: *** Error 1

    **** Installation failed. Aborting package creation.

    Can you help me to fix the problem in configuration of Sranger in step 4? In
    addition is the error message appearing when executing “gxsm2” related to the
    error in step 4? Or something else related to setting parameters? Last but not
    the least, I would appreciate if you let me know about how to remove
    completely Gxsm-2.0 and Sranger after they are already installed using make
    install. This is for clean install in case new release of either of program is
    available in the future.

    Thank you very much for any tips and help.

    P.S. I have several other questions but I will hold them until I fix the most
    crucial one.

  • Thorsten Wagner

    Thorsten Wagner - 2011-02-12

    I have not been able to reproduce the error during compilation of the sranger
    stuff. Anyway, the error does not do any harm for the operation of your spm
    contoller. Percy likes to play around with his DSP. Therefore he tried a bike
    computer and this thx-decoder. As yoe see the compiler asks for some sound
    device. You may try to install libesd0 and libesd0-dev. I have these packages
    installed on my ubuntu 10.04.

    For your board it is suffiecient tohave the kernel driver in modules-mk2.6.x
    properly installed. By the way,I added yesterday some option to the updated
    script to do the job also on the kernel modules. It is now version 1.2.


  • Jonghee

    Jonghee - 2011-02-12

    Hi Thorsten,

    Thank you very much for your response.

    I checked libesd0 and libesd0-dev on my system. They were already installed.
    Here is the output.

    $ dpkg --list|grep libesd0

    ii libesd0 0.2.41-7 Enlightened Sound Daemon - Shared libraries

    ii libesd0-dev 0.2.41-7 Enlightened Sound Daemon - Development files

    By the way I am just tempted to uninstall SRanger completely and reinstall it
    from scratch. Would you advise me of how to do it in my case? As I mentioned
    earlier, I used ignore "-i" option for compilation and installation.


  • Percy Zahl

    Percy Zahl - 2011-02-12

    do not worry about this esd issue -- this is an very old DSP (even old RS-STD
    only) sub project.. and my guess it's just an outdated call to libesd of the
    later generation -- no need for this at all for any SPM usage.

    All you need from SRanger CVS module is to compile/install the kernel module
    you need.

    And eventually the DSP code if you ever plan to play with it your self. But
    there for you also need to install the TI compiler. Else the latest binary is
    always included in CVS ready to load to the DSP flash (MK2-A810).

  • Jonghee

    Jonghee - 2011-02-13


    Let me recap what you said. In case of using a MK2-A810 SPM controller
    together, I only need to take the step 5 - I don't need to take the step 4.

    Also I don't have to worry about the following message when executing gxsm:

    PCS H USRout: 0 ==> 0000 h

    By the way, when gxsm is executed, I noticed that the panview window pannel
    does not show maximize/minimize/close/ resize buttons. Is this the way it
    should be?

    Lastly when closing gxsm, from time to time, it shows "Segmentation fault"
    message. Is this OK?


  • Percy Zahl

    Percy Zahl - 2011-02-13

    Yes only A810 module install. The "udev/rules" part is very convenient, I
    unfortunately the exact location of those definitions is very linux
    distribution and version dependent. (Also you always can do a manual "sudo
    chmod a+rw /dev/sranger*" once the module is loaded and the sranger is
    connected to USB.) So you can run gxsm and access the sranger as regular user.

    Do not worry, there are many many informative/debug... etc terminal messages
    you most likely have no clue about w/o more involved into developments -- I
    just left a few messages always enabled. It's a bit "verbose", but does not
    harm anything.

    Yes, I disables the "PanView" window decorations to save space.

    You can always access / move the window manager function via holding left
    "ALT" key and then drag or right click on it!

    Yes, there is under some circumstances a seg fault at exit related to one not
    so nice plugin termination :-( It occurs only under certain circumstances at
    first start.

  • Jonghee

    Jonghee - 2011-02-13

    Thank you very much for your kind and quick response. Now I feel more
    comfortable about installing gxsm and the kernel module for MK2-A810

    Additional question is that the option "-j4" when compiling gxsm. If I use a
    pc which has dual cores of CPU with hyperthreading capability, should I use
    "-4j" or "-2j"?

    Anyway it's time to explore all functions of the SPM controller using Gxsm.
    First of all I am trying to find out how to achieve coarse approach of STM tip
    to sample surface. I don't want to start this question here because this
    section is dedicated for gxsm and sranger installation. Can you advise me of
    which old threads I had better look at first? What I really need is to ask
    MK2-A810 to retract a tube piezo scanner in the beginning, and start sending
    TTL trigger signals to a Attocube motor controller until a certain amount of
    tunneling current is detected. So after each step (or each trigger signal) is
    made, tunneling current need to be checked by extending the tube piezo scanner
    to z direction.

  • Percy Zahl

    Percy Zahl - 2011-02-14


    the make option -j (see "man make") is the number of compile job spanned at a
    time. Yes, if you have a quad core with 4x hyper threading you can get your
    machine smoking with make -j16 .... o:] -- On our latest machine I did that
    and a full Gxsm compile from scratch takes 72 real second...

    I am not familiar with the coarse atto cube controller.

    Gxsm/A810 can handle quite a number of approach modes (several analog ramp
    modes for "Besocke Type"), but also TTL (actually 3.2V low power) via DIO
    controls / pules (a wide range of bit patterns to set direction and apply
    pulses can be configured).

    Then this works seamless with the DSP level auto approach procedure.

  • Jonghee

    Jonghee - 2011-02-14

    Thanks for quick response and tips.

    Luckily I found that I could pule out trigger signals by turning off "High
    Resolution Mode" which was possible by executing a python script
    "" under "/SRanger/TiCC-project-
    files/MK2-A810_FB_spmcontrol/python_scripts/". Then execute gxsm2.

    In gxsm main pannel,

    Windows >> SR-DSP Mover >> Config:

    I chose "Pulse: positive" in Curve Mode and "X-Motor" in Output on.

    Windows >> SR-DSP Mover >> Auto:

    By clicking "Auto approach" icon I can observe trains of pulse signals at M(0)
    on the controller, which corresponds to DAC7. When set value was reached,
    coarse approach stopped and feedback was turned on.

    I am glad that now I can approach surface although the final step of coarse
    approach is a bit different from what I get used to - our old STM system
    retracts piezo tube and turn off feedback when the tip reaches within
    tunneling regime,

    In addition I noticed that turning off High Resolution mode is set back on
    again when I did cold-start DSP. Wonder if I can set off by default.

    Lastly USB hotplug function is working by now. So I don't have to reboot the
    PC in case MK2-A810 is unplugged and plugged back in.

    I really appreciate your swift responses and detailed explanations.

  • Percy Zahl

    Percy Zahl - 2011-02-14

    I would strongly recommend to use the GPIO (sub-D port in the back of the box
    with TTL (3.2V level)) to trigger.

    And take advantage of the "HR" mode. Yes, it is always on at cold start/boot
    (you would have to adjust and recompile the DSP code to change this) -- but
    you do not do this often at all -- I have the DSP running for month
    uninterrupted... Gxsm can connect/disconnect to it any time -- even multiple
    instances are possible -- even so you should know what your are doing -- i.e.e
    not attempt to scan with both -- lol....

    For example if I have see (remotely logged on from home for example) the scans
    are done and Gxsm is idle -- I can start a 2nd gxsm and just watch the
    "PanView" and see what is happening (not touch any DSP settings so!!!) -- as I
    could for example change bias while a different gxsm is scanning.... that may
    be confusing.

    But once the "local" gxsm is idle, I could take over scanning, etc. from home!
    -- and vice versa.

    Good luck with all!

  • Jonghee

    Jonghee - 2011-02-14

    Thanks again.

    I think installation of GXSM and MK2-A810 kernel module is satisfactory by
    now. So I will start other questions in appropriate forum.

    First of all to better understand how GPIO can be accessed/controlled I
    already started a new topic in Help:

  • danuss

    danuss - 2012-06-12

    hi every one....

    Actually i installed Gxsm 2.0 and MK2-A810 signal ranger. it is working fine,
    but some problem while staring the the project.

    the problem as shown below...

    DSP software mismatch is coming. exiting software is 20.14

    required software is 20.30.

    1. so how to change the software version in DSP.
    2. how to get drivers for signal ranger MK2-A810 in order to use in windows OS.

    waiting for reply.....

    pls help me....

  • danuss

    danuss - 2012-06-12

    Thanks for reply.... but still i am getting problems. let me explain what
    things i did..

    Initially i had mk2 DSP + SR2-A810. i updated my firmware to SR2-NG(next
    generation) by using migration tools provided SoftdB web site. i am trying to
    run some applications like "analog self test" , analog OS Controller test"

    i am using mini debugger for downloading the codes in to my hardware (DSP code
    and FPGA code). one thing i want to know, how can i get codes for DSP and

    first, you already given one link for DSP code
    " is that same
    as the one i am looking or some thing different from that. second, what about
    FPGA code?

    and one more thing i am remembering, when i am running GXSM in linux, it
    requires DSP version 20.30. At present it is showing 20.14.

    You can also suggest me if any other procedure to change the DSP version. (my
    hardware mk2 DSP + SR2-A810) (i am using GXSM2 in LINUX10.10 version))

    waiting for reply.....

  • Thorsten Wagner

    Thorsten Wagner - 2012-06-12

    The binary file should contain the firmware 20.30 - same time a modified
    source was uploaded. This is definetelly the latest firmware released by the
    project in May 2012. Maybe it is vise versa and you need to update your GXSM?

    After uploading the code, please unpower your SPM controller. Only after this
    the new DSP code is active.

    You may check the actual version on the board via the script

    What other code you are looking for?

    For the FPGA code search your computer for the file
    within the packages supplied by softdb. You may install the old SR2 driver to
    find it. Here is the link:
    I have in mind that this is not part of the
    SR3 tools. If needed I can send you the file via email.

    About updating the board an a linux system: Sorry, the loadusb-mk2 is not
    working yet. So you have to do it on a windows system. You may use a
    virtualbox/vmware installation to do it.

    Thorsten :-)

  • danuss

    danuss - 2012-06-13


    can u send the file to my mail id.

    waiting for reply....

  • danuss

    danuss - 2012-06-13

    hi also want to confirm once from your side.

    the file which you mentioned for FPGA is "" same as
    .rbt file. i have downloaded the software from soft db web. after installation
    i got .rbt files. is both files are same??

  • danuss

    danuss - 2012-06-13


    My signal ranger is working now, thank you for valuable

    And one more issue i am facing.. actually i bought 2 signal ranger modules, in
    that one module is not detecting in windows. Basically if we connect the
    hardware to PC, there are some 3 colors will come(red, yellow and green).

    for my 2nd module it is coming only red light. let me explain what i did

    first, for my second board also i was trying to update it to SR_NG(Next
    generation) from SR, i did 2 times after that in 3rd in middle it was stopped,
    from that time my hardware was not detecting it is coming only Red light..

    so what to do... any suggestions...

    waiting for reply...

  • Percy Zahl

    Percy Zahl - 2012-06-13

    You should be able to plug in several MK2 or MK3 boards and they will be auto
    detected and assigned /dev/sranger_mk2_0...N

    I do this quite often.

  • danuss

    danuss - 2012-06-15

    still not coming yellow light, only red light is coming.......

  • danuss

    danuss - 2012-08-06

    Hi all,

    my hardware is SR -- MK2 module. i am not able to update the DSP and FPGA
    codes in my module, that is because my hardware itself not detecting ( only
    red color was coming). i think i need to update firmware it seems but do not
    know how to proceed....

    suggest me

    waiting for reply............

    thanking You

  • danuss

    danuss - 2012-08-07

    Actually for doing update itself my hardware is not detecting, when i was
    connecting to PC in windows it was coming "USB Device Not Recognized".

    any solution to rectify this prob........

    waiting for reply.......

  • Percy Zahl

    Percy Zahl - 2012-08-07

    did you installed all the win apps/drivers from softdb?

1 2 > >> (Page 1 of 2)

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks