gilmaimon / ArduinoWebsockets

A library for writing modern websockets applications with Arduino (ESP8266 and ESP32)
GNU General Public License v3.0
482 stars 97 forks source link

Websocket send function is take to much time with 5g Device #170

Open The3ven opened 2 weeks ago

The3ven commented 2 weeks ago

Describe the Bug I am using your WebSocket Client library with the ESP32-WROOM-32D module to send sensor data to my Ionic application after reading it from the serial interface. The serial baud rate is 9600, and the speed of the data is quite fast. When I use my Ionic application on Android 10, it works perfectly. However, when I use the same Ionic application on Android 14, there is a significant delay in the send function. I have tested this on several devices running Android 14, including the Redmi 13C and some Oppo devices, and I have found that there is considerable delay on these devices.

I would like to investigate this problem, but I am unsure how to debug this library or what could be causing this specific issue. Please help me with this matter. Have a good day!

To Reproduce Use Android 14 with the WebSocket client example and send serial read data via the send function.

Specifications and Library Versions:

Library Version: 0.5.4
Microcontroller: ESP32-WROOM-32D
Arduino ESP Core Version: 2.0.6
Android Device: Android 14, Redmi 13C, Ionic Application built using the Cordova build engine

Expected Behavior The send function should execute with no delay.

Code If possible, please share the code you are using when the bug occurs.

Additional Context Add any other context about the problem here.

kylefmohr commented 1 week ago

I believe a lot more information is needed in order to help. For example:

I'm unfamiliar with Ionic, however there should be a number of ways to debug this from the Android side, for example mitmproxy or Frida