I am using a Raspberry Pi 3 Model B for an intern project and I am having trouble connecting it to my laptop. I have never worked with a Raspberry Pi or any other microcontrollers before, so all of this is new to me. I have done countless research and have watched numerous youtube videos on both the raspberry pi and Arduino boards. I have attempted to connect my Pi to my laptop using an Ethernet cord, but the company that I am interning for will not grant me access to there network settings, in order for me to share the network with the Pi and display the pi on my laptop screen. I was wondering if there was another way to display the Pi on my laptop. I have bought an SD card with Noobs 2.1 pre-downloaded on it, so I don't have to download it myself. Do I even have to be connected to the network to display the Raspberry Pi on my laptop or can I just use the HDMI cord and connect the two somehow and begin programming. I would appreciate any comments, answers, or criticism. Thank You.
To configure your Raspberry Pi 3 as its own WiFi Access point, see https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md
To perform this setup, you will need full, cabled Ethernet access during the setup process. After the Pi is set up as a WiFi AP, you no longer need the Ethernet umbilical cable. A Raspberry Pi configured this way will NOT have access to the internet once the physical cable is unplugged. However, you can access anything on the Raspberry Pi via WiFi to the Pi WiFi access point.
Also, note that the documentation is confusing and should be read as follows:
interface=wlan0 # Use the require wireless interface - usually wlan0 dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
I.e., you just need this:
NOTE: When configuring a Raspberry Pi for wifi, do consider legal restrictions, especially when interacting with computers or networks that are not yours. For example, if your laptop is work related, your IT department may forbid USB drives (which essentially are computers) and would likely also forbid use of your Pi in the workplace just as they forbid access to certain websites from their laptop.
There is another possible solution, which does not require you to setup your Raspberry Pi as WiFi access point by using a wired Ethernet connection.
It has other drawbacks, but I use it from time to time, when I quickly want to check in on my Raspberry Pi and I don’t have a monitor at hand.
Here is what you need to do:
- You connect your Raspberry Pi via Ethernet cable to your computer.
- When no static IP addresses are assigned on the interfaces and no DHCP server is running, typically the interfaces on both sides will self-assign a link-local IP-address in the range of
169.254.254.255(advice: reboot your machine, if you were connected with your computer to a LAN via Ethernet before, as your interface may already have an IP-address from that connection)
- Now run a network scanning tool on your computer where you scan all addresses from
169.254.254.255, which will then report to you the IP-address of your Raspberry Pi.
For that purpose, as an example, on a Linux machine you can use
arp-scanin a terminal (replace
eth0with the name of your respective Ethernet interface):
sudo arp-scan –interface=eth0 169.254.0.0/16
On Windows you can use a network scanning tool or command line tools, as described in this SE question.
- As you now know the IP address of your Raspberry Pi you can ssh into it (on Windows e.g. using the program
putty) or use
VNC. (Note that you need to enable both
vncbeforehand on your Raspberry Pi)
- You have to repeat this procedure everytime you initially connect your Ethernet cable to the Raspberry Pi, as the link-local IP address will be randomly selected
- Getting a link-local IP address on your computer might not work depending on the networking settings applied in your company computer.
- Scanning the ip-range takes some time. On Linux using
arp-scanit takes a few minutes. On Windows I have no empirical values.