|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Raspberry Pi IP Address
My team is trying to set up vision processing for the first time, and we are going with Java and openCV running on a raspberry Pi. So far we are making good progress, but we have come up on an "annoyance" that we haven't been able to work around. We are doing code development by directly accessing the Pi from a laptop using putty and an ethernet cable.
The problem is we need to have a router in between for this to work, either by ethernet cable or wifi. Is there a way to get this setup to work without a router? I believe the problem is the Pi either doesn't get issued an IP address without the router, or it is getting an address that we cannot find. We have tried using IP Scanner to search for it when there is no router in between with no luck. We also tried setting a static IP but couldn't see the Pi without the router. Thanks! |
|
#2
|
|||
|
|||
|
Re: Raspberry Pi IP Address
If you are plugging the ethernet cord from the Pi directly into the laptop you will likely need to use a crossover ethernet cable instead of the standard ethernet cable (google ethernet crossover). You will certainly need to have static IP addresses set on the Pi (use the network icon on the Rpi or edit /etc/dhcpcd.conf for the newest versions of Raspian) and the laptop will need a static IP as well.
|
|
#3
|
|||
|
|||
|
Re: Raspberry Pi IP Address
Thank you. We'll try the crossover cable and confirm the static IP address.
I think we do have an older operating system because I didn't see a the etc/dhcpcd.conf file. I tried creating one, but that didn't work. |
|
#4
|
|||
|
|||
|
Re: Raspberry Pi IP Address
The Raspberry Pi's NIC supports Automatic MDI/MDI-X so a crossover cable is never necessary. It is very likely your laptop does as well unless it's pretty ancient.
|
|
#5
|
||||
|
||||
|
Re: Raspberry Pi IP Address
Get this cable from adafruit
It allows you to putty straight into the raspberrypi without even needing to disconnect from your normal wifi. Here is the tutorial on how to use it. |
|
#6
|
||||
|
||||
|
Re: Raspberry Pi IP Address
By default, the Pi is set to DHCP. Thus, it get's it's address from the router. To set a static IP, you will need to modify the etc/network/interfaces file.
Here is what ours looks like. Code:
# interfaces(5) file used by ifup(8) and ifdown(8) auto eth0 iface eth0 inet static address 10.20.73.225 netmask 255.255.255.0 gateway 10.20.73.4 auto lo iface lo inet loopback It should come up in Static mode and you should be all set. |
|
#7
|
|||
|
|||
|
Re: Raspberry Pi IP Address
Have you tried using mdns? By default, the pi should respond to pings on rasperrypi.local I think, even with a self-assigned 169.x.x.x address.
|
|
#8
|
||||
|
||||
|
Re: Raspberry Pi IP Address
Quote:
However there's one more step: Unless you've set the Pi to use a static IP address, you need your computer to run a DHCP server to assign the Pi one. The way I've done that is by using ICS to bridge ethernet to my laptop's wifi connection (since I've also needed the Pi to connect to the internet ). ICS runs a DHCP server and uses NAT to connect two interfaces.On Windows 10, there's probably an easy way to do this through the new Settings app but here's how I've done it: 1. Start icssvc ![]() 2. In adapter settings on the old control panel, go to properties for your wifi connection > sharing > Check the box > select your ethernet connection ![]() Note: if the box is already checked, you'll have to uncheck it, click OK, then open properties and check it again otherwise icssvc won't know about it. This is Windows, remember? ![]() |
|
#9
|
|||
|
|||
|
Re: Raspberry Pi IP Address
Thanks again to everyone who shared their methods for running the Pi through the laptop.
My goal was to run the Pi through the laptop without a router in between, and have the Pi share the laptop's wifi when the laptop has internet access. Here's the method that ended up working best for me:
I also tried the adafruit cable mentioned by dirtbikerxz. I actually had the cable but didn't realize what it was for. The cable ended up being a little quirky - the driver didn't work, and I had to download this alternate driver http://www.ifamilysoftware.com/news37.html, and the driver executable has to be run every time the cable is used. Also, when using the serial cable the putty window had some issues with command lines wrapping around. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|