0

I am new to pi development so please excuse any stupidity of mine.

I have set up a Raspberry Pi 3 running Raspbian Bullseye and connected it to WiFi. This is being done on a college campus, so I cannot give my Pi a static IP. However, I can register it with my college's network which gives me a hostname that points to my Pi.

I am trying to use the Pi to control another device over ethernet using Telnet in a python script. The other device is a controller for a blackbody. The controller itself has a configurable static IP address for ethernet. It does not provide any other network information (gateway, dns, subnet).

I want to set up the Pi so that it is connected to the WiFi, but also connected to this controller through ethernet, that way I can SSH into the Pi and run a program that controls the blackbody controller.

How can I configure the ethernet on the Pi to connect to this device?

I am happy to provide more information if necessary. I appreciate any help you provide.

Edit: added that I am trying to connect using Telnet over ethernet. Edit: I have also figured out that the black body controller can be configured to operate in DHCP mode. Is there a way to configure the Pi to give the controller an IP over ethernet?

2
  • configure a static IP for the PI's ethernet, ensuring it's in the same subnet as your mystery device Commented May 26, 2023 at 5:11
  • Thank you. That's exactly what I'm trying to do however it doesn't appear to be working. Is there a way to ping the device through ethernet to see if I have established a connection?
    – embedtime
    Commented May 26, 2023 at 14:51

3 Answers 3

0

Static IP are a bad idea anywhere but usually impossible on a non-personal network.

Many (most) college networks do not allow device to device connections.

If you have physical access to the device plug into the Ethernet port of the Pi and you should be able to connect to it by IP address.

3
  • Thanks for the answer. I understand that and that is exactly what I'm trying to do. How can I connect to it by IP address only?
    – embedtime
    Commented May 26, 2023 at 14:49
  • Sorry but what exactly do you mean "connect to it by IP address only"? I mean can you ping the IP of the device by the raspberry? Are you asking about what comes after and how to control the actual device?
    – papatrexas
    Commented May 27, 2023 at 18:44
  • I have tried configuring the eth0 interface to point to an IP on the same subnet as the device. However, I get no response when I try to ping the device.
    – embedtime
    Commented May 31, 2023 at 19:39
0

Try this guide how-to static-ip-raspberry-pi

Somewhere in the middle it explains how to do it via the gui.

Now, what to put there...

You mention "The controller itself has a configurable static IP address". So if you can indeed put what ever you want then put something like this for the device

IP 192.168.7.1

Mask 255.255.255.0

gateway 192.168.7.2 (irrelevant we don't need it)

if it asks for dns then again put 192.168.7.2 Again doesn't matter.

For the raspberry put

IP 192.168.7.2/24

router 192.168.7.1 (again irrelevant it doesn't matter)

dns server like you did for the device, put the device's IP (192.168.7.1), not that it matters really.

If you can't edit the IP of the device and it's fixed, then in the raspberry put something in the same subnet as the device. In other words, copy the first 3 parts of the IP the device has and for the last part put something other than the device's last number. Hope it makes sense.

3
  • Thanks for the guide, however it doesn't help. Like I said in the question, I can only configure a static IP for the controller device. I am NOT able to set a mask, gateway, or DNS for the device. The controller ONLY has an IP address.
    – embedtime
    Commented May 26, 2023 at 18:13
  • Let's focus on giving the example IP I mentioned to the raspberry. After that assign the example IP I mentioned to the device. Don't worry/care about the dns and the mask at this point. After you do that what happens if you ping 192.168.7.1 from the raspberry? Do you get a reply?
    – papatrexas
    Commented May 31, 2023 at 7:16
  • The device default static IP is 192.168.200.161 so I kept it configured to that. I then set the raspberry PI eth0 to the IP 192.168.200.160/24 and left the other options blank. When I try to ping the device (192.168.200.161), I get nothing in response. All packets are lost.
    – embedtime
    Commented May 31, 2023 at 18:37
0

Solution:

As it turns out, I was attacking the problem from the wrong angle.

When plugging an ethernet cord into the raspberry pi, the pi automatically assigns the port an IP on a specific subnet. From there, I just had to configure the controller device to have a static IP on the same subnet as the Pi's ethernet port. From there, it connected without issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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