0

I managed to set up static IP for my RPi3 for wlan0 following this Instructable. I used this technique for VNC.

I want to connect my RPi3 to my Mac over Ethernet to USB Cable and start VNC session. But I can not connect RPi3 to my Mac for a reason.

I added code after the result of this command sudo nano /etc/dhcpcd.conf

interface eth0
inform 192.168.0.45
static routers=192.168.0.1
static domain_name_servers=8.8.8.8

Network Serrings

Though the Ethernet to USB Cable is connected to my Mac, it doesnt seem to be detected by the settings am i missing something? I have to mention that the cable is 100% working.(I can open VNC sessions over ethernet ip when I have wifi turned on the RPi).

My purpose is to VNC to RPi3 without using Internet.

Am I missing something through the USB set up? I think there is something that has to do with static routers=192.168.0.1.

4
  • What do you mean, Ethernet to USB? What is that? Please edit your question to explain.
    – Seamus
    Aug 28 '20 at 18:46
  • @Seamus I meant the cable Ethernet connected to RPi3 and other end USB connected to the Mac.
    – Youssof H.
    Aug 28 '20 at 19:00
  • 1
    Please provide a URL/link to this cable - one with some specifications - and add that information to your question.
    – Seamus
    Aug 28 '20 at 19:54
  • Why do you want to directly connect? It should work via your router otherwise. There are so many things wrong with what you have done on the Mac; we don't know what you have done on the Pi so this is unanswerable.
    – Milliways
    Aug 28 '20 at 22:53
2

The Ethernet link on the Mac must have a different network to the WiFi so if the WiFi is 192.168.0.xxx set the Ethernet to 192.168.1.xxx and you will need to set the Pi to this as well.

The better option is to not set any IP address on the Mac Ethernet and Pi to start with and then try ping pi@raspberrypi.local IF you have not changed its name. This lets both the Mac and Pi use the 169.254.x.x network and tests the connection.

If this is working, you can then set up static IP addresses, set Internet Connection sharing on the Mac and any shares on the Mac disk you require. If you are only setting up shares on the Pi than SAMBA tor NETATALK will work fine - I like NETATALK but be aware at some point Apple will drop AFP for SMB only.

You may have to set the DNS server and gateway up on the Mac for this link. I had problem with Mojave not routing the Pi correctly out onto the LAN till I manually set these BUT I think this is no longer an issue as I do not have them set now on Catalina.

Remember, on the Mac to keep the WiFi network addresses away from the Ethernet one. I would go for something like 172.29.44.xxx as it is free to use on any private network and is such an odd selection that if you use the Pi when out of you house, it's unlikely to clash with any WiFi network you hope on to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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