Top Banner

of 15

Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) – Syed Anwaarullah

Feb 26, 2018

Download

Documents

Maheswara
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    1/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 1/15

    Syed AnwaarullahDebugging Life, Simulating Experiences, Looping Output!

    Sharing WiFi Internet connectionwith Raspberry Pi throughLAN/Ethernet (HeadlessMode)

    After having setup the Raspberry Pi to work in headless mode directly

    without installing anything on it as described in this post, we then tinkered

    on to share WiFi internet connection with the Raspberry Pi through the

    LAN/Ethernet connection which we established in our earlier post.

    What you want to do:

    https://anwaarullah.wordpress.com/https://anwaarullah.wordpress.com/
  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    2/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 2/15

    1. Share PC/Laptops WiFi internet connection with Raspberry Pi through

    LAN/Ethernet connected to Raspberry Pi

    What you have:

    1. Raspberry Pi A+/B/B+/Pi 2 (If youve a Pi Zero, please try and let us knowif this works on a Zero) running the latest Raspbian Wheezy. (Ive not

    yet tried it with recently released Raspbian Jessie based off Debian 8. If

    youve been successful with this latest release, please post in the

    comment and Ill update it here. Thanks.)

    2. PC/Laptop with WiFi Internet connection and a Ethernet Jack (LAN

    Connector / RJ45)

    3. A working SSH connection with Raspberry Pi (direct access, explained

    here)

    What you dont have:

    1. Display Device for the Raspberry Pi (HDMI enabled display unit / Old TV)

    2. Direct Internet connection for the Raspberry Pi (LAN or WiFi)

    Extra Stuff you need:

    1. Standard Network Cable (Cat 5, Standard or Crossover)

    2. PutTTY Software (will be used to SSH into the Pi)

    3. SD Card Writer

    Edit: 2nd Jan, 2015. Added Video Tutorial:

  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    3/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 3/15

    Sharing WiFi with Raspberry Pi through LAN Cable

    A large part of this post assumes youve read the earlier post on directly

    accessing the shell on Raspberry Pi through a Ethernet/LAN connection. In

    this post, well go about setting up the Raspberry Pi to access internet

    through the Ras-Pis Ethernet/LAN port from a Laptop/PCs shared WiFi

    connection.

    Steps:

    1. Firstly, enable the WiFi adapter of the PC/Laptop and make sure its

    connected to a WiFi hotpspot. Open any Internet Browser and confirminternet access by opening any website.

    https://anwaarullah.wordpress.com/2013/07/16/direct-access-raspberry-pi-shell-and-desktop/https://www.youtube.com/watch?v=DwLAC0JSKKE
  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    4/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 4/15

    Note:Im using my Android device (Nexus One) configured as a WiFi

    hotspot J

    2. Now, go to Network and Sharing Center (Network Settings in Win XP)

    and then head to the Change Adapter Settingspage. As shown below,

    were connected to Wireless Network Connection on Android 4. Do

    remember the Local Area Connection to which well eventually share

    this connection

    3. Now, right click the above Network Properties and then select the

    Sharing tab

  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    5/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 5/15

    4. From the drop down list, choose Local Area Connection and enableboth the checkboxes and hit OK. Once done, head back to the Adapter

    Settings page and you should now see the Shared info message on the

    Wireless Network Connection

  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    6/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 6/15

    5. Now, right click Local Area Connection Properties and then select

    Internet Protocol Version 4 and then click the Properties Button

  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    7/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 7/15

    Once the properties tab pops up, make sure that the Obtain IP addressautomatically checkbox is selected. If not, check it and hit OK

  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    8/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 8/15

    6. Now, power up the Raspberry Pi (making sure that the Ras-Pi and the

    Laptop/PC are connected to each other through the LAN/Ethernet cable)

    and wait a minute or two while the Ras-Pi boots. Now, repeat step 5

    (previous one) to make sure Obtain IP Address Automatically is still

    checked.

    7. Open up command prompt using the hotkey Windows Key + R and then

    typing in cmd or simply keying in cmdin the start menu (Win 7)

    8. In the command prompt, key in ipconfig and scroll to the top of the infoshown

  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    9/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 9/15

    Note the IPv4 address which is 169.254.39.68 in this example. Please makea note of what you see as this will be required further.

    9. Now, power off the Raspberry Pi and plug the Ras-Pis SD card into a

    card reader and connect it to the PC. Once the disk opens up, open the

    cmdline.txt file in any editor

  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    10/15

  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    11/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 11/15

    open up the midoribrowser. Verify Internet connectivity on the Ras-Pi

    by opening any website.

    Note (Edited: 5th Feb, 2015): Midori browser is no longer coming pre-

    installed with the latest Raspbian version and has been replaced with

    Epiphany Browser. Please use that instead to verify internet

    connectivity.

    Please let me your feedback or questions through comments.

    Thanks

    References:

    1. http://pihw.wordpress.com/guides/direct-network-connection/super-

    easy-direct-network-connection/

    2. https://anwaarullah.wordpress.com/2013/07/16/direct-access-

    raspberry-pi-shell-and-desktop/

    P.S:Did this post help you? Please leave your feedback. If youve tried some

    additional steps that helped you in getting this working, please share so we

    all can benefit from.

    https://anwaarullah.wordpress.com/2013/07/16/direct-access-raspberry-pi-shell-and-desktop/http://pihw.wordpress.com/guides/direct-network-connection/super-easy-direct-network-connection/
  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    12/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 12/15

    If youve benefited from this post, please consider donating and help me

    buy new development stuff and resources. Thanks!

    You May Like

    1. 15 StarWars' Things You Never Knew You

    Needed 2 months agohuffingtonpost.comHuffington Post

    AOL Forex Elana TeitelbaumElana

    1 Vote

    Rate this:

    Share this:

    Twitter Facebook 23 Email LinkedIn Print

    Like

    2 bloggers like this.

    Related:

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/?share=twitter&nb=1https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/?share=facebook&nb=1https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/?share=facebook&nb=1https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/?share=facebook&nb=1https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/?share=email&nb=1https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/?share=linkedin&nb=1http://en.gravatar.com/vishalrbloghttp://en.gravatar.com/inderpalsinghshttps://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/?share=linkedin&nb=1https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/?share=email&nb=1https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/?share=facebook&nb=1https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/?share=twitter&nb=1https://wordpress.com/about-these-ads/https://secure-api.gravity.com/v1/api/intelligence/w2?sg=361837bc83c4c2cba7b350dff56a564f&pl=16&ug=&ad=&sp=332&pfurl=&cburl=&epl=&pageViewId%5BwidgetLoaderWindowUrl%5D=https%3A%2F%2Fanwaarullah.wordpress.com%2F2013%2F08%2F12%2Fsharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode%2F&pageViewId%5BtimeMillis%5D=1453310711432&pageViewId%5Brand%5D=9749656987842172&sourceUrl=https%3A%2F%2Fanwaarullah.wordpress.com%2F2013%2F08%2F12%2Fsharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode%2F&frameUrl=https%3A%2F%2Fanwaarullah.wordpress.com%2F2013%2F08%2F12%2Fsharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode%2F&clientTime=1453310718788&ci=grv-personalization-16&wct=1453310708245http://www.huffingtonpost.com/http://www.huffingtonpost.com/http://www.huffingtonpost.com/http://www.huffingtonpost.com/2015/10/15/star-wars-things_n_8302330.htmlhttp://www.huffingtonpost.com/2015/10/15/star-wars-things_n_8302330.html
  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    13/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 13/15

    Author: Anwaarullah

    Consultant Engineer, Designer, Developer, Maker, Speaker, Educator and

    Dreamer. Tinkering with Embedded, Android, Open Soft/Hard/Firm ware,Robotics and 3D Printer. Talk to me at syed {Shift+2} anwaarullah dash com

    View all posts by Anwaarullah

    Direct Access Raspberry Pi Shell and Desktop on Laptop/PC without installing anything on

    the Raspberry Pi OS or connecting it to a Display Unit

    In "Raspberry Pi"

    Buying Raspberry Pi 2 in India, Hyderabad

    In "Raspberry Pi"

    Internet of Things framework for the Raspberry Pi

    For a start, one of the primary reasons for me to start a blog was to share those many links

    which otherwise I'd bookmark and lose track of them when I actually needed something.

    Secondly, I make notes in many mediums and maintaining and indexing them all was getting

    troublesome

    In "Raspberry Pi"

    https://anwaarullah.wordpress.com/2013/06/05/internet-of-things-framework-for-the-raspberry-pi/https://anwaarullah.wordpress.com/2013/06/05/internet-of-things-framework-for-the-raspberry-pi/https://anwaarullah.wordpress.com/2015/02/14/buying-raspberry-pi-2-in-india-hyderabad/https://anwaarullah.wordpress.com/2013/07/16/direct-access-raspberry-pi-shell-and-desktop/https://anwaarullah.wordpress.com/author/anwaarullah/
  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    14/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/ 14/15

    148 thoughts on Sharing WiFi Internet connection

    with Raspberry Pi through LAN/Ethernet(Headless

    Mode)

    Shairul

    December 18, 2015 at 3:40 PM

    Assalamualaikum, Mr. Anwar.

    I tried every step of the procedure. Alhamdulillah, i got it earlier. Once I

    upgraded the Raspbian Wheezy to Jessie, everything gone head-wire. I

    reformat back the SD to Wheezy, and subsequently, the internet

    connectivity unable to achieve. Same as other, Im using Window 7 HP and

    be advised, my rpi able to Putty and Xming earlier. Very dire of yourassistance thus Im using rpi 2 for my final year project. And now, the

    projects progress from 40% achievement down to 0%. Cant figure out

    which step I missed. Duly waiting for your assistance.

    Anwaarullah

    January 5, 2016 at 4:58 AM

    Wa Alaikum As Salaam, are you still facing the same issue?

    Nizar Boussarsar

    January 15, 2016 at 6:51 PM

    Assalamou Alaykom Mr. Anwar,

    Anwaarullah August 12, 2013 Linux, Raspberry Pi Raspberry Pi, Sharing, WiFi

    https://anwaarullah.wordpress.com/tag/wifi/https://anwaarullah.wordpress.com/tag/sharing/https://anwaarullah.wordpress.com/tag/raspberry-pi/https://anwaarullah.wordpress.com/category/raspberry-pi/https://anwaarullah.wordpress.com/category/linux/https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/https://anwaarullah.wordpress.com/author/anwaarullah/https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/comment-page-2/#comment-1312https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/comment-page-2/#comment-1297https://anwaarullah.wordpress.com/https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/comment-page-2/#comment-1279
  • 7/25/2019 Sharing WiFi Internet Connection With Raspberry Pi Through LAN_Ethernet (Headless Mode) Syed Anwaarullah

    15/15

    1/20/2016 Sharing WiFi Internet connection with Raspberry Pi through LAN/Ethernet (Headless Mode) Syed Anwaarullah

    First, I would like to thank you for this tutorial. It is great.

    I am running Windows 10 on my PC and Debian Jessie on my Raspberry Pi. I

    followed all the steps but I wasnt able to ping outside from my LAN. In

    fact, when I ping the RPi from the PC it goes well but the other way does not

    pass. I unchecked the Ethernet connexion from the Protected networkconnexions window and I was able to ping the PC from the RPi but not the

    Internet. So I probably think that the problem is coming from the Windows

    10 Firewall.

    I would be grateful if you can help me fixing this issue. Thank you.

    Sincerely,

    Nizar

    Anwaarullah

    January 16, 2016 at 12:32 AM

    Wa Alaikum As Salaam Akhi,

    Im Sorry, I dont have access to a Win 10 machine and hence I cant

    debug it

    The Twenty Sixteen Theme. Syed Anwaarullah Create a free website or blog at

    WordPress.com.

    https://wordpress.com/?ref=footer_websitehttps://anwaarullah.wordpress.com/https://wordpress.com/themes/twentysixteen/https://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/comment-page-2/#comment-1315https://anwaarullah.wordpress.com/