Skip to content

Uuu hangs when executing two commands in a row targeting a port with -m flag #494

Description

@Wesztman

Hi there,

I have a program which executes uuu commands in sequence targeting a specific usb port with the -m flag.

However I have noticed that after the first command the device disappears and almost instantly appears again in the -lsusb view. If don't wait between the commands, either just a set time of ~0.5s or wait for the port to be seen with -lsusb the program just hangs.

So the command I've tested this with is

uuu -m 3:4 SDP: boot -f <pathtofile> && uuu -V -m 3:4 -T 1 SDPV: delay 1000

This just hangs when running the second command, showing

Wait for Known USB Device Appear... at path 3:4
>Start Cmd:SDPV: delay 1000
Wait for Known USB | /

If I press ctrl+c I get the following output

libusb: warning [libusb_exit] device 2.1 still referenced
libusb: warning [libusb_exit] device 1.5 still referenced
libusb: warning [libusb_exit] device 1.9 still referenced
libusb: warning [libusb_exit] device 1.7 still referenced
libusb: warning [libusb_exit] device 1.4 still referenced
libusb: warning [libusb_exit] device 1.2 still referenced
libusb: warning [libusb_exit] device 1.8 still referenced
libusb: warning [libusb_exit] device 1.6 still referenced
libusb: warning [libusb_exit] device 1.3 still referenced
libusb: warning [libusb_exit] device 1.1 still referenced
libusb: warning [libusb_exit] device 4.3 still referenced
libusb: warning [libusb_exit] device 4.2 still referenced
libusb: warning [libusb_exit] device 4.1 still referenced
libusb: warning [libusb_exit] device 3.2 still referenced
libusb: warning [libusb_exit] device 3.1 still referenced

And if I either put a sleep in there

uuu -m 3:4 SDP: boot -f <pathtofile> && sleep 0.5 && uuu -V -m 3:4 -T 1 SDPV: delay 1000

or I wait for the specific port to be up again

uuu -m 3:4 SDP: boot -f <pathtofile> && until uuu -lsusb | grep -q 3:4; do sleep 0.1; done && uuu -V -m 3:4 -T 1 SDPV: delay 1000

It work 100% of the time.

This seems like a bug to me, since the message is Wait for Known USB? Shouldn't the command keep going when the device is available, even if the first command made it disappear and pop up again?

If I go to another terminal while the command is running and I run uuu -lsusb there the device is present, so there should be a known device available.

Running libuuu_1.5.233-0-g79ce7d2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions