T Toley Active Member Licensed User Longtime User Apr 1, 2017 #1 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.
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.
Erel B4X founder Staff member Licensed User Longtime User Apr 2, 2017 #2 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: Code: Copy 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
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: Code: Copy Sub AStream_NewData (buffer() As Byte) counter = counter + buffer.Length Log($"Speed = ${counter * 1000 / (DateTime.Now - FirstEventTime)} bytes per second."$) 'save buffer End Sub