0

I got a Pi 2B with an SD card with NOOBS. I´d like to access it later on with Tight VNC.

My problem is the first boot up. I have the pi connected via an ethernet cable...

  1. In the first scenario to my laptop: The idea was to run dhcp serv from my laptop, assign my Pi an IP address automatically and then ssh connect to it via putty
  2. In the second scenario to my router: so as my router would assign it an IP address that I could later on ssh connect via putty.

I have two ways of checking which devices with which IP addresses are in my network:

  1. via accessing my router and checking the connected devices, and;

  2. via the advanced IP scanner (scanning my network and subnetworks).

I seem to be doing something wrong as I just can´t figure out if the Pi got its address. I guess not because otherwise I'd see it somewhere.

I've tried some of the widely spread tutorials already.

2 Answers 2

0

I would suggest something simpler for this issue.

For the first scenario - When you install your raspbian OS, you can assign an IP address (in the range of 169.254.1.1/254) manually so that you know which one to connect to and you have to append that to your /boot/cmdline.txt file. You can append the ip address to the file using memory card readers or any other way that's suitable. Here's a sample format -

ip=169.254.1.4

I would suggest doing it with vim or nano editors as they don't add any extra headers to your text file. Once that is done you can ssh into your pi using command ssh [email protected] (your ip address).

Later, you can configure your wireless settings to connect to your router to use tight vnc and raspberry pi has a great tutorial on it. Hope it helps.

3
  • could you specify what you man by: "when you install your raspbian OS,..." if you mean, when i copy the contetns of the noobs zip file to the sd card then i don´t seem to find a cmdline.txt anywhere. and as i run headless i can´t get to the step of choosing what to install on the first boot up itself.
    – alx.chrs
    Commented Dec 28, 2015 at 18:50
  • HA im in. but curiosly the following did it. i erased the preinstalled sd card and instead of noobs just wrote raspbian to it. then i found the cmdline.txt and added an ip adress, in my case 192.168.137.2 now i put the card in the pi. booted it. tried to connect via putty but nothing. next i scanned the network with the ip scanner again and voila the pi was there. but the ip adress was 192.168.137.125 (that i don´t know why) so now i can connect via putty.
    – alx.chrs
    Commented Dec 28, 2015 at 19:42
  • As far as i know, ip addresses with series 192.168.x.x are for ip addresses connected to your wlan/wifi network. When you connect pi to your local machine with ethernet cable or with wifi sharing method, then ip address with 169.254.x.x series is assigned. So if you are connecting your pi to local machine directly then assign the ip address with value 169.254.x.x and it should connect. Hope it helps.
    – giri-sh
    Commented Dec 29, 2015 at 7:43
0

I have always found it handy to configure your router to always provide the same preset IP to your pi, this prevents issues with duplicate IP's (ip conflicts). Alternatively you could also set it statistic in your Pi and configure your router's DHCP to a range that doesn't include the Pi (but is within the subnet ofcourse).

example1:

in pi set ip to 192.168.123.253/24 in router set dhcp range to 192.168.123.[1-250]

example2:

in router set a static ip for your PI, i.e. 192.168.123.123

I never connect the pi directly to a machine, since it's more of a hassle. I prefere to just hook it up to my home network and place it somewhere to never be moved :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.