So we have 3 things:

  1. Raspberry Pi 4
  2. IP Camera
  3. Ethernet cable

We just want to connect the IP Camera to the Raspberry Pi 4 using the ethernet cable directly. Not through any router, switch, network or such, just Raspberry Pi 4 <--> IP Camera.

Problem is, when we do it, we can't connect to the camera although we have pre-defined a static IP to the IP Camera on another computer. Basically it seems the camera can't be seen by the Raspberry Pi 4 when connected directly using an ethernet cable.

Does anyone know how to connect these 2 directly without router/switch/modem using only an ethernet cable?

  • How does the camera get/set its ip address? Can you configure it on the camera? What exactly ip address it just now has? – Ingo Apr 9 '20 at 7:03

The PI will automatically switch the cable config around IF the camera is powered up first so you will not need a cross over cable.

The issue is that the Pi will not have an IP address for the LAN connection.

The simplest way to set one is to configure this via the /etc/dhcpcd.conf file along these lines:

sudo nano /etc/dhcpcd.conf

You want the file contents to be similar to these # Inform the DHCP server of our hostname for DDNS. hostname

# Use the hardware address of the interface for the Client ID.

# Persist interface configuration when dhcpcd exits.

# Rapid commit support.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

interface eth0
   static ip_address=
   static routers=
   static domain_name_servers=

The last three lines will need setting to values for your PI<->Camera network. The last two lines may not actually be needed if only the Pi and camera are on the network. This is only for IPv4

You also need to think how you will support the Pi without internet / network access - possibly WiFi?

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.