How can I connect my Pi directly to my PC and share the internet connection?
What I want to do is to connect through SSH and HTTP to my Raspberry Pi without having to connect it to the router. I use the Adafruit's Web IDE to create and run my programs, and I'd like to access the web page with my Pi only connected to the PC via Ethernet.
Actually, I need also to have Internet connection to the Pi, as Adafruit's IDE needs Bitbucket authentication.
I tried bridging the Wi-Fi interface (because I connect to the internet through Wi-Fi in my PC) and the Ethernet interface but it didn't work. I've tried it with a Mac and the Internet sharing option and it works fine because I can go to the web page typing http://raspberrypi.local. But now I'm in a laptop with Windows 8 and it's impossible to work out a way.
I know there are lots of questions like this one but no one was accurate enough to my case.
Thank you in advance.
Given it works on a Mac, this seems to be a Windows admin question rather than a raspberry pi question, so maybe try superuser instead?
Please checkout the MATLAB & Simulink supportpackage for Raspberry Pi. Follow this guide to connect Pi Zero W directly to your host PC. https://in.mathworks.com/help/supportpkg/raspberrypi/ug/connect-raspberry-pi-zero-w-to-an-ethernet-network-over-usb.html
Here are the steps to share your PC's wireless internet connection with a Pi:
- Connect the Pi to PC's ethernet port using a regular ethernet cable
- Go to "Network Connections" on the Windows PC and select the "Wireless Network Connection"
- Right-click and select properties. In the "Sharing" tab under "Internet Connection Sharing" enable both checkboxes.
- Restart your PC. This step is very important.
- Now your Pi will obtain an IP address from your PC and can access internet through your PC
- If need to find the IP address of the Pi to SSH or to remote login from the PC, run "ping raspberrypi" command where "raspberrypi" is the hostname of your Pi. Note that you have to have samba running on your Pi for the ping command to work.
If you need additional details with screenshots on how to share internet connection please see the post, Connecting to Pi from Laptop's Ethernet Port, that explains how to connect to Pi through the Ethernet port on a Windows machine.
Have you tried connecting Raspberry Pi to your PC using USB to TTL Cable (Console Cable) ?
The great advantage of using the console cable with the Pi is that it can even supply the power for your Pi and you do not need keyboard, mouse or display attached to the Pi to log into it.
You will need to install terminal emulation software (Putty) if you are using Windows and also USB drivers for the Console Lead.
The Raspberry Pi uses its built-in serial port to allow devices to connect to its console and issue commands just as if you were logged in.
You would also need PL2303 Drivers to do so.
I have been using my Raspberry Pi this way for quite a while and have no issue so far.
It merits mentioning that Raspberry Pi Console Cable drivers (Pl2030) wouldn't work if you are using Windows 8 ( I tested that too).
here is how you could use it, http://goo.gl/GgLgjx
Its easy in Windows computer. Found this article that may help: https://mylinuxcode.com/share-windows-internet-raspberry-pi-ethernet-port/ (direct link to the youtube video from that blog)
Hello and welcome! Please take the tour and visit the helpcenter. Whilst this may theoretically answer the question, it is preferable to include the essential parts of the answer here, and provide the link for reference. In fact we're enforcing this policy: please edit so that the answer stands on its own should the link break in the future. If it is not edited within 48 hours it will be converted to Community Wiki.