How to add support of static ip for ethernet on system

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to add support of static ip for ethernet on system

4,114 Views
anupamnalgundwa
Contributor I

Hi,

I am using imx6 solo(Android version 4.3.3) and Freescale application to set a static IP for Ethernet. But on power on off the static IP gets rest to 0. Also if I remove my cat-5 cable the IP get reset. How to retain static IP on both conditions i.e. on power cycle also on removing cat-5 cable. If there is any patch by which I can integrate these into my system will be great .
Thanks in advance.

Labels (5)
0 Kudos
14 Replies

3,564 Views
anupamnalgundwa
Contributor I

I am still waiting for the solution . Please can anyone help me out.

0 Kudos

3,564 Views
Yuri
NXP Employee
NXP Employee

Hello,

  please refer to the following :

https://community.nxp.com/message/927872 

Regards,

Yuri.

0 Kudos

3,564 Views
anupamnalgundwa
Contributor I

Thanks but after above command also same problem is there . Ip still get reset.

0 Kudos

3,564 Views
aravinthkumarja
Senior Contributor II

Hi Anupam

Can you try below command:

=> ifconfig eth0 192.168.1.100


Regards,

Aravinth

0 Kudos

3,564 Views
anupamnalgundwa
Contributor I

Dear aravinth,

I stopped at u-boot and passed your command still after boot when in give netcfg it shows 0.

Attached image please have a look.

Thanks in advance

0 Kudos

3,564 Views
aravinthkumarja
Senior Contributor II

Hi Anupam,

Don't add it as separate environment. You have one bootargs environment. In that you add the ipaddr.

Regards,

Aravinth

0 Kudos

3,564 Views
anupamnalgundwa
Contributor I

Dear aravinth,

Thanks can you please elaborate a little how to add the command . It will be great help .

Thanks in advance.

0 Kudos

3,563 Views
aravinthkumarja
Senior Contributor II

Hi Anupam,

For example : 

This is your boorargs,

bootargs=console=ttymxc0,115200 androidboot.console=ttymxc0 consoleblank=0 vmalloc=400M init=/init video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32

In this above bootargs you add you ip address like below:

setenv bootargs "console=ttymxc0,115200 androidboot.console=ttymxc0 consoleblank=0 vmalloc=400M init=/init video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32 ipaddr=192.168.1.100"

If you add like this it may work.

Regards,

Aravinth

0 Kudos

3,563 Views
aravinthkumarja
Senior Contributor II

Can you try this!!
setenv bootargs "console=ttymxc0,115200 vmalloc=400M init=/init video=mxcfb0:dev=lcd,CLAA-WVGA,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=10M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=384M no_console_suspend=1 calibration androidboot.serialno=241a11d4e315d480 ipaddr=192.168.1.100"

0 Kudos

3,563 Views
anupamnalgundwa
Contributor I

Dear aravinth,

Thanks ifconfig works only after boot . But when passed as bootargs does not work i.e.(on power cycle the ip reset to 0. Following snap I am adding to support it

Thanks in advance

0 Kudos

3,563 Views
aravinthkumarja
Senior Contributor II

Hi Anupam,

Can you add this below line in bootargs environment.

ipaddr=192.168.1.100

Regards,

Aravinth

0 Kudos

3,563 Views
b36401
NXP Employee
NXP Employee

You can set static IP address with the command like this:

ifup eth0 192.168.1.2 255.255.255.0

Here 192.168.1.2 is the address and 255.255.255.0 is the mask.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

3,563 Views
anupamnalgundwa
Contributor I

Dear victor,

please find the attached screen shot

Best Regards,

Anupam Nalgundwar

+91 7083532302

Anacle Systems India Pvt Ltd

S26-S27, Destination Centre 1,

2nd Floor, Nanded City,

Pune: - 411041

Please consider the environment before printing this email.

This electronic message transmission contains information from Anacle Systems Pte Ltd which may be confidential or privileged. Recipients should not file copies of this e-mail with publicly accessible records. The information is intended to be for the use of the individual(s) named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this message is prohibited.

0 Kudos

3,564 Views
anupamnalgundwa
Contributor I

Thanks victor,
I have tried to stop in u-boot and passed the above mentioned command .But still it get reset at power cycle.

0 Kudos