Hi everybody, welcome to NuttX Channel! This is the third and last video about
how to use Ethernet over USB on NuttX Today I will explain how to use your computer
to share internet connection to the board So let’s get started! Open the Linux terminal Enter inside nuttxspace/nuttx We cannot execute “make distclean” because we need to get the
configuration from the previous video Please… Watch the previous video
to get the configuration here! And… Execute: “make menuconfig” First we need to enable the development support Enter inside: Build Setup Prompt for development and/or incomplete code/driver Exit Enter inside RTOS Features Work queue support Disable High priority (kernel) worker thread This is a small mistake I did in the previous video because if you use High priority kernel worker thread and you want to Create some real-time application the network will impact on your application. So… disable High priority kernel thread And enable Low priority kernel worker thread this way the network you not impact in your application Exit Exit again Go to: Device Drivers Deselect Disable driver poll interface Exit Go to: Network Support Enter inside: Driver buffer configuration Change the Ethernet package buffer size to 1500 bytes to improve the performance Also do the same to: Ethernet TCP receive window size! change it to: 1500 as well Exit Now go to: Raw Socket Support And enable: Socket packet socket support Exit Go to ICMP networking support And enable: IPPROTO_ICMP socket support Exit Move down to: Routing Table Configuration enable: Routing table support Exit Now we can Exit again! Enter inside: Library Routines Move down to: NETDB support Enable: DNS Name resolution Enter inside it! Change the: Target IPv4 address This is the DNS server IP We will use the Google’s server! So, in hexa code it will be: 0x08080808 Okay, now we can exit! Exit again! Exit again! Go to: Application Configuration Network utilities Enable ICMP ping support Exit! Go to: NSH Library Enter inside: Networking Configuration IP address configuration Change the: Target IPv4 address to This is the IP address the Ubuntu will assign to your board when you are sharing the Internet connection So, it will be in hexa code: 0x0a2a003e Also change the: Router IPv4 address to: 0x0a2a0001 Now we can Exit Exit again! Exit again! Enter inside: System Libraries and NSH Add-ons Enable: ICMP ‘ping’ command Exit! and Exit again! and finally: Exit and Save Execute “make” to compile the source code! Okay, the source code was compiled Now we can flash the firmware inside the board so… Execute: OpenOCD Okay, the firmware was flashed! Now we need to share the computer Internet connection with the board! So… Edit connections Wired connection 1 Edit IPv4 settings! Change the Method from manual to: Shared to other computers Click in: Save Close Reset the board You can use this command to see
the IP Ubuntu assigned to your board But for some reason it stopped on my computer see but I know the IP is so, I will execute: telnet Okay, I got access to the nuttshell! As you can see now
we have the ping command and also the nslookup So we can execute: nslookup google.com So, it returns the IP address! now we can ping this address just to confirm the Internet connection is working Okay, it’s working! Let’s see it will send ten packets! We can mount the RAMDisk
to have a writable filesystem I will download some file from the internet so: wget http://www.nuttx.org/examples/nuttx.txt Okay, it it was downloaded And I will show its content So everything works as expected I hope you had enjoyed this video. If you are not subscribed to NuttX Channel yet Please subscribe! And also click in the bell icon to receive notification when I post a new video See you in the next video! Bye. Bye

#044: Accessing Internet using Ethernet-over-USB
Tagged on:                                                                                         

Leave a Reply

Your email address will not be published. Required fields are marked *