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.

BEAGLEBK: SSH over USB

Part Number: BEAGLEBK


I want to ssh into Beaglebone black from usb interface. I was successful in doing so at the first attempt. But as I rebooted the system, I am not able to do it as I don't see any ip address assigned to usb interface on host side. 

Here are the system details:

Remote Side:

Beaglebone Black

OS:  4.1.15-ti-rt-r43

root@beaglebone:~# ifconfig
eth0 Link encap:Ethernet HWaddr 40:bd:32:c6:17:fd
inet addr:169.254.101.115 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::42bd:32ff:fec6:17fd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:1534 errors:0 dropped:0 overruns:0 frame:0
TX packets:667 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:134338 (131.1 KiB) TX bytes:376828 (367.9 KiB)
Interrupt:177

usb0 Link encap:Ethernet HWaddr 40:bd:32:c6:17:f0
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
inet6 addr: fe80::42bd:32ff:fec6:17f0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:96 (96.0 B) TX bytes:13265 (12.9 KiB)


Host Side:

OS version: 5.2.6

ifconfig:

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.213.10 netmask 255.255.255.0 broadcast 169.254.213.255
inet6 fe80::4d3e:78d4:8d71:bb6c prefixlen 64 scopeid 0x20<link>
ether d4:be:d9:0b:2a:a9 txqueuelen 1000 (Ethernet)
RX packets 656 bytes 381570 (381.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2244 bytes 279730 (279.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xe2e00000-e2e20000

enx40bd32c617ff: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::8a77:29d3:68c0:87e prefixlen 64 scopeid 0x20<link>
ether 40:bd:32:c6:17:ff txqueuelen 1000 (Ethernet)
RX packets 45 bytes 10655 (10.6 KB)
RX errors 3 dropped 0 overruns 0 frame 3
TX packets 2 bytes 540 (540.0 B)
TX errors 2668 dropped 0 overruns 0 carrier 0 collisions 0


The interface enx40bd32c617ff corresponds to usb interface (checked but I am not sure why it is not usb0). As I can see, there is no ip address assigned to it.

I tried to assign a static ip(192.168.7.1) to the interface but when I try to ssh to beaglebone black, I get the error:

ssh root@192.168.7.2
ssh: connect to host 192.168.7.2 port 22: No route to host

It would be great if someone can help me in debugging this issue.

Regards

Vishav

  • Hello Vishav,

    Please, setup an IP address both on your remote side and host computer.

    Remote Side:

    root@am335x-evm:~# ifconfig usb0 192.168.7.2 netmask 255.255.255.252

    Host Side:

    sudo ifconfig enx40bd32c617ff 192.168.7.1 netmask 255.255.255.252
    ssh -l root 192.168.7.2

    If you want to setup a static IP on your board, please refer to this post.

    Best regards,
    Kemal

  • Hello Kemal,

    Thanks for your response. I tried this but unfortunately it doesn't work. I get the error ssh: connect to host 192.168.7.2 port 22: No route to host. Here is the output of the commands you told:

    vishav@vishav-Latitude-E6320:~$ sudo ifconfig enx40bd32c617ff 192.168.7.1 netmask 255.255.255.252
    vishav@vishav-Latitude-E6320:~$ ifconfig
    eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 169.254.101.120 netmask 255.255.255.0 broadcast 169.254.101.255
    inet6 fe80::4d3e:78d4:8d71:bb6c prefixlen 64 scopeid 0x20<link>
    ether d4:be:d9:0b:2a:a9 txqueuelen 1000 (Ethernet)
    RX packets 3262 bytes 1776394 (1.7 MB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 11433 bytes 1411616 (1.4 MB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device interrupt 20 memory 0xe2e00000-e2e20000

    enx40bd32c617ff: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.7.1 netmask 255.255.255.252 broadcast 192.168.7.3
    inet6 fe80::8a77:29d3:68c0:87e prefixlen 64 scopeid 0x20<link>
    ether 40:bd:32:c6:17:ff txqueuelen 1000 (Ethernet)
    RX packets 43 bytes 10685 (10.6 KB)
    RX errors 3 dropped 0 overruns 0 frame 3
    TX packets 2 bytes 540 (540.0 B)
    TX errors 116 dropped 0 overruns 0 carrier 0 collisions 0

    vishav@vishav-Latitude-E6320:~$ ssh -I root 192.168.7.2
    ssh: connect to host 192.168.7.2 port 22: No route to host


    On beaglebone side:

    root@beaglebone:~# ifconfig usb0 192.168.7.2 netmask 255.255.255.252
    root@beaglebone:~# ifconfig
    eth0 Link encap:Ethernet HWaddr 40:bd:32:c6:17:fd
    inet addr:169.254.80.26 Bcast:169.254.255.255 Mask:255.255.0.0
    inet6 addr: fe80::42bd:32ff:fec6:17fd/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
    RX packets:45 errors:0 dropped:0 overruns:0 frame:0
    TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:3720 (3.6 KiB) TX bytes:18512 (18.0 KiB)
    Interrupt:177

    usb0 Link encap:Ethernet HWaddr 40:bd:32:c6:17:f0
    inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
    inet6 addr: fe80::42bd:32ff:fec6:17f0/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1 errors:0 dropped:0 overruns:0 frame:0
    TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:96 (96.0 B) TX bytes:13179 (12.8 KiB)

  • Try on a different computer. Plug out the cables and disable all the other Ethernet and Wi-Fi interfaces in your host computer. Also try a different USB cable and make sure that you are running the latest Processor SDK on your BBB.

  • Hi,

    Unfortunately, I do not have a different host machine right now with linux OS. But I have different versions of linux on my machine. Currently I am on version 5.2.6 but I also tried it with linux 4.15. Unfortunately same result. Please note that at the very first time, when I did ssh using usb, I was successful but now no ip address is assigned to this interface.

    I am not using any processor sdk on Beaglebone Black. My idea is to ssh into the existing kernel (the installed kernel by TI) on beaglebone black which is flashed on eMMC. 

    Some additional information:

    Every 10 to 15 seconds, I see a prompt on my host machine. This prompt lasts for just some milliseconds and unfortunately, I can't read this error. 

    Thanks & Regards

    Vishav 

  • Just for the test. Can you switch to the latest Processor SKD and check this issue there?

  • Hi,

    I am sorry but I am not able to understand how this relates to processor SDK. Are you trying to say to build the kernel again, load it onto SD card and boot using SD card on beaglebone black.

    But I would really appreciate to diagnose this problem on existing system.

    Regards

    Vishav

  • Yes. I mean to download and install the ti-processor-sdk-linux-am335x-evm-06.00.00.07-Linux-x86-Install.bin. Then create a SD card by using <Processor SDK>/bin/create-sdcard.sh script and boot your board with that SD card. This is the only supported software here. We do not support any other distributions no mater they use TI's kernel or not.