Connection problems: Asign static ip?

Hello everyone,

I have connection problems with lakka on my cuboxi to access by ssh. If I try to connect cubox by wire (ethernet), lakka not has any IP assigned. My local network configuration is DHCP.

The only way that connection works is doing the next steps:

  1. Turn off cubox
  2. Disconnect ethernet wire
  3. Turn on cubox
  4. With Lakka graphical interface, configure Wifi connection and connect it (only writing wifi password)
  5. Then, connect wire ethernet to cubox and disable wifi by ssh command

If I follow these steps, the connection works well, but when I reboot the system, the same connection problem reappears. I think the problem could be the autoasigned IP by the DHCP, because it seems that is not possible to work the two connections types at same time (wifi and ethernet wire).

Is it possible to configure an Static IP in Lakka? Is it possible to disable the Wifi in Lakka forever? (That lakka doesn’t allow enable wifi by the graphical interface in any way). Has anyone had the same problems?

Thanks a lot for the help!

More information about problem: When i am configuring the bluetooth ps3 controllers (by WIFI SSH), Cubox start to lose connection and works slow:

ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 64 bytes from 192.168.1.3: icmp_seq=3 ttl=64 time=162.535 ms Request timeout for icmp_seq 4 Request timeout for icmp_seq 5 64 bytes from 192.168.1.3: icmp_seq=6 ttl=64 time=260.226 ms 64 bytes from 192.168.1.3: icmp_seq=7 ttl=64 time=183.431 ms Request timeout for icmp_seq 8 64 bytes from 192.168.1.3: icmp_seq=9 ttl=64 time=88.699 ms Request timeout for icmp_seq 10

Any idea?

Try to boot directly to terminal to get some output of ifconfig and dmesg.

Thank you.

Thanks a lot for the help gouchi.

I could not access to boot directly to terminal. I edit uEnv.txt file. I put the line “tty retroarch=0” just after “disk=/dev/mmcblk0p2” but it doesn’t works. Is it also necessary to change the “consoleblank” param to 1 too?

Sorry, i am a novice linux user, i am learning it.

If it serves, I acess with SSH and execute ifconfig and dmesg commands.

In this file you can see the result ifconfig command connecting wifi and ethernet at same time and connecting only the wifi: https://dl.dropboxusercontent.com/u/1820038/Cubox/ifconfig.txt

In this file you can see the result dmesg command connecting only the wifi: https://dl.dropboxusercontent.com/u/1820038/Cubox/dmesg_only_wifi.txt

In this file you can see the result dmesg command connecting wifi and ethernet at same time: https://dl.dropboxusercontent.com/u/1820038/Cubox/dmesg_wifi_and_eth.txt

Regards!

If you can access terminal with ssh it is fine :wink: If doesn’t work with tty retroarch=0 you can try to append textmode.

When you are connected by ssh, try to use connman-ncurses then disable wifi and enable ethernet.

Hello gouchi,

I have created an .sh file with “connmanctl disable wifi”. How can I execute automatically this script on system start? I try to create an init.d file inside /etc but I can not.

Thanks a lot for the help!

I try to create the file /storage/.config/autostart.sh and add the next lines to the file:

connmanctl disable wifi connmanctl connect ethernet_d063b4002e1f_cable

And do: chmod +x /storage/.config/autostart.sh

If I call the autostart.sh script with ssh it works, it disables the wifi and connects to ethernet. But If I reboot the cubox not works, the cubox not has connectivity to ehternet.

Any idea about the problem? Is possible that autostart script is not being executed?

Thanks a lot for the help

And this is the result of dmesg after the reboot:

[ 5.110954] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 25 2011 19:34:12 version 5.90.125.104 [ 5.368882] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:00, irq=-1) [ 5.369088] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 5.649490] Bluetooth: Core ver 2.18 [ 5.649576] NET: Registered protocol family 31 [ 5.649583] Bluetooth: HCI device and connection manager initialized [ 5.649610] Bluetooth: HCI socket layer initialized [ 5.649621] Bluetooth: L2CAP socket layer initialized [ 5.753419] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists [ 5.753449] brcmfmac: brcmf_add_if: ignore IF event [ 5.773279] Bluetooth: SCO socket layer initialized [ 5.783284] Bluetooth: HCI UART driver ver 2.2 [ 5.783301] Bluetooth: HCI H4 protocol initialized [ 5.783308] Bluetooth: HCI BCSP protocol initialized [ 5.783313] Bluetooth: HCILL protocol initialized [ 5.783318] Bluetooth: HCIATH3K protocol initialized [ 9.382489] libphy: 2188000.ethernet:00 - Link is Up - 1000/Full [ 9.382526] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 492.989037] libphy: 2188000.ethernet:00 - Link is Down [ 493.316250] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

First, what is the result using connman-ncurses ?

Sorry, here the result, if I connect ethernet wire and wifi to cubox:

