Discussion:
Configure DHCP for Ethernet from user application
CTurner
2012-05-22 01:14:27 UTC
Permalink
Hi all,

I have a FreeARM Tiny210 development device running Android 4.0.3. The
Android system has ethernet support, and came prepackaged with an Ethernet
Settings application. The problem I'm having is that on boot, the device
assigns a static IP which doesn't play nice with the network my application
needs to use, so I have to manually go into the Ethernet Settings app. The
app does remember that I want to use DHCP, so every time I go into it it
automatically configures the settings correctly.

What I would like to know is how can I a) get my own app to reset ethernet
to use DHCP on start-up, or b) change some setting on the OS so that on
boot it selects DHCP.

Any thoughts on what I should be looking for?
Thanks.
--
unsubscribe: android-porting+unsubscribe-/***@public.gmane.org
website: http://groups.google.com/group/android-porting
Robert Greenwalt
2012-05-24 19:23:44 UTC
Permalink
The built in support for ethernet isn't very good.

You could make a build setup to auto-start dhcp on your ethernet iface.
Making this UI configurable would be more work, but it's doable.

Modify your init.rc with something like:
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
class main
oneshot

R
Post by CTurner
Hi all,
I have a FreeARM Tiny210 development device running Android 4.0.3. The
Android system has ethernet support, and came prepackaged with an Ethernet
Settings application. The problem I'm having is that on boot, the device
assigns a static IP which doesn't play nice with the network my application
needs to use, so I have to manually go into the Ethernet Settings app. The
app does remember that I want to use DHCP, so every time I go into it it
automatically configures the settings correctly.
What I would like to know is how can I a) get my own app to reset ethernet
to use DHCP on start-up, or b) change some setting on the OS so that on
boot it selects DHCP.
Any thoughts on what I should be looking for?
Thanks.
--
website: http://groups.google.com/group/android-porting
--
unsubscribe: android-porting+unsubscribe-/***@public.gmane.org
website: http://groups.google.com/group/android-porting
Ronnyek
2012-05-24 19:53:09 UTC
Permalink
There are patches available that add configuration dialog etc, mostly all
originated by yi sun of the android-x86 project.

They never applied out of the box for me, but were straightforward enough
to patch manually. Do a bit of research, and you'll be good to go with full
blown EthernetService,EthernetManager,EthernetConfiguration etc

Ronnyek
Post by CTurner
Hi all,
I have a FreeARM Tiny210 development device running Android 4.0.3. The
Android system has ethernet support, and came prepackaged with an Ethernet
Settings application. The problem I'm having is that on boot, the device
assigns a static IP which doesn't play nice with the network my application
needs to use, so I have to manually go into the Ethernet Settings app. The
app does remember that I want to use DHCP, so every time I go into it it
automatically configures the settings correctly.
What I would like to know is how can I a) get my own app to reset ethernet
to use DHCP on start-up, or b) change some setting on the OS so that on
boot it selects DHCP.
Any thoughts on what I should be looking for?
Thanks.
--
unsubscribe: android-porting+unsubscribe-/***@public.gmane.org
website: http://groups.google.com/group/android-porting
Loading...