You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could anyone offer some advice for using the 'timeout' switch on the command line?
Usage:
P4wnP1_cli hid run [flags]
Flags:
-c, --commands string HIDScript commands to run, given as string
-h, --help helpfor run
-n, --name string Run a stored HIDScript
-t, --timeout uint32 Interrupt HIDScript after this timeout (seconds)
Should a timeout of 2 seconds abort the command after 2 seconds? For example, the RPi-Zero may be getting power from USB, even thought the host is shutdown. In those circumstances, the command below, via SSH, simply waits forever. I'd thought the -t would interrupt the command after the specified timeout.
Maybe I've misunderstood the purpose of that -t switch. But, any thoughts are very welcome. :-)
Thanks,
J.
The text was updated successfully, but these errors were encountered:
Not entirely sure why, but the following appears to be achieving the timeout I was looking for:
timeout 1s P4wnP1_cli hid run -c 'press("SHIFT");delay(50);type("01234567890123456789")' -t 1
In the first example below, the host is shutdown, the command times out after 1 second. In the second example below, the host is back up again, and the command is executed as normal.
Without the press("SHIFT");delay(50); I was finding some inconsistent behaviour the next time the command was run, perhaps some of the keystrokes were cached and causing an issue?
Feels a little 'hacky' but it's working consistently for my current purpose. I'll mark this closed.
Could anyone offer some advice for using the 'timeout' switch on the command line?
Should a timeout of 2 seconds abort the command after 2 seconds? For example, the RPi-Zero may be getting power from USB, even thought the host is shutdown. In those circumstances, the command below, via SSH, simply waits forever. I'd thought the
-t
would interrupt the command after the specified timeout.Maybe I've misunderstood the purpose of that
-t
switch. But, any thoughts are very welcome. :-)Thanks,
J.
The text was updated successfully, but these errors were encountered: