firmware icon indicating copy to clipboard operation
firmware copied to clipboard

BadUSB/BLE bug

Open s8ns6n opened this issue 11 months ago • 2 comments

Describe the bug

BadUSB/BLE function doesn't work properly with Turkish keyboard layout (tr-TR). Characters and punctuation marks are incorrectly mapped when executing payloads.

Steps To Reproduce

  1. Set Bruce device keyboard layout to 'tr' (Turkish Q)

  2. Set target PC keyboard layout to Turkish Q (Windows: 0000041f)

  3. Create payload file with content: GUI r DELAY 500 STRING https://www.youtube.com/watch?v=5wpkmj5YjWI ENTER

  4. Execute payload via BadUSB or BadBLE

  5. Observe incorrect character output

Expected behavior

Payload should execute as written: https://www.youtube.com/watch?v=5wpkmj5YjWI

Actual behavior

Output contains incorrect characters: httpsÇ//wwwçYoutubeçcom/watch?v=5wpkmj5YjWI

Character Mapping Analysis

Problematic characters identified:

  • . (dot) → Ç (incorrect)
  • / (slash) → ç (incorrect)

Device Info

  • Device: T-Embed CC1101 Plus
  • Bruce Firmware Version: 23857bc
  • Connection Type: USB/BLE

Environment

  • Target OS: Windows 11 25H2 Turkish
  • Keyboard Layout: Turkish Q (0000041f)
  • Hardware: Standard Turkish Q keyboard

Additional Testing Results

Tested with different character sets:

  • Lowercase: abcçdefgğhıijklmnoöprsştuüvyz Correct
  • Uppercase: ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ Correct
  • Punctuation: .,;:\'"!? Errors
  • Numbers: 0123456789 Correct
  • Special: /@#$%^&*() Errors

Suggested Fix

The Turkish layout file needs proper scancode mapping for:

  • Punctuation marks (.,;:'"!? etc.)
  • Special characters (/ @ # $ % ^ & * and Turkısh special characters)

s8ns6n avatar Jan 04 '26 16:01 s8ns6n

I will check this on my local branch which I have been working on with loads of BadUSB/BLE changes.

emericklaw avatar Jan 04 '26 16:01 emericklaw

duplicated https://github.com/BruceDevices/firmware/issues/1947

bmorcelli avatar Jan 05 '26 11:01 bmorcelli