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

Introduce a short write HID command #80

Open
jose1711 opened this issue Nov 26, 2021 · 0 comments
Open

Introduce a short write HID command #80

jose1711 opened this issue Nov 26, 2021 · 0 comments

Comments

@jose1711
Copy link
Contributor

Majority (97 %) of my scripts fit under 30 bytes, many of them are around 10 bytes. Currently one needs to go through these steps in order to write a file:

  • open a file for writing (0x0e)
  • write data (0x0f)
  • send close file command (0x10)

A new short_write command could be introduced which would be used for writing files under 58 bytes in a single HID command issued from a PC. The structure of the packet could be:

  • PC to duckyPad:
Byte# Description
0 0x05
1 Sequence number
2 0x??
3 profile index (0x01-0x10)
4 key index (0x1-0xf)
5 .. 62 data to write
63 0x00
  • duckyPad to PC:
Byte# Description
0 0x04
1 Sequence number
2 0 = SUCCESS, 1 = ERROR, 2 = BUSY
3 ... 63 0x00

This may result in improved performance when writing multiple smaller scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant