In A Nut Shell…Direct Network Connection
NUT SHELL VERSION
Raspberry Pi Remote Connections
Without A Network!
This is a ultra-cut down version of the detail Guide To…Direct Network Connection , if you run into problems or do not know anything about networks then follow that guide!
No keyboard or screen available for your Raspberry Pi, but you have a laptop?
The answer is a simple network cable!
Step 1 – Find the Laptop’s Network Settings
Before we power up our Raspberry Pi, we can have a look at the network settings of the computer we are planning on connecting to and determine if the address is automatically allocated or fixed.
Find Your Network Settings:
Hopefully, the IP Address will be set to “Obtain an IP address automatically”. If not don’t worry, just take a note of the IP address and Subnet Mask set here or you can change this setting to automatic.
Step 2 – Setting the Raspberry Pi’s IP address
Edit your cmdline.txt file:
You can edit it directly on the Raspberry Pi:
sudo nano /boot/cmdline.txt
Or use an SD-Card reader on your computer (the file is in the root of the visible partition on the card – if you aren’t using NOOBS).
You will need to add the ip=x.x.x.x value to the end of the line (ensure you do not add any extra lines).
It is recommended you use a Linux compatible editor such as Notepad++ (http://notepad-plus-plus.org/) to make the change.
For network settings where the IP address is obtained automatically, use an address in the range 169.254.X.X (169.254.0.0 – 169.254.255.254):
For network settings where the IP address is fixed, use an address which matches the laptop/computers address except the last one (assuming your netmask is at least 255.255.255.0 / 255.255.0.0).
Ensure you take note of this IP address (you will need it every time you want to directly connect to the Raspberry Pi, although you might be able to use the hostname).
Step 3 – Finished!
Return the card to the Raspberry Pi. Attach the network cable attached to both the computer and Raspberry Pi and power up.
NOTE THE FOLLOWING:
1. You will need to wait for your computer to finish detecting the network settings and your computer may report the connection as “limited or no connection”.
2. If you forget or decide not to plug in the network cable, the Raspberry Pi will wait 2 minutes (or until you connect the cable) before completing its start-up (so if you only have a keyboard and monitor attached, you need to wait!).
3. If you are using multiple wired network adaptors (i.e. Using an extra USB-LAN dongle) on your computer you may find you have to unplug the other network cable and reattach afterwards (my Windows XP machine needed this before it would connect through the direct link).
See the main Guide to…Remote Connections for links for how to set-up SSH, X-11, VNC and shared folders.