0

I initially posted this question in StackOverflow but I feel it may be more appropriate here.

I have an Orange Pi Zero, which I have flashed Raspbian on. It does not have HDMI, so I need to connect to it via Putty (or a similar program). The problem is that I cannot obtain the device's IP address, which seems to be a requirement in order for me to connect to it through programs like Putty.

The standard procedure for obtaining the Orange Pi's IP seems to be to log in to the admin Interface of the router, and to pull it out from there--but I am unable to do that because I am using my school's networks--and our IT Department has never had to perform anything like this, so the project has been put on hold. They told me to try "Angry IP Scanner" but I could not find my device through that program--a user also told me to try nmap but again, no luck with that either.

Does anyone know of any other method to obtain the device IP? One in which I do not have to login to the router's admin interface.

A friend said it is possible to link the PC to the Orange Pi via Eternet cable and connect to it like that... I can't seem to find any information for doing so, does anyone know if this is even possible?

  • `nmap -sP 192.168.1.0/24` (replace your local network and netmask) will ping every host and show those that respond, together with the MAC (ethernet) address. You should be able to find out your MAC address (it's usually printed on the system somewhere) so then you can find which IP address it has. – wurtel Feb 02 '18 at 10:41
  • @wurtel, you should give this as an answer (even though the question is going to be closed because it's about a school network). – Andrew Schulman Feb 02 '18 at 12:39

2 Answers2

1

Using nmap -sP 192.168.1.0/24 (replace your local network and netmask) will ping every host and show those that respond, together with the MAC (ethernet) address; this should always work, unless the system is firewalling the ping.

You should be able to find out the MAC address of the system (it's usually printed somewhere) so then you can find which IP address it has.

If nmap does not show the system because of ping being firewalled, you could still find the system via /sbin/arp -an, as the system should still respond to the ARP probe (ARP stands for Address Resolution Protocol, it's basically one system broadcasting on the network "who has IP wh.at.ev.er?", the system with that IP address should respond with "wh.at.ev.er is here" where "here" is its MAC address).

wurtel
  • 3,864
  • 12
  • 15
  • The ARP option will only work if they are on the same logical network/VLAN. If, for instance, the OP is on a wireless network and the Pi is on a wired network, this may not work (most schools, at least around here, segment off the wireless from wired). – Allen Howard Feb 02 '18 at 13:50
  • I used arp and I can see a list of devices--including my iPhone, but strangely, the Orange Pi is not showing up. Could this be because I am using an eternet cord? – user8951490 Feb 02 '18 at 16:51
  • The arp entry only exists for a while after its address is discovered, so it's imperative to search for the arp entry directly after doing the `nmap -sP`. – wurtel Feb 06 '18 at 12:55
0

This is a workaround, because you can connect without knowing the IP.

You can connect using the Raspbian default Host Name. In Putty you need to config the connection using "Host Name (or IP address)": raspberrypi.local

But I recommend you to switch to armbian which is a better election than using Raspbian, I can assure you can connect using only the hostname.
On armbian the first time you need to connect with root user and 1234 password, after that you can configure a new user and change the root password.
In this case, in Putty you need to connect using "Host Name (or IP address)": orangepizero.lan

manuti
  • 1
  • 3
  • I don't know if Host Names work using a direct cable between your PC and the Orange Pi Zero. – manuti Feb 07 '18 at 15:46