Home | Projects | Notes > Linux Device Drivers > Project Setup

Project Setup

 

Project Environment Setup

 

Connecting the Host with the Target (USB-to-Serial TTL Cable)

 

Enabling Internet Over USB

Target Settings

  1. First run ifconfig and see if your system recognizes usb0 interface.

    If usb0 interface does not show up, reboot the board and check again.

    If it still does not show up, execute the following commands and check again:

    At this point you'll be able to ping 192.168.7.1 (to host), but not ping www.google.com (to the Internet).

  2. Add name server address in /etc/resolv.conf:

  3. Add name server address in /etc/network/interfaces

  4. Add default gateway address by running the following command:

    We are using the host PC as the default gateway.

    Whenever rebooting the board, you need to run this command to get Internet connection. For simple SSH connection to the host PC, running this command is not required.

Host Settings

  1. Run the following commands:

    <network_interface_name> - Your primary connection to the network could be wireless or wired. You must use the name as listed by the command ifconfig. (In my case wlp61s0)

    Simply running sudo echo 1 > /proc/sys/net/ipv4/ip_forward won't work!

    Whenever rebooting the board, you need to run these commands. So, may be a good idea to create a short script and execute it on every reboot. For example:

    Make sure th replace <network_interface_name> with a real name.