# Проблема esp32s3 devkitc1

**URL:** <https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062>\
**Category:** Песочница. Раздел для новичков\
**Tags:** esp32\
**Created:** [02.Сентябрь.2025 00:07:01 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062 "2025-09-02T00:07:01Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aleksey314](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Aleksey314](https://forum.arduino.ru/u/Aleksey314)\
**Post date:** [02.Сентябрь.2025 00:07:01 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/1 "2025-09-02T00:07:01Z")

</div>

У меня есть плата esp32s3 к ней через отг переходник подключил юсб мышку и пользуясь этим примером [esp-idf/examples/peripherals/usb/host/hid at master · espressif/esp-idf · GitHub](https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/hid) реализовал плату как хост. Все запускется и работает, но есть одна проблема, плата через какое-то время(может 5 минут, а может и 20) перестает слушать мышку. Питание на мышке есть(работает подсветка). В порте не выводится сообщение о том, что юсб утройство было отключено. Пробовал через другую библиотеку сделать, пробовал разные мышки и другую такую же плату подключать, но проблема никуда не уходит. Помогает только нажатие rst на плате или переподключение самой мыши.  
В чем может быть проблема?

---

<div class="post-metadata">

**Author:** ![SAB](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/s/7c8e57/32.png) [@SAB](https://forum.arduino.ru/u/SAB)\
**Post date:** [02.Сентябрь.2025 04:18:04 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/2 "2025-09-02T04:18:04Z")

</div>

в 123 строке скетча

---

<div class="post-metadata">

**Author:** ![толстый](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/%D1%82/e79b87/32.png) [@толстый](https://forum.arduino.ru/u/%D1%82%D0%BE%D0%BB%D1%81%D1%82%D1%8B%D0%B9)\
**Post date:** [02.Сентябрь.2025 06:27:05 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/3 "2025-09-02T06:27:05Z")

</div>

Там ещё не в тот порт воткнуто!

---

<div class="post-metadata">

**Author:** ![vvb333007](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/v/a4c791/32.png) [@vvb333007](https://forum.arduino.ru/u/vvb333007)\
**Post date:** [02.Сентябрь.2025 07:30:45 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/4 "2025-09-02T07:30:45Z")

</div>

> [@Aleksey314](#):
>
> или переподключение самой мыши.

Это как? Вытащил-вставил?

---

<div class="post-metadata">

**Author:** ![vvb333007](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/v/a4c791/32.png) [@vvb333007](https://forum.arduino.ru/u/vvb333007)\
**Post date:** [02.Сентябрь.2025 07:33:13 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/5 "2025-09-02T07:33:13Z")

</div>

> [@Aleksey314](#):
>
> через отг переходник

Это еще что такое? Изделие какое-то дополнительное между мышой и МК или что?

---

<div class="post-metadata">

**Author:** ![MMM](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/m/0ea827/32.png) [@MMM](https://forum.arduino.ru/u/MMM)\
**Post date:** [02.Сентябрь.2025 07:50:59 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/6 "2025-09-02T07:50:59Z")

</div>

> [@Aleksey314](#):
>
> Все запускется и работает, но есть одна проблема, плата через какое-то время(может 5 минут, а может и 20) перестает слушать мышку.

на обычном компе, если мышку не трогать - оно через некоторое время “засыпает”, подсветка притухает и тд…  
Может и тут так же?

---

<div class="post-metadata">

**Author:** ![Aleksey314](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Aleksey314](https://forum.arduino.ru/u/Aleksey314)\
**Post date:** [02.Сентябрь.2025 10:27:57 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/7 "2025-09-02T10:27:57Z")

</div>

не наблюдал такого при обычном подключении в пк, да и врядли в этом дело, мышка отваливается во время активного использования

---

<div class="post-metadata">

**Author:** ![Aleksey314](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Aleksey314](https://forum.arduino.ru/u/Aleksey314)\
**Post date:** [02.Сентябрь.2025 10:29:59 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/8 "2025-09-02T10:29:59Z")

</div>

именно так

---

<div class="post-metadata">

**Author:** ![Aleksey314](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Aleksey314](https://forum.arduino.ru/u/Aleksey314)\
**Post date:** [02.Сентябрь.2025 10:31:47 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/9 "2025-09-02T10:31:47Z")

</div>

такой вот переходник  
[https://www.dns-shop.ru/product/8dec660f584aed20/otg-kabel-dexp-cernyj/](https://www.dns-shop.ru/product/8dec660f584aed20/otg-kabel-dexp-cernyj/)

---

<div class="post-metadata">

**Author:** ![vvb333007](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/v/a4c791/32.png) [@vvb333007](https://forum.arduino.ru/u/vvb333007)\
**Post date:** [02.Сентябрь.2025 11:45:53 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/10 "2025-09-02T11:45:53Z")

</div>

Скидывай скетч, у меня есть клон девкитаЦ на ESP32-S3. И мышка, внезапно, у меня тоже есть. Я попробую твою багу воспроизвести, для начала.

А ты можешь, когда мышка отвалится в очередной раз, измерить напряжение питания на USB разъеме своем?

А нет ли у тебя где на плате перемычки или площадки под пайку, на которой написано USB-OTG?

---

<div class="post-metadata">

**Author:** ![Aleksey314](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Aleksey314](https://forum.arduino.ru/u/Aleksey314)\
**Post date:** [02.Сентябрь.2025 12:16:42 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/11 "2025-09-02T12:16:42Z")

</div>

> **[GitHub - tanakamasayuki/EspUsbHost: Library for using USB Host with ESP32](https://github.com/tanakamasayuki/EspUsbHost)**
>
> Library for using USB Host with ESP32

```arduino
#include "EspUsbHost.h"

class MyEspUsbHost : public EspUsbHost {
  void onMouseButtons(hid_mouse_report_t report, uint8_t last_buttons) {
    uint8_t button_code = 0;
    uint8_t changed = last_buttons ^ report.buttons;
    last_buttons = report.buttons;

    if (changed) {
        uint8_t button_code = report.buttons;

        Serial.printf("dx:0 dy:0 scroll:0 Btn:%02X\n", button_code);
    }
};

void onMouseMove(hid_mouse_report_t report) {
    int x_move = report.x;
    int y_move = report.y;
    int scroll = report.wheel;
    int buttons = report.buttons;

    Serial.printf("dx:%d dy:%d scroll:%d Btn:%02X\n", 
                   x_move, y_move, scroll, buttons);
  };
};

MyEspUsbHost usbHost;

void setup() {
  Serial.begin(115200);
  delay(500);
  usbHost.begin();
}

void loop() {
  usbHost.task();
}
}

```

питание чуть позже попробую замерить, но подсветка на мышке остается всегда  
USB-OTG есть перемычка, и она у меня запаяна, иначе питание не шло в разъем, куда я мышку подключаю(так же запаяна перемычка IN OUT)

---

<div class="post-metadata">

**Author:** ![Aleksey314](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Aleksey314](https://forum.arduino.ru/u/Aleksey314)\
**Post date:** [02.Сентябрь.2025 12:18:30 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/12 "2025-09-02T12:18:30Z")

</div>

чтобы поймать этот баг придется мышкой пользоваться в течении како-го времени, в среднем минут 7

---

<div class="post-metadata">

**Author:** ![толстый](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/%D1%82/e79b87/32.png) [@толстый](https://forum.arduino.ru/u/%D1%82%D0%BE%D0%BB%D1%81%D1%82%D1%8B%D0%B9)\
**Post date:** [02.Сентябрь.2025 12:19:56 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/13 "2025-09-02T12:19:56Z")

</div>

А другой мышью пробовали?

---

<div class="post-metadata">

**Author:** ![vvb333007](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/v/a4c791/32.png) [@vvb333007](https://forum.arduino.ru/u/vvb333007)\
**Post date:** [02.Сентябрь.2025 12:22:12 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/14 "2025-09-02T12:22:12Z")

</div>

Ничего страшного, подождем.  
Но у меня для тебя неутешительные новгости. Автор свою библиотеку забросил, судя по всему, а багу эту не закрыл.

Как раз ьвой случай, я думаю

> <https://github.com/tanakamasayuki/EspUsbHost/issues/9>
>
> I'm using the \[example code\](https://github.com/tanakamasayuki/EspUsbHost/blob/m…aster/examples/EspUsbHostMouse/EspUsbHostMouse.ino) to show a mouse moving. I've removed the serial printing so it doesn't slow anything down, and instead flash the onboard LED if movement is detected.
> 
> For reasons I can't explain, every once in a while, the mouse seems to "disconnect" or otherwise becomes ignored by the host. My mouse has a light which flashes when it is genuinely disconnected, or is connecting to a host, and this doesn't flash, suggesting this isn't a proper USB-level disconnect. The repeated calls to \`usbHost.task();\` in the \`loop()\` are definitely being made.
> 
> The only solutions I've found are to disconnect and reconnect the mouse, or else reset the ESP.
> 
> I've tried increasing the logging for the underlying ESP libraries (in the Arduino UI: Tools -\> Core Debgging Level -\> Info), but don't get anything from that when this problem occurs. This logging DOES show the mouse being disconnected/reconnected, again suggesting this isn't actually a USB-level disconnect.
> 
> Other that that, I don't have a lot of information to go with. It's hard to reproduce, because it can be hours before it happens, and it doesn't seem to matter what you're actually doing with the mouse at the time either. I'm happy to experiment a bit if anyone has any ideas what might be worth trying.

---

<div class="post-metadata">

**Author:** ![vvb333007](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/v/a4c791/32.png) [@vvb333007](https://forum.arduino.ru/u/vvb333007)\
**Post date:** [02.Сентябрь.2025 12:28:26 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/15 "2025-09-02T12:28:26Z")

</div>

> [@Aleksey314](#):
>
> подключил юсб мышку и пользуясь этим примером [esp-idf/examples/peripherals/usb/host/hid at master · espressif/esp-idf · GitHub](https://out.arduino.ru/?redirect=https%3A%2F%2Fgithub.com%2Fespressif%2Fesp-idf%2Ftree%2Fmaster%2Fexamples%2Fperipherals%2Fusb%2Fhost%2Fhid&baseU=https%3A%2F%2Fforum.arduino.ru%2F) реализовал плату как хост. Все запускет

Ты написал, что ты сделал все на ESP-IDF а исходный код скинул на каой-то японской библиотеке все сделанное.

---

<div class="post-metadata">

**Author:** ![Aleksey314](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Aleksey314](https://forum.arduino.ru/u/Aleksey314)\
**Post date:** [02.Сентябрь.2025 12:39:38 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/16 "2025-09-02T12:39:38Z")

</div>

я в первом сообщении скидывал ссылку на пример, которым я пользовался esp-idf  
не сильно разбираюсь в этой теме, поэтому я просто скачал репу эту и по инструкции запустил.  
что у японца, что здесь, проблема одинаковая

---

<div class="post-metadata">

**Author:** ![flexprint](https://forum.arduino.ru/letter_avatar_proxy/v4/letter/f/9fc348/32.png) [@flexprint](https://forum.arduino.ru/u/flexprint)\
**Post date:** [02.Сентябрь.2025 16:50:43 UTC](https://forum.arduino.ru/t/problema-esp32s3-devkitc1/18062/17 "2025-09-02T16:50:43Z")

</div>

насколько я помню, в примерах USB Host ESP-IDF отработки всяких нештатных ситуаций, потеря линка с девайсом, переподключение, и так далее - такого там нету, я делал вручную. сомневаюсь, что в вашем прекрасном(sic!) ардуино ктото напишет вам библиотеку с таким функционалом, ведь его неоткуда спереть мвахахаххах. то есть мяу.
