Documentation
Search…
Manual IP settings

Recalbox 4.0​

In order to select a fixed ip for your recalbox, you will have to edit the file /etc/network/interfaces.
Information:
For a permanently solution you must edit theinterfaces.base file. And before you can edit this file you must remount the file system as rw. So try this commands: mount -o remount,rw / nano /etc/network/interfaces.base
    Search the line containing the interface you want to modify (ethX para ethernet, wlanX para wifi):
1
auto eth0
2
iface eth0 inet dhcp
Copied!

So let us modify eth0 ip.

    Replace with the static ip settings :
1
auto eth0
2
iface eth0 inet static
3
address 192.168.1.10
4
network 192.168.1.0
5
netmask 255.255.255.0
6
broadcast 192.168.1.255
7
gateway 192.168.1.254
Copied!
    Neste exemplo, sua: A rede local tem como endereço do modem 192.168.1.x. O endereço da sua placa é 192.168.1.254. Sua máscara de rede é, portanto, 255.255.255.0. E você deseja que seu endereço seja 192.168.1.10
By switching to a static IP address, you will lose the configuration of your DNS server(s) in the process. In order to get name resolution working, you will have to create a file names/etc/resolv.conf. By default, this files points to an auto-generated file located at /tmp/resolv.conf, so in order to do it once and for all, run the following commands:
1
rm /etc/resolv.conf
2
nano /etc/resolv.conf
Copied!
Enter the following lines, which corresponds to DNS servers of the OpenDNS project:
1
nameserver 208.67.222.222nameserver 208.67.220.220
Copied!
Save the file.
Now reload the settings with : ifdown eth0 && ifup eth0
THESE EDITS WILL BE OVERWRITTEN WITH EACH NEW UPDATE - You will have to repeat these tasks after each update.

Starting from Recalbox 4.1

Type connmanctl services and note what is returned, for example:
*AO Wired ethernet_b827eb6462be_cable
    Then type: cd
nano custom.sh
1
#!/bin/bash
2
/usr/bin/connmanctl config ethernet_b827eb6462be_cable --ipv4 manual 192.168.1.181 255.255.255.0 192.168.1.1
3
mount -o remount,rw /
4
echo "nameserver 208.67.222.222" >> /etc/resolv.conf
5
echo "nameserver 208.67.220.220" >> /etc/resolv.conf
Copied!
Replace ethernet_* by the value you've got previously and the IP address you want to give. You might wish to replace the DNS server IPs of the OpenDNS project, with the DNS servers (if any) provided by your own ISP.
hen quit from nano text editor by Ctrl X, answer the saving question by typing Y and then finally Enter.
After quiting nano and back to terminal shell, type the command chmod +x custom.sh, making it executable, then reboot to restart your Recalbox.

Starting from Recalbox 6.1

Since version 6.1, it is possible to edit the IP manually in the recalbox.conf file:
1
## Wifi - static IP
2
## if you want a static IP address, you must set all 3 values (ip, gateway, and netmask)
3
## if any value is missing or all lines are commented out, it will fall back to the
4
## default of DHCP
5
;wifi.ip=manual ip address
6
;wifi.gateway=new gateway
7
;wifi.netmask=new netmask
Copied!
You need to remove the ;from the front of the last three lines, or the configuration will not work, and fill them in with the information you want, for example:
1
wifi.ip=192.168.1.10
2
wifi.gateway=192.168.1.254
3
wifi.netmask=255.255.255.0
Copied!
Last modified 9mo ago