why android says "server failed to communicate"

hi,

i am connecting the webserver using ethernet shield and router. i am getting successfully connected when using the laptop wifi. But when i access using the android mobile, my web browser says "serever failed to commuicate. try again later"......

i am using the sketch from the tutorial....http://www.instructables.com/id/Arduino-Ethernet-Shield-Tutorial/?ALLSTEPS

Help me....... :cold_sweat:

Have you ensured your mobile just communicates over WLAN and not the mobile network? I guess your Arduino is not visible in the Internet, it's just showing up inside your LAN.

If this does not solve your problem: provide more information.

pylon:
Have you ensured your mobile just communicates over WLAN and not the mobile network? I guess your Arduino is not visible in the Internet, it's just showing up inside your LAN.

thanks for ur reply,

ya i am sure its communicating with WLAN. While testing first time it got connected well and i got perfect output. The next day without changing anything, i thought to show the output to my friends, but i was fooled with the error in android mobile "server failed to communicate. Try again later". =(

But still i am getting good output in my laptop and it communicates with ethernet shiled and router. but android mobile only problems.

And important note is that,from the time i got the first output, i didnt made any changes in the project. but it shows error.

But still i am getting good output in my laptop and it communicates with ethernet shiled and router. but android mobile only problems.

As you haven't provided more information about your network, I'd still guess that your mobile is using the mobile (GPRS, UMTS or the like) network to connect to your server and it's not possible because it's not visible in the internet. Deactivate your mobile network (safest is to select another operator, be prepared that you cannot use it for phone calls then) and activate just WLAN. Does it show up then?

And important note is that,from the time i got the first output, i didnt made any changes in the project. but it shows error.

Does that mean it shows an error on the laptop too?

Thanks a lot pylon, you are right, this time i removed my sim card from mobile and tried, i am getting the right output.

some of the difficulties i faced are,

  1. After getting output, i inserted the sim in mobile and tried, but it was showing the error again.
  2. so i set my mobile in flight mode, and switched ON my wifi alone, and tried again, with fligt mode i am getting the output.
  3. then i off the flight mode and connected to wifi. This time i am getting the output even with the sim functions.

i want the application to run even when the sim is present, so what shold i do for it.

As you haven't provided more information about your network

i cant guess what information you are expecting because i am new to networks, i connected in infra mode with wpa2 security.(is this what u asked)

Does that mean it shows an error on the laptop too?

Never, laptop always shows exact output.

i want the application to run even when the sim is present, so what shold i do for it.

This is an Android problem and not one of the Arduino, you better ask it on an Android forum (how do I force my Android handy XYZ to use WLAN instead of the mobile network). BTW: my Android is using only the WLAN if it's activated and a network in reach. As yours isn't doing so it may be specially configured or use another OS version. So if you ask your question on the Android forum specify exactly what model you have and which OS version is installed.

Thanks a lot pylon :slight_smile: