Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very slow communication with connected device to usb host #77

Open
j1981 opened this issue Oct 24, 2024 · 8 comments
Open

Very slow communication with connected device to usb host #77

j1981 opened this issue Oct 24, 2024 · 8 comments
Labels
bug Something isn't working Under investigation

Comments

@j1981
Copy link

j1981 commented Oct 24, 2024

I am using ESP32-S3 DEV KIT N8R8 with esp3d-tft to communicate via wifi with my cnc 3030 prover max (with GRBL, USB port CH340) and the setting is made to communicate via USB SERIAL port. I can send and I receive data from the cnc through the USB SERIAL port.. The problem is that there is a delay of about 1 second between the sending of the command and the execution from cnc device, this is very clear visible when a file is executed, all commands are executed with a delay between each other and the whole process is interrupted. I tested with communication from my computer directly to port 23 of an esp3d-tft board the delay remains, I tested using the web interface the delay remains on sending commands or executing file. If connect the machine directly to the computer with a usb cable everything works fine.

Can someone tell me if this is a bug or if I missed something when compiling the code.

I apologize for my bad English.

@j1981 j1981 added the bug Something isn't working label Oct 24, 2024
@Jairolaya12x
Copy link

Maybe is related to this?
#75

@luc-github
Copy link
Owner

if there is delay from webUI or telnet beween sending and execution it is not normal, command is sent right away.
The current ESP3D-TFT FW does not compile for CNC/grbl because it is not ready - what FW and settings are you using ?

@j1981
Copy link
Author

j1981 commented Oct 27, 2024

After few days of test after small correction of this code

// this task only handle connection
static void esp3d_usb_serial_connection_task(void pvParameter) {
(void)pvParameter;
while (1) {
/
Delay /
-----> vTaskDelay(1);//vTaskDelay(pdMS_TO_TICKS(10));<------
if (!usbSerialClient.started()) {
break;
}
usbSerialClient.connectDevice();
}
/
A task should NEVER return */
vTaskDelete(NULL);
}

the delay reduced to maybe to 100ms. This delay 100ms exist and at communication with SERIAL PORT. May be from other task.
However i switched to latest version of ESP3D ver. 3 with usb host support and everything work fine.

@luc-github
Copy link
Owner

I am travelling now but I will have a check - it looks like there is some task competition

@luc-github
Copy link
Owner

luc-github commented Nov 16, 2024

@j1981 so now you are using ESP3D and no more ESP3D-TFT ?

I am back home now so I will review that issue in coming days

@j1981
Copy link
Author

j1981 commented Nov 16, 2024

Yes I already use esp3d and it works great. I only needed communication via usb without using a display. I hadn't read that usb communication has already been added to esp3d.

@luc-github
Copy link
Owner

Yes I already use esp3d and it works great. I only needed communication via usb without using a display. I hadn't read that usb communication has already been added to esp3d.

do you mean : https://esp3d.io/ESP3D/Version_3.X/documentation/otg/

@j1981
Copy link
Author

j1981 commented Nov 16, 2024

Yes. My cnc uses CP340 USB to UART converter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Under investigation
Projects
None yet
Development

No branches or pull requests

3 participants