firmware icon indicating copy to clipboard operation
firmware copied to clipboard

Bad usb removed on M5Sticks (Beta bruce) | Bug

Open DESVOR8 opened this issue 7 months ago • 0 comments

Describe the bug: You cannot use BadUSB on M5Sticks

Steps To Reproduce:

  1. Install Bruce (beta) on M5Sticks
  2. You cannot start badUSB in Others (with ch9329)
  • Device used: M5stickcplus2

Expected behavior: "BadUSB & HID" available with ch9329, and should work on M5Sticks

Actual behavior: In others BadUSB doesn't exist

Why works on release 1.14 and doesn't on beta Look at OthersMenu.cpp: Old:

#if !defined(LITE_VERSION) || defined(USB_as_HID)
        {"BadUSB & HID", [this]() { badUsbHidMenu(); }},
#endif

New:

// New consolidated BadUSB & HID submenu
#if !defined(LITE_VERSION)
#if defined(USB_as_HID)
        {"BadUSB & HID", [this]() { badUsbHidMenu(); }},
#endif
#endif

You just removed CH9329 from the code, but in all versions (new and old) this code still exists:

#if !defined(USB_as_HID)
                mySerial.write(0x00);
                while (mySerial.available() <= 0) {
                    if (mySerial.available() <= 0) {
                        displayTextLine("CH9329 -> USB");
                        delay(200);
                        mySerial.write(0x00);
                    } else break;
                    if (check(EscPress)) {
                        displayError("CH9329 not found"); // Cancel run
                        delay(500);
                        goto EXIT;
                    }
                }
#endif

In ducky_setup()*

Results of update You fixed logic error, but removed BadUSB on M5Sticks

How to fix Just replace this:

#if !defined(LITE_VERSION) #if defined(USB_as_HID) {"BadUSB & HID", [this]() { badUsbHidMenu(); }}, #endif #endif

to this:

#if !defined(LITE_VERSION) || defined(USB_as_HID) {"BadUSB & HID", [this]() { badUsbHidMenu(); }}, #endif

Additional context / logs: Bug only in beta bruce, but not in 1.14 release

DESVOR8 avatar Apr 22 '26 03:04 DESVOR8