Searching info of how to measure the time of a ping for a ping test

Hello to the people of the Forum.

I want to make an app for measure the time value in ms of a ping with the phone in a continuously.
Like a ping test.
But i didn't find any information about how to do it.

I have seen an terminal extension who do the ping, (From Juan Antonio) but i want to measure CONTINUOUSLY the values in ms of interval of the pings, not a single one ping.

I search in the forum, and in google as Ping testing, ping measuring with AI2, and nothing.

BUT, in my google search i did find a tutorial of how to do it with another IDE from the phone, (with sketchware) not app inventor... I do not know if is of any value to share the link because is not from AI2, but the app works with blocks coding, but not equal, like Thunkable, Kodular or Niotron. (The blocks are totally different in some cases but also have similar blocks like AI2 and others).

i want to make it with AI2 and maybe if i do it well, share my work of how to do it with the community. Maybe i do not go too far, but someone catch the idea and do it better.

It's obvious i need to have in the app a clock sensor, some labels for show the info of the ping, but i do not know how to GET the measurement. The time interval between pings. And obviously i do not know if i can get the ping using the extension (TERMINAL).

For the record, this is the link to the video of youtube of the app coded with the other IDE. I do not know if any use, but here i share it. (if this not correspond, i will remove the example, i do not have any problem deleting the example of the video).
SKETCHWARE: How to make Ping Tester #1 - YouTube

Thanks.

Hi there! Did you manage to ever figure it out?

Use the terminal extension by @Juan_Antonio

image

The data back should give you everything you need

1 Like

I want to use it to determine the speed of the firebase that I am sending and collecting data from. So one phone sends data to the Firebase server and another phone collects the data to use it. Can I possibly achieve this using this extension?

With a decent network connection firebase's response is usually in milliseconds (and Firebase is rarely, if ever, down). Is that important to you, or network connection in general ?

Yes, it is. I need it to check how fast it is running to perform certain error functions if it is too slow.

But that may not be the fault of Firebase, just the network connection (data or wifi), and this will vary person to person, and is often outside of your control, other than alerting a user to a poor network connection.

You may wish to research here:

and you can ping google servers (which include Firebase) on ip 8.8.8.8

Hi sorry, I just want to clarify what I want to do. This is for my telepresence Robot. So I will be sending motor control commands from one phone (user phone) to the other (robot phone) and I need to see how fast that occurs using a ping function. The idea is that if the time is above a certain threshold, let's say 200ms (as an example), then I know that there is lag and the robot phone should switch off the motors if they were previously moving. This is to avoid the case where you send a command to move and send another command to stop but because of the lag, it moves for too long and might bump into an object. This can also be important in cases where either phone loses internet connection. I hope that makes sense. Below is a diagram of my system: