Android - turning on eth0

dkot
Hi everyone,

How can I turn on eth0 dhcp in Android?

I can do it using DNW by entering:

netcfg eth0 up
netcfg eth0 dhcp

or by adding to init.rc file the following line:
    ifup eth0

but in this case eth0 is only up and doesn't get ip address from dhcp
address.

I have to use probably any script for linux but I'm not too familiar with
this system...

Another question. Is there any sample how to communicate from Android with
hardware ( buttons,camera, i2c....)? On FriendlyARM I found only sample how
to communicate with leds on board.

Thanks