# Raspberry Pi - peer to peer connection with an IP camera

**URL:** <https://forums.balena.io/t/raspberry-pi-peer-to-peer-connection-with-an-ip-camera/369474>\
**Category:** Product support\
**Tags:** network, raspberrypi4\
**Created:** [December 5, 2023, 4:37pm UTC](https://forums.balena.io/t/raspberry-pi-peer-to-peer-connection-with-an-ip-camera/369474 "2023-12-05T16:37:59Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![emollergren](https://avatars.discourse-cdn.com/v4/letter/e/ac8455/32.png) [@emollergren](https://forums.balena.io/u/emollergren)\
**Post date:** [December 21, 2023, 8:05am UTC](https://forums.balena.io/t/raspberry-pi-peer-to-peer-connection-with-an-ip-camera/369474/21 "2023-12-21T08:05:45Z")

</div>

Hi @TJvV  
I’ve tested it again, and found the issues.  
Once I run the start.sh file, it loses the connection, and I can’t connect to the RPi.

root@fbcd8e5:~# bash start.sh  
Error: static\_eth0 - no such connection profile.  
Adding connection  
Connection ‘static\_eth0’ (245b6574-e62e-4ea1-83ce-a11f3683544b) successfully added.  
client\_loop: send disconnect: Connection reset by peer  
SSH: Process exited with non-zero status code “255”

Are the SSH keys correctly configured in balenaCloud? See:

> **[SSH access - Balena Documentation](https://docs.balena.io/learn/manage/ssh-access/)**
>
> Communicate with the host OS and service containers via SSH with balena

Are you accidentally using `sudo`?

If you have time, could you please check it for me? Thanks.

---

<div class="post-metadata">

**Author:** ![TJvV](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@TJvV](https://forums.balena.io/u/TJvV)\
**Post date:** [December 21, 2023, 8:30am UTC](https://forums.balena.io/t/raspberry-pi-peer-to-peer-connection-with-an-ip-camera/369474/22 "2023-12-21T08:30:03Z")

</div>

Hi,

I will see if I can find something after work today.  
It’s a little weird, because it seems to work fine on my device.

---

<div class="post-metadata">

**Author:** ![TJvV](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@TJvV](https://forums.balena.io/u/TJvV)\
**Post date:** [December 21, 2023, 6:29pm UTC](https://forums.balena.io/t/raspberry-pi-peer-to-peer-connection-with-an-ip-camera/369474/23 "2023-12-21T18:29:38Z")

</div>

I just ran a few tests, but have not been able to reproduce the issue of my Raspberry Pi not coming back online.

One thing I did notice, is that when the device boots up for the first time, it will try to create an automatic network connection on `eth0` before the container is started and has had the chance to configure the static connection.  
This lasts only for a little while (30 seconds tops?), and then gets fixed by the container.

@emollergren can you try to run it with a completely fresh fleet and device?  
Just to make sure we’re looking at the same thing.

You can copy these commands, just fill in the `<user>` and `<uuid>`

```auto
USER=<user>
DEVICE_UUID=<uuid>
NEW_FLEET=dhcp_test

git clone git@github.com:TJvV/balena_dhcp_cam.git
cd balena_dhcp_cam
balena login --web
balena fleet create ${NEW_FLEET} --organization ${USER} --type raspberrypi4-64
balena push ${USER}/${NEW_FLEET}
balena device move ${DEVICE_UUID} ${NEW_FLEET}

```

---

<div class="post-metadata">

**Author:** ![emollergren](https://avatars.discourse-cdn.com/v4/letter/e/ac8455/32.png) [@emollergren](https://forums.balena.io/u/emollergren)\
**Post date:** [December 21, 2023, 6:53pm UTC](https://forums.balena.io/t/raspberry-pi-peer-to-peer-connection-with-an-ip-camera/369474/24 "2023-12-21T18:53:18Z")

</div>

Hi, if possible could we have a zoom meeting at 19:00 UTC? The meeting link is the same. Thanks

---

<div class="post-metadata">

**Author:** ![emollergren](https://avatars.discourse-cdn.com/v4/letter/e/ac8455/32.png) [@emollergren](https://forums.balena.io/u/emollergren)\
**Post date:** [December 22, 2023, 8:47pm UTC](https://forums.balena.io/t/raspberry-pi-peer-to-peer-connection-with-an-ip-camera/369474/25 "2023-12-22T20:47:56Z")

</div>

Hi, I’ve already set up the IP camera as a dhcp mode, however, the RPi can’t assign the IP address to it. Any suggestions? Thanks

[Previous page](https://forums.balena.io/t/raspberry-pi-peer-to-peer-connection-with-an-ip-camera/369474.md?page=1)
