Troubleshooting DATA Connection

roughnecks

Active member
Hi there :)

I am activating Mobile Data when out of home, based on GeoFence and it works (I'm also using ADB Hack on a Xiaomi phone to change the "mobile_data0" and "mobile_data1" values in global settings).

The point is, I'm not so sure Mobile Data is working until I turn my phone's screen on.. That's because in a couple of situations I didn't touch my phone while out, the GeoFence macro activated (logs) but there was 0 Bytes traffic (at least that's what my phone told me).

Now I did several tests with the "Connection test" action, changing a lot of domains which I know do respond to pings.. Is this a ping test, right? :p
I also did several tests because one time I got dns failure (logs again) and I wanted to make sure I always used a domain which my phone had never connected to before (to avoid dns cache).

Now the problem is that almost always my tests fail, apart from "www.google.com" (default) and the address of my homepage on "netsons.org".
Can you recommend some reliable domain to test this stuff or some other way I could do it?

Thanks and sorry for post's length.


My testing macro is something like this:
Phone is on WiFi

T: time of day (set a couple minutes into the future)
A: set mobile_data0 to 1
setmobile_data1 to 1
wait 5 secs
disable wifi
wait 15 secs
test connection

Turn off phone's screen and wait.
 

roughnecks

Active member
I just tried a different approach: launching foobar2000 on a playlist with online radios and it worked, started playing without issues..
Still wondering about the stuff above ^ 🤔
 

dsnz

Well-known member
macrodroid's connectivity test may have some peculiarity that prohibits it to be used correctly,
I have never used it to say more

but I always use and I suggest you try the shell script action with a ping test

search the forums for 'ping' and you will find many posts about correct implementation (some by me)
 

dsnz

Well-known member
I think now that connectivity check works only for web sites (ie addresses which host a web site on port 80)
 

roughnecks

Active member
I tried this:

Bash:
ping -c4 $IP >/dev/null; echo $?

But I don't know where to catch the $? variable. There's no sign of it being echoed in logs..
Sorry but it's the first time for me using a shell script inside MD!
 
Last edited:

roughnecks

Active member
OK I got a ping value of "0" and then I tried on my Debian WSL install, looks like it means it succeeded.
(y)
 

MacroDroidDev

Administrator
Staff member
MacroDroid simply tries to open a connection to whatever url you specifiy. If the connection is established then the connectivity is determined to be available.
 

roughnecks

Active member
MacroDroid simply tries to open a connection to whatever url you specifiy. If the connection is established then the connectivity is determined to be available.
Then I don't know why domains like messagenet.com or libero.it would fail.
I tried a lot of them.
 
Top