Main Content

Get IP Address of BeagleBone Black Board

Get IP Address from the Window

Get IP address of the BeagleBone® Black hardware that the host computer connected to most recently.

  1. Set up your hardware as described in Add Support for BeagleBone Black Hardware.

  2. In the Command Window, enter:

    BBB = beaglebone_black
    
    BBB = 
    
      beaglebone_black with properties:
    
        DeviceAddress: '192.168.7.2'
                 Port: 22
    This command creates a connection with the BeagleBone Black hardware, represented by the object h.

Get the IP Address from the Board Parameters Pane

To get the IP address of the BeagleBone Black hardware that the host computer connected to most recently:

  1. In the Simulink® Editor, select Simulation > Model Configuration Parameters

  2. In the Configuration Parameter dialog box, click Hardware Implementation. From the Groups list, select the Board Parameters pane.

    The Device Address parameter displays the IP address of the most recent connection to a BeagleBone Black board.

    Typically, this IP address represents the USB-based network connection that BeagleBone Black employs to communicate with your host computer.

    To connect to a different board that is available on a network, enter the IP address of that board.

Get the IP Address from the Linux Command Line on the Board

You can use the Linux® command-line on a BeagleBone Black board to get the IP address:

  1. Connect a monitor, keyboard, and mouse to the BeagleBone Black hardware.

  2. Log in as root.

  3. Open the Linux command-line and enter: ifconfig

    • eth0 displays settings for the Ethernet port

    • usb0 displays settings for the virtual network port on the USB port (typically addr:192.168.7.2)

    root@beaglebone:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr c8:a0:30:ad:ef:23
              inet addr:172.28.201.43  Bcast:172.28.201.255  Mask:255.255.255.0
              inet6 addr: fe80::caa0:30ff:fead:ef23/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1555 errors:0 dropped:159 overruns:0 frame:0
              TX packets:179 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:180524 (176.2 KiB)  TX bytes:27279 (26.6 KiB)
              Interrupt:40
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    usb0      Link encap:Ethernet  HWaddr 16:f2:81:18:28:9a
              inet addr:192.168.7.2  Bcast:192.168.7.3  Mask:255.255.255.252
              inet6 addr: fe80::14f2:81ff:fe18:289a/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:201 errors:0 dropped:0 overruns:0 frame:0
              TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:23150 (22.6 KiB)  TX bytes:29177 (28.4 KiB)