Unable to ssh on eth0 (RJ45)

I’m using MangOH green board with WP7603 for the testing, I want to connect USB drive using OTG cable to micro USB so I enabled SSH and PING on eth0(RJ45) in the iptable, after enabling I could ssh into the device using eth0(RJ45) port but as soon as I disconnect the micro-USB cable from the device it is loging out of SSH on eth0(RJ45). I want to ssh on eth0(RJ45) without microUSB connected.

I’m using SWI firmware version SWI9X07Y_02.28.03.01

root@swi-mdm9x28-wp:~# cm info
Device: WP7603
IMEI: 357409080004288
IMEISV: 6
FSN: U3734285610406
Firmware Version: SWI9X07Y_02.28.03.01 000000 jenkins 2019/04/17 03:08:11
Bootloader Version: SWI9X07Y_02.28.03.01 000000 jenkins 2019/04/17 03:08:11
MCU Version: 002.011
PRI Part Number (PN): 9906965
PRI Revision: 002.000
Carrier PRI Name: GENERIC
Carrier PRI Revision: 002.064_000
SKU: 1103194

I guess the module has gone to sleep mode after you unplugged the USB cable.
Please run the app to make the module still awake after USB disconnect.
wakeup_app.rar (199.2 KB)

Thanks for sharing the app, I could run the wakeup_app app and now the board is not going to low power mode and I’m able to ssh on eth0.

Now the problem is I’m not able to assign a static IP on port eth0 during bootup.
I modified /etc/network/interfaces to have this value at bootup, do you happen to know if I’m missing anything?

auto eth0
iface eth0 inet static
    address 192.168.1.125
    gateway 192.168.1.255

After you boot, does the device have an IP address assigned by DHCP or is there no IP address assigned? Also, what happens if you do ifdown eth0 and then do ifup eth0? Does it then have the static IP assigned?

There is no IP assigned at the boot up by dhcp,

Here is the ifconfig output,

eth0      Link encap:Ethernet  HWaddr D2:B8:DD:74:34:B4
          inet6 addr: fe80::d0b8:ddff:fe74:34b4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:202 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:12904 (12.6 KiB)  TX bytes:712 (712.0 B)

if I do ifdown it say eth0 is not configured,

root@swi-mdm9x28-wp:~# ifdown eth0
ifdown: interface eth0 not configured

what happens if you now do ifup eth0? Do you get an IPv4 address?

Sorry forgot to paste ifup command result, here is the result,

 root@swi-mdm9x28-wp:~# ifdown eth0
    ifdown: interface eth0 not configured
    root@swi-mdm9x28-wp:~# ifup eth0
    ifup: don't have all variables for eth0/inet
    root@swi-mdm9x28-wp:~#

You can assign ip manually
Ifconfig eth0 xxx. Xxx. Xxx. Xxx

auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255

With the above statements in the file /etc/network/interfaces device could setup ip address statistically at boot up, thanks all for the help.