-->
Page 1 of 1

ESP AP mode - Android not able to connect to internet

PostPosted: Sat Sep 19, 2015 1:09 pm
by matkar
Unfortunately Android phones prefer wifi to get to the internet in case of contemporary activity of mobile data and wifi connection. Android doesn't get the data from the internet unless Wifi connection is disabled.
Is there a way to tell Android to use mobile in case it is connected to ESP module?

I have tried the wifi_softap_set_dhcps_offer_option function by setting:
wifi_softap_set_dhcps_offer_option(OFFER_ROUTER, &mode); mode to zero.
I have verified the packets in Wireshark and the DHCP offer packet doesn't send Option 3 - Router IP address.
Unfortunately this doesn't convince Android and it still tries to connect to the internet via ESP module.
I'd like to keep option 6 - Domain Name Server since I'd like to be able to get to the web page on the ESP module.

Is there anything else I can try?

I have been informed it might help change Android's mind by responding to it's DNS requests by sending ICMP type 3 code 13 (destination unreachable, communication administratively prohibited). Currently a type 3 code 3 (destination unreachable, port unreachable) is sent.
Unfortunately I don't know the way to do so. At least I can't find anything in APIs.

Any suggestions?

There are some Android apps that claim to solve this problem in one way or another but i'd like to fix this on the ESP side if possible.

Regards,
Mat

Re: ESP AP mode - Android not able to connect to internet

PostPosted: Sat Sep 19, 2015 6:45 pm
by SoC
dont you want to do it the other way around?

open android hotspot. let esp connect to android. then both android and esp will have internet connectivity.

Re: ESP AP mode - Android not able to connect to internet

PostPosted: Sat Sep 19, 2015 6:59 pm
by GregryCM
Hello,

Do you have example code that provides a stable connection to Android when ESP is in AP mode?

I am looking for help... see viewtopic.php?f=29&t=5550

Greg

Re: ESP AP mode - Android not able to connect to internet

PostPosted: Sun Sep 20, 2015 6:27 am
by matkar
@SoC
No, I want it to be this way. ESP must remain AP. No internet connection is required for the ESP.

@GregryCM
I'll respond in your thread.

Regards,
Mat