Android Question WiFi speed data transfer mesurement.


Active Member
Licensed User
Longtime User
I have an ESP32 board reading files from a SD card and then send them to an Android app (via WiFi naturally). I need to know how fast the data is received on the Android side. Is there a way to know the bitrate of the data transfer? Or maybe know the exact time it took to receive the file?

Thank you for any help.


B4X founder
Staff member
Licensed User
Longtime User
It should be simple to calculate the transfer speed. Store the first NewData event time in a global variable (long variable). The transfer speed is:
Sub AStream_NewData (buffer() As Byte)
  counter = counter + buffer.Length
  Log($"Speed = ${counter * 1000 / (DateTime.Now - FirstEventTime)} bytes per second."$)
 'save buffer
End Sub
Upvote 0