wifi WiFi (wifi) Powered true Connected true │ │ ethernet Wired (ethernet) Powered true Connected true

The wifi configuration: │ State ready │ │ Name WifiName │ │ Type wifi │ │ Security [ “psk” ] │ │ Strength 1995473210 │ │ Favorite true │ │ Immutable false │ │ AutoConnect true │ │ │ │ Ethernet │ │ Method auto │ │ Interface wlan0 │ │ Address B8:5A:F7:82:A6:08 │ │ MTU 1995441628 │ │ │ │ │ │ IPv4 │ │ Method dhcp │ │ Address 192.168.1.3 │ │ Netmask 255.255.255.0 │ │ Gateway 192.168.1.1 │ │ │ │ │ │ IPv4.Configuration │ │ Method dhcp │ │ │ │ IPv6 [ ] │ │ │ │ IPv6.Configuration │ │ Method auto │ │ Privacy disabled │ │ │ │ Nameservers [ “80.58.61.250”, "80.58.61.25 │ │ Nameservers.Configuration [ ] │ │ Timeservers [ “10.22.96.1”, "0.pool.ntp.or │ │ Timeservers.Configuration [ ] │ │ Domains [ “lan” ] │ │ Domains.Configuration [ ] │ │ │ │ Proxy │ │ Method direct

│ │ Proxy.Configuration [ ]
│ Provider [ ]

[FONT=arial]And the configuration of ethernet:

[/FONT] │ Service configuration : │ │ │ │ State ready │ │ Name Wired │ │ Type ethernet │ │ Security [ ] │ │ Favorite true │ │ Immutable false │ │ AutoConnect true │ │ │ │ Ethernet │ │ Method auto │ │ Interface eth0 │ │ Address D0:63:B4:00:2E:1F │ │ MTU 1995900380 │ │ │ │ │ │ IPv4 │ │ Method dhcp │ │ Address 192.168.1.18 │ │ Netmask 255.255.255.0 │ │ Gateway 192.168.1.1 │ │ │ │ │ │ IPv4.Configuration │ │ Method dhcp │ │ │ │ IPv6 [ ] │ │ │ │ IPv6.Configuration │ │ Method auto │ │ Privacy disabled │ │ │ │ Nameservers [ “80.58.61.250”, "80.58.61.25 │ │ Nameservers.Configuration [ ] │ │ Timeservers [ “10.22.96.1”, "0.pool.ntp.or │ │ Timeservers.Configuration [ ] │ │ Domains [ “lan” ] │ │ Domains.Configuration [ ] │ │ │ │ Proxy │ │ Method direct │ │ │ │ Proxy.Configuration [ ] │ │ Provider [ ]

Could be that it has different IP addresses? Wifi 192.168.1.3 and Eth 192.168.1.18 In this case, how can I change the IP addresses?

Thanks a lot for the help

Oh sorry, here the result, if I connect ethernet wire and wifi:

│ wifi WiFi (wifi) Powered true Connected true │ │ ethernet Wired (ethernet) Powered true Connected true

In this file you can see detailed wifi and ethernet configurations: https://dl.dropboxusercontent.com/u/1820038/Cubox/connman-ncurses.txt

Could it be that they have different IP addresses? Wifi 192.168.1.3 and Eth 192.168.1.18 If the problem is that, how can i change IP addresses?

Thanks a lot for the help

Why both interfaces are enabled ? Try to disable wifi and it should be ok (you can do it with connman-ncurses).

If you have an issue with dhcp, check your router configuration but it should be fine as you got IP addresses.

I have disabled the wifi. But when I reboot the system, the same problem reappears :frowning:

I have been able to access by terminal modifying the uEnv.txt file (adding textmode). I have executed the connman-ncurses and appears this error: “Could’t ger data from connman dbus service. Check if connmand is running.” “Segmentation fault”

If I try many times to execute the command, sometimes works. In this case, I see that the interfaces are duplicated by every second that passes, you can see it here: https://dl.dropboxusercontent.com/u/1820038/Cubox/IMG-20161122-WA0000.jpg

In summary, if I disable the Wifi and enable the Ethernet, when reboot the system, it duplicates the interfaces as if it were in a loop :S

Thanks you very much for the help and the patience gouchi

Can you make a test with latest nightly ?

The problems I have are with the latest version available: devel-20161106233514-r21640-ge218f0f

Searching in google i found that cubox could have problems with openelec drivers.

I want to try this command for reduce ethernet speed: ethtool -s eth0 speed 100 duplex full

But this command not shows any result in command line.

In addition, I tried to create the autostart.sh file (with executing permissions) with this content:

connmanctl enable offline; connmanctl enable ethernet;
ethtool -s eth0 speed 100 duplex full; connmanctl connect ethernet_d063b4002e1f_cable;

But seems that it doesn’t execute any line on system boots.

Any idea?

Thanks for the help