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.

Qt Creator Embedded Debugging Setup not working

Other Parts Discussed in Thread: DM8107

following the document Qt Creator Embedded Debugging Setup

After following the steps I get to the section 

Connecting a Linux Device

The Qt is suppose to test the connect, but mine is not successfull and there is no further information if the connection fails.

I get the error:  "SSH connection failure: Connection refused  Device test failed." from QT

I cannot find any help for a SSH connection to my DM8168 evm board.

please someone help

I am using the EZSDK 5_3_01_15

  • Well I guess I missed the fine print at the top of the doc,  DropBear is required,  That's great seeing that the EZSDK doesn't include that, it would be nice if the document goes through how to install that on the evm's file system, to be a consice, efficent, and informative document.

    So how do I get dropbear on my DM8168evm?   anyone?

  • Help Help Help Help!

    Some one must know how to help me out there?  wheres the support for your Product TI!

    I think I install Dropbear on the target,  targetfs/bin  well at least thats a director that one web site said to put it.

    but I am still getting the 

    Connecting to host...

    SSH connection failure: Connection refused

    Device test failed.

    when QT creator tries to test the connection.

    I am new to linux, so I am totally lost on what I should do,  not sure why everyone says Linux is so great... it has caused me nothing but frustration and anger.  

    PLEASE IS THERE ANYONE OUT THERE WHO CAN HELP!

  • Well since it would seem that I am the only one on the planet that is trying to do this,  I just keep posting info that I find combing the web, in hopes that it might help someone else

    The thing about dropbear is that you have to cross compile it for your target,  this web site was very helpfull,  NOT A TI SITE!

    https://sites.google.com/site/al271828183x/techblog/dropbearhow-tosetupsshserveronembeddedlinuxtargets

    this link seems strange so if you cannot get to it just google the phrase "Dropbear: How-To setup SSH Server on Embedded Linux Targets"

    After following the section near the end for Dropbear,  I actually received a different error message:

    SSH connection failure: Server rejected password.

    Device test failed.

    Which seems contrary to what the original artical I was following:http://processors.wiki.ti.com/index.php/Qt_Creator_Embedded_Debugging_Setup

    which states in the "Connection a linux device" section to leave the password blank!

    I seem slightly closer, back to Google.

  • It seems like I am getting a transaction between the server and client but I am getting error message, then the connection fails.

    I start dropbear with -E -s -g

    the server message:

    Child connection from 192.168.1.24:47174
    [1423] Dec 09 15:11:03 Exit before auth (user 'root', 1 fails): Disconnect received

    client message:

    SSH connection failure: Server rejected password.

    If I disabled using a password, and the client doesn't send a password, why do I get a password error?  This is so frustrating, I hope I get this solved soon I need to get some real work done.

  • I finally got past the section in the original article step by step I was following. :)

    The problem with the intitial test of the ssh connect was that I had to create a password for the evm root login?

    Not sure if it was dropbear not working even when I gave the arguments -s -g or if QT creator is just a little wierd and really wants a value in the password field for the connection.

    At any rate the original article is incorrect and I am not sure how they got it to work as described.

    FYI to set a password:

    after logging in to the target just type: passwd

    hopefully the rest of the instruction goes smoothly, this section took me 3 days just to get working.

  • I got to the end of the Document I have been following and ran debug mode...nothing happened, Qt got stuck in build mode. I had to exit the app

    Happened to notice on the terminal window were I launched QT a error message:

    Unexpected extended data 'sh: /usr/libexec/sftp-server: not found
    ' of type 1 on SFTP channel.
    Remote SFTP service exited with exit code 127

    The document doesn't mention setting up SFTP, what is SFTP and were should it be installed

    Hello TI this is your docuemnt, its  incomplete and to many errors.  Following it doesn't not get me a debug environment its be 5 days trying to get this to work.

    Any one else do this before and know what SFTP is and where it should be installed?   another day Googleing :(

  • Hi Jeffrey,

    I will update the wiki page to cover supported platforms so others will be aware. This wiki page has been tested against the am335x, am35x, am37x, and am180x.  It looks like EZSDK for the 816 is missing the sftp-server and maybe more. We utilize an automated build system.  I checked this system to find that the sftp-server is built from the open-ssh package: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-5.6p1.tar.gz

    Then there is an addtional patch : openssh-5.2-sftp-server-nolibcrypto.patch

    which is used to modify the makefile to generate the sftp-server.

    You can find that patch here: 

    git://arago-project.org/git/arago-oe-dev.git

    it is located under the directory: arago-oe-dev/recipes/openssh/openssh-5.6p1

  • Thanks for the reply.

    But being really new to linux, I don't understand what info your are giving me?

    should I download the ftp file your pointing to?  Then what do I do with it? I am not sure what that is.

    The patch you mentioned is for the ftp file I downloaded?

    Also I am not sure what to do with the git line? If I type that in I just get an error

  • Jeffrey,

    I didn't realize you were new to Linux.  I was trying to point you to the necessary steps to install the components you needed.  There may be another alternative for you.

    You can use ethernet to NFS mount your filesystem. So your EVM's filesystem can be located on your Host LInux development machine.  Then you could use QT creator to build your project right inside the filesystem.  The only difference may be that you need to manually start and run the QT binaries once you create them, so that would be one extra step for you. You could start the newly created QT programs using your minicom console and launch them command line.

    There is a setup script (setup.sh) that comes in the root directory of our EZSDK on your host machine. If you run it, It will allow you to automatically create all the files and u-boot parameters needed to NFS boot your filesystem rather than using the SD card.

  • Hi

    So I downloaded the OpenSSH, but when I try to compile it I get an error that zlib is not installed.

    So I tried downloading that and compiling that, but it doesn't seem to install correctly for embedded linux because I keep getting errors about it when I compile OpenSSH.

    Can someone provide guidance on how to get these app compiled and installed for the DM8168?  I have been searching for days on google and can't find anything that helps me.

    From what I understand OpenSSH needs to be installed on the target to provided SFTP support because that's what QT creator uses to transfer files, is this correct or is there an alternative?  I really need to be able to debug the app I am working on, it increasly hard to debug and app with out break points and other debug windows.  

    Some out out there must have done this before?

    Thanx for the replies.

    FYI   I have been developing for Linux only for a few months, so please be as detailed as possible.

  • more details:

    Here is a compiler run for zlib on the terminal window:

    [linux-devkit]:~/Downloads/zlib/zlib-1.2.7> CC=arm-none-linux-gnuabi-gcc
    [linux-devkit]:~/Downloads/zlib/zlib-1.2.7> ./configure --prefix=/home/jdionne/zlibinstall
    Checking for shared library support...
    No shared library support; try without defining CC and CFLAGS
    Building static library libz.a version 1.2.7 with arm-none-linux-gnuabi-gcc.
    Checking for off64_t... No.
    Checking for fseeko... No.
    Checking for strerror... No.
    Checking for unistd.h... No.
    Checking for stdarg.h... No.
    Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf().
    Checking for snprintf() in stdio.h... No.
    WARNING: snprintf() not found, falling back to sprintf(). zlib
    can build but will be open to possible buffer-overflow security
    vulnerabilities.
    Checking for return value of sprintf()... No.
    WARNING: apparently sprintf() does not return a value. zlib
    can build but will be open to possible string-format security
    vulnerabilities.
    Looking for a four-byte integer type... Not found.

  • I was finally able to compile zlib with out errors I think output:

    jdionne@Linux-Jeff:~/Downloads/zlib/zlib-1.2.7$ CC=arm-none-linux-gnuabi-gcc
    jdionne@Linux-Jeff:~/Downloads/zlib/zlib-1.2.7$ .//configure --prefix=/home/jdionne/zlibinstall
    Checking for gcc...
    Checking for shared library support...
    Building shared library libz.so.1.2.7 with gcc.
    Checking for off64_t... Yes.
    Checking for fseeko... Yes.
    Checking for strerror... Yes.
    Checking for unistd.h... Yes.
    Checking for stdarg.h... Yes.
    Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
    Checking for vsnprintf() in stdio.h... Yes.
    Checking for return value of vsnprintf()... Yes.
    Checking for attribute(visibility) support... Yes.
    Looking for a four-byte integer type... Found.
    jdionne@Linux-Jeff:~/Downloads/zlib/zlib-1.2.7$ make
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o adler32.o adler32.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o crc32.o crc32.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o deflate.o deflate.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o infback.o infback.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inffast.o inffast.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inflate.o inflate.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inftrees.o inftrees.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o trees.o trees.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o zutil.o zutil.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o compress.o compress.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o uncompr.o uncompr.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzclose.o gzclose.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzlib.o gzlib.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzread.o gzread.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzwrite.o gzwrite.c
    ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example example.o -L. libz.a
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/adler32.o adler32.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/crc32.o crc32.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/deflate.o deflate.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/infback.o infback.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inffast.o inffast.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inflate.o inflate.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inftrees.o inftrees.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/trees.o trees.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/zutil.o zutil.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/compress.o compress.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/uncompr.o uncompr.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzclose.o gzclose.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzlib.o gzlib.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzread.o gzread.c
    gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzwrite.o gzwrite.c
    gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o libz.so.1.2.7 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -lc
    rm -f libz.so libz.so.1
    ln -s libz.so.1.2.7 libz.so
    ln -s libz.so.1.2.7 libz.so.1
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o examplesh example.o -L. libz.so.1.2.7
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzipsh minigzip.o -L. libz.so.1.2.7
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example64 example64.o -L. libz.a
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c
    gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip64 minigzip64.o -L. libz.a
    jdionne@Linux-Jeff:~/Downloads/zlib/zlib-1.2.7$ make install
    cp libz.a /home/jdionne/zlibinstall/lib
    chmod 644 /home/jdionne/zlibinstall/lib/libz.a
    cp libz.so.1.2.7 /home/jdionne/zlibinstall/lib
    chmod 755 /home/jdionne/zlibinstall/lib/libz.so.1.2.7
    cp zlib.3 /home/jdionne/zlibinstall/share/man/man3
    chmod 644 /home/jdionne/zlibinstall/share/man/man3/zlib.3
    cp zlib.pc /home/jdionne/zlibinstall/lib/pkgconfig
    chmod 644 /home/jdionne/zlibinstall/lib/pkgconfig/zlib.pc
    cp zlib.h zconf.h /home/jdionne/zlibinstall/include
    chmod 644 /home/jdionne/zlibinstall/include/zlib.h /home/jdionne/zlibinstall/include/zconf.h

    but when I compile OpenSSH I get:

    checking for yp_match... no
    checking for yp_match in -lnsl... yes
    checking for setsockopt... yes
    checking for dirname... yes
    checking libgen.h usability... yes
    checking libgen.h presence... yes
    checking for libgen.h... yes
    checking for getspnam... yes
    checking for library containing basename... none required
    checking zlib.h usability... no
    checking zlib.h presence... no
    checking for zlib.h... no
    configure: error: *** zlib.h missing - please install first or check config.log ***
    make: *** No rule to make target `sftp-server'. Stop.
    arm-none-linux-gnueabi-strip: 'sftp-server': No such file

    zlib looked successful so why is OpenSSH saying it cannot find it?

  • the problem with the OpenSSH compile is it cannot find the zlib install,  it compiles fine for the Desktop, how do I tell the configure where the cross compiled zlib is? 

  • I've not built openSSH recently, but in many cases setting the LDFLAGS=/path to zlib

    will tell the config where to find additional libs.

    You may want to post any new issues to a new thread. New threads will be visible to everyone on the list.

  • Jeffrey,

    Did you resolve this by any chance?

    I'm running into exactly the same problem:

    Qt gets stuck in build mode with this notice on the terminal window were I launched QT from:

    Unexpected extended data 'sh: /usr/libexec/sftp-server: not found
    ' of type 1 on SFTP channel.
    Remote SFTP service exited with exit code 127

    Thanks

    Alby

  • I guess the essence of this problem is that dropbear does not seem to support SFTP. :-( 

    Installing OpenSSH on your target might be the way forward.

  • Hello,

    I understand that this thread is quite old, but I hope you fellows are still here...
    I also encounter the issue of ssh connection failure.
    I've reviewed the post exchange here, but I'm not sure as to what is the solution for this problem...

    I would like ask your expereince.
    Is it the dropbear that should fix this issue or do I need only openssh in target.

    Thank you!
    Ran
  • You need something like this:

    1>build sftp-server for your target (in my case ARM)

    2>cp ~/dm8107/tools/openssh-6.0p1/build/sftp-server ~/dm8107/filesys/fs/usr/libexec/

    3>cp -avr ~/dm8107/rdk/dvr-rdk/ti_tools/cgt_a8/arago/linux-devkit/arm-arago-linux-gnueabi/usr/lib/libcrypto.* ~/dm8107/filesys/fs/usr/lib

  • Thank you very much, Alby
  • Hi Alby,

    I have ssh connection OK (dropbear),
    but I don't know why sftp does not work (I get the error in qt)
    I've start sftp server in target and it gives no error:
    root@dm814x:~# /libexec/sftp-server &
    But on trying to start qt debug it still gives sfto error 127.

    Is there any idea ?
    Thaks,
    Ran