Page 1 of 1

Don't work when wifi tethering is on

Posted: 2011-06-16, 08:13 UTC
by cronosmachine
Don't work when wifi tethering is on.
Always pop up this message.
"No network connection! Please either enable WLAN or disable flight mode! Turn on WLAN now?"

Posted: 2011-06-16, 13:17 UTC
by ghisler(Author)
Which function are you trying to use? FTP?

And where is the target server? On the Internet or on one of the PCs connected via tethering?

cannot FTP from android AP (when tethering is on)

Posted: 2013-01-31, 02:11 UTC
by luc.deschenaux
I had the same problem..

Steps to reproduce:

1. enable tethering (to enable WIFI access point)

2. join the wifi network with the android running the FTP server

3. try to connect to the FTP server running on the WIFI client from the WIFI AP

-> "No internet connection - Enable WLAN or disable airplane mode"


Although there a simple workaround (run the FTP server on the Android where tethering is enabled) it would be nice if it was working both ways - sometimes you dont have Internet and it is not possible to install a FTP server or tethering widget...


Thanks for all !

Posted: 2013-01-31, 13:27 UTC
by ghisler(Author)
The FTP plugin checks whether there is any active Internet connection. If there isn't, you get this error.

Posted: 2013-02-09, 16:48 UTC
by luc.deschenaux
ghisler(Author) wrote:The FTP plugin checks whether there is any active Internet connection. If there isn't, you get this error.
The FTP plugin should rather check if beside the loopback interface any other network interface is up (and has an IP address assigned).

Or simply issue an error message only when the TCP connection cannot be open with the server, without checking first for an active network interface.

It would solve the bug mentioned.

Thanks in advance !

...

Note: If you dont have an internet connection, the workaround suggested earlier (run the FTP server on the Android where tethering is enabled) is not relevant since you cannot install anything from the play store without internet...

Posted: 2013-02-11, 13:59 UTC
by ghisler(Author)
The FTP plugin should rather check if beside the loopback interface any other network interface is up (and has an IP address assigned).
And HOW is that done? Currently TC uses the Connectivity Manager to check for an active connection:

Code: Select all

		boolean connected=false;
		NetworkInfo ni;
		try { 
			ConnectivityManager cm=(ConnectivityManager)service.getSystemService(Context.CONNECTIVITY_SERVICE);
			ni=cm.getActiveNetworkInfo();
			connected=ni!=null;
			for (int i=0;i<=9;i++)
				if (!connected) {
					ni=cm.getNetworkInfo(i);
					connected=ni!=null && ni.isConnected();
				}
		} catch (Exception e) {
			ni=null;
		}
		if (!connected) {
			if (!errorMsg(s_NoInternet, true))
				return FTP_GETSOCKNAMEFAILED;
		}

Posted: 2013-03-15, 11:49 UTC
by charly_35
LO,

The workaround is to initiate the connection from the other hand.
I use this possibility between my androphone and my tablette (both android 4.0.4)