Octoprint 0.15 ethernet fixed ip


#1

What is the problem?
Im using a raspberry 2 so i need to configure wired network
What did you already try to solve it?
Searched for a solution
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
0.15.1


#2

OctoPi should automatically detect and load the drivers for an Ethernet adapter as plugged into your network. You shouldn't have to edit any of the configuration files for this to take place.

It's good if the Ethernet cable is connected on both ends before the Raspi boots.

The yellow/green (ink active & link activity) LEDs next to the Ethernet jack are related to the network connectivity. You're looking for a successful "link" condition when the Raspi is powered on and it's linked into the Ethernet.

In some cases, an Ethernet hub/switch is configured in such a way that only a particular speed is supported; slower devices can't "link in". The Raspi at its maximum setting can do 100MBps-Full as its setting. If your router is set above this then it could be preventing the Raspi from linking in.

If it were me, I'd plug an HDMI video cable, monitor and keyboard into the Raspi and see what's going on locally. I'd log in and I'd run an ifconfig to see if the Ethernet adapter is happy.


#3

Hi,
In previous versions you had a file in the sd card were you could setup your ip, now you can only setup de wireless.
I tried to connect a screen to hdmi but i only got a no signal. How can i ativate the hdmi?
Thanks in advance


#4

You shouldn't have to activate the HDMI port. If there's no signal then it could be that it's not booting.

Try following the instructions for flashing the OctoPi image to the microSD card completely rather than trying to copy things there manually. Doing it correctly results in two partitions on the microSD card rather than just one and it will set the appropriate partition types for each.


#5

Hi,

Using angryIpScanner i manager to connect via ssh to raspberry and change ethernet ip but i still cant get anything on hdmi.

Is there any configuration im missing?

Thanks in advance


#6

If you've managed to remote into it (via wifi presumably), then run ifconfig to see what's going on with the wired Ethernet connection (making sure that it's connected).

You could mention what LEDs are lit on the Raspi next to the RJ45 connector for the Ethernet. This could tell you the state of the adapter.


#7

I have a similar topic.

I need to configure a static IP address for my OctoPI.
With version 0.14.3 i configured the static IP in the octopi-network.txt.

How can I do it with version 0.15.1?

A configuration in the octopi-wpa-supplicant.txt does not work.

Does somebody have an example?

Thanks in advance.


#8

sudo nano /etc/dhcpcd.conf
and (for address eg 192.168.1.120 on Router 192.168.1.254) add:

interface wlan0
static ip_address=192.168.1.120/24
static routers=192.168.1.254
static domain_name_servers=8.8.4.4 8.8.8.8


#9

Hi all. I´ve flashed new 0.15.1 octoprint and I´ve the same problem because I must configure octoprint without wifi and hdmi connection, only via ssh and wired network. Later versions we have octo_network file, but now it doesn´t exist (better, it doesn´t work).

Any idea to configure at this way?

Thanks in advance.


#10

Begin by editing /boot/octopi-wpa-supplicant.txt while it's still in your workstation and don't forget to touch an empty ssh file there as well.

Boot the Raspi.

Then follow b-morgan's advice to set the static IP.


#11

I try to fix the ethernet IP, but when I do it, I can't access octopi from SSH by Putty.
I tried these two posts in the forum:


I was able to fix the IP with one option or another, but no SSH access:

PuTTY Fatal Error
Network error: Connection refused


#12

Can you verify that the ssh file you created doesn't have a .txt extension, for example?


#13

In my case I CAN'T USE WIFI to setup a SSH connection, only wired ethernet. As coleague said: others versions with octopi-network.txt we can setup a wired network and we can give a Static IP to rpi, but in this version don't.

Anybody knows how to give an IP adrress at the first time to make a SSH connection without WIFI?

Thanks in advance.


#14

cauboy,

do you try to configure a static IP before your 1st time booting from SD or after with local CLI access ?

Jan P.


#15

If you need to configure a static IP before 1st boot you would have to mount the root partition from the SD card. I have no clue if and how that would work on Windows. On a Linux you can just do something like this:

sudo mount /dev/mmcblk0p2 /mnt/

The path to the device might be different for you, just issue lsblk and it should show you the SD card device, for example on my laptop its like this:

jp@T410:~$ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    0  1.8T  0 disk 
└─sda1        8:1    0  1.8T  0 part /
sr0          11:0    1 1024M  0 rom  
mmcblk0     179:0    0  7.4G  0 disk 
├─mmcblk0p1 179:1    0 43.1M  0 part 
└─mmcblk0p2 179:2    0    2G  0 part 

Once the root partition is mounted you can just edit the dhcpcd.conf as suggested by b-morgan above, just be sure that you use a path relative to the mountpoint, not absolute so in my example it would be

/mnt/etc/dhcpcd.conf

Jan P.

PS: The SD card has 2 partitions once the image is written, the smaller partition is the /boot/ partition, that can be accessed from windows easy, but that does NOT contain the /etc/ directory, thats in the 2nd partition which is before 1st boot 2gb on the SD card. That can not be "seen" by Windows.


#16

Plug the microSD into an SD adapter (or USB-based adapter), plug it into the Windows-based computer. Since it's a FAT partition it mounts right up. (Note that neither Windows nor OSX can successfully/safely mount the EXT4 second partition without paid third-party drivers, however.)

Having done so on Windows, make sure to use Notepad++ as the editor since these files have UNIX style of line endings.


#17

That only gives you access to the /boot directory which is a FAT32 partition, root is the 2nd partition which contains /etc/. Unless there is a way to configure a static IP in the boot partition ?

Jan P.


#18

You should be able to issue a static IP address from that /boot/cmdline.txt file to the best of my knowledge. Add ip=192.168.1.20, for example, to the end of the line.


#19

I found a post somewhere that would suggest it is possible.

https://www.raspberrypi.org/forums/viewtopic.php?t=82573#p583899

I never knew that, have to try that cause its very handy rather than having to log on my DHCP server and check out the DHCP leases.

Jan P.

Just tried that and it works as a quick workaround, seems to assume a /8 network, does apparently not allow to add a subnet mask, at least a /24 behind the ip address does not work. There sems to be very little documentation about the kernel command line config.


#20

Me neither. I tend to either hop onto my dhcp server or nmap and look for new devices.