Android tethering, how to disable dhcp
Asked Answered
R

1

6

Using WifiManger and reflection(to find the enablewifiap() method), I am able to enable wifi tethering to create a wifi hotspot.

However, I would like to disable DHCP for the other devices that will connect to the phone that is acting as the hotspot. I am not able to find any functions that would achieve this. Anyone has a solution?

Robber answered 26/5, 2011 at 11:4 Comment(0)
R
1

There are no functions exposed via WifiManager, WifiService and NetworkManagementService that can disable DHCP for Wi-Fi AP (as far as I can see from thecode). You can inspect NetworkManagementService's code closer (especially setAccessPoint function) if you interested in implementation details.

Radiate answered 26/5, 2011 at 11:37 Comment(2)
Is there any way to do this through the NDK? Perhaps killing the daemon that deals with the DHCP (if it exists).Robber
What about looking at netstat and getting the process using port 67?Glyptic

© 2022 - 2024 — McMap. All rights reserved.