Ideally, I need to connect a Wi-Fi only tablet (using a Nexus 10 with Android 4.2 for testing) to an ad-hoc access point, but since that is not possible without an unacceptable rooting & modification of the device to provide the ad-hoc mode that Google refuses to implement, I'm attempting to reverse the connection by establishing a Wi-Fi access point on the Android device and getting the other device to connect ti it instead.
The general method uses reflection to get access to the "setSifiApConfiguration" and "setWifiApEnabled" methods as described in many places including this
however, whilst this successfully sets up an access point I can connect to with another Wi-Fi device (Eg PC), I have not been able to associate a static IP address with the access point or alternatively get DHCP working, with the result whilst the access point is "connected", I have no IP connectivity.
The reflection method is documented by many people, but generally with respect to modifying the access point config on a device usually associated with having a "hot spot" like a phone. The Nexus 10 wifi only tablet doesn't have a "hot spot" feature, presumably since without GSM connectivity, there is usually no point.
If I run my test program, ie the one that establishes an access point but fails as described, on an Android phone instead off the Wi-Fi only tablet, then it indeed does turn on the access point, albeit with the configuration for the "hot spot" rather than the SSID I am trying to program.
Maybe this is just not possible, although I an reluctant to believe that without expert advice. If anybody has got an access point going on a Wi-Fi only ICS or later device, I love to hear about it.