Forum Discussion

Varshasri's avatar
Varshasri
Icon for New Contributor rankNew Contributor
1 year ago
Solved

SSH connection lost - Cannot copy executable file into de10-nano

Hello!

I was following the "my_first_hps" tutorial, to copy my executable file into the de10-nano board, and got stuck at the point where we use the following "scp" command line in the Embedded command shell. (My file name is "pulse")

<scp pulse root@192.168.3.115:/home/root>

I'm getting an SSH connection lost error - the request timed out in my Embedded command shell.

The IP address is the eth0 inet address as shown in my puTTY "ifconfig".

I rechecked my cable connections- they seem to be fine.

I have used the same method and command previously to copy the "my_first_hps" executable file into the de10-nano board and that worked. I don't know why it is not working now, or what am I doing wrong?

Is there a way to solve this ssh connection error? Or can you suggest an alternative method to copy the executable file into de10 nano?

Thank you.

  • Hi Varshasri

    Sorry for the delay in getting back to you in this case and thanks to BXia for helping out in this case.

    I suspect the issue is due to the IP address not being on the same network 192.168.3.111 vs 192.168.0.1 on your pc but it is strange when you have both PC and DE10 ethernet connected to the same router with different network. Could you check whether the IP is assigned via DHCP or static (defined by own ethernet settings) perhaps command "ip route list default" and see whether dhcp or static appear. If static you will need to change the IP manually or set back to dhcp. I think you could also go to your router page and see the list of devices IP connected to it with DHCP.

    Alternatively you can follow what BXia suggested, which is to connect directly with both having same IP network and SCP in.

    Thanks

    Regards

    Kian

8 Replies

  • BXia's avatar
    BXia
    Icon for Occasional Contributor rankOccasional Contributor

    Before doing scp, you need to make sure de10-nano and your PC can be ping reached to each other, execute ping <ip> command in cmd of PC and Putty.

    Another note, please make sure the de10-nano xfce or lxde linux image is written to the sdcard.

    Provide screenshots for your test.

    • Varshasri's avatar
      Varshasri
      Icon for New Contributor rankNew Contributor

      No, the de10-nano and my PC cannot ping reach each other.

      From my embedded command shell, I tried to ping the ip address of de10 nano eth0, it is not working (100% packet loss).

      <ping 192.168.3.136>

      I also tried to ping from my Windows PowerShell of my PC, but it still failed.

      I tried the ssh command shown in the screenshot, and it says connection timed out.

      <ssh -vvvv 192.168.3.136>

      And I think the de10 nano image is properly written to sd card, since I get the angstorm boot image when I open my puTTY session (as shown below).

      So about my setup, the de10 nano is connected to

      1. power source

      2. RJ45 cable to an ethernet router port

      3. UART to USB port cable to the USB of my PC.

      And my PC is connected to

      4. RJ45 cable to another port of the same ethernet router.

      Is my setup right? There is a different ethernet IP address assigned to my de10 nano eth0, and a different IP address for the ethernet connected to my PC.

      • BXia's avatar
        BXia
        Icon for Occasional Contributor rankOccasional Contributor

        Provide screenshots for ifconfig result in Putty, and the ping results in cmd and putty.

  • KianHinT_altera's avatar
    KianHinT_altera
    Icon for Frequent Contributor rankFrequent Contributor

    Hi Varshasri

    Sorry for the delay in getting back to you in this case and thanks to BXia for helping out in this case.

    I suspect the issue is due to the IP address not being on the same network 192.168.3.111 vs 192.168.0.1 on your pc but it is strange when you have both PC and DE10 ethernet connected to the same router with different network. Could you check whether the IP is assigned via DHCP or static (defined by own ethernet settings) perhaps command "ip route list default" and see whether dhcp or static appear. If static you will need to change the IP manually or set back to dhcp. I think you could also go to your router page and see the list of devices IP connected to it with DHCP.

    Alternatively you can follow what BXia suggested, which is to connect directly with both having same IP network and SCP in.

    Thanks

    Regards

    Kian

    • Varshasri's avatar
      Varshasri
      Icon for New Contributor rankNew Contributor

      Thank you so much, it worked!

      I checked the IP to see if it was a DHCP or static, turns out it was static.

      I changed it to DHCP and then I was successfully able to SCP into the board.

  • KianHinT_altera's avatar
    KianHinT_altera
    Icon for Frequent Contributor rankFrequent Contributor

    Hi Varshasri,

    I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.

    Thanks

    Regards

    Kian