Error with UUU -t timeout command, forever waiting for known device to appear

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Error with UUU -t timeout command, forever waiting for known device to appear

3,095件の閲覧回数
Raymond2
Contributor I

Based on the command below, the -t command is working for UUU 1.4.72 version but not for 1.4.139 onwards. May I know if this is a bug or change in usage of -t command?

 

C:\Users\wengng06\Desktop\UUU>uuu_1-4-72.exe -t 0 FB: ucmd echo
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.72-0-g8e9e189

Success 0 Failure 0 Wait for Known USB Device Appear...

Error: Timeout: Wait for USB Device Appear


C:\Users\wengng06\Desktop\UUU>uuu_1-4-139.exe -t 0 FB: ucmd echo
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.139-0-g1a8f760

Success 0 Failure 0 Wait for Known USB Device Appear...

タグ(1)
0 件の賞賛
返信
12 返答(返信)

3,083件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

when you connect board with PC, could you see the board is detected by the PC? I mean could you find the board in the device manager?

0 件の賞賛
返信

3,080件の閲覧回数
Raymond2
Contributor I
What do you mean by bsp version? Currently not connecting to any devices. I wanted to set timeout for waiting for known usb device
0 件の賞賛
返信

3,060件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

ok, I know what you mean, I tested the 1.4.165, if you use uuu to download images, the timeout error would appear,  so if you use UUU download images, and doesn't connect any device, the error message would appear. this is only test uuu -t 0, the same as yours, doesn't have timeout error message

joanxie_0-1671508543981.png

when I use uuu to download images to the board and doesn't connect the board, the error would appear

joanxie_1-1671508701119.png

 

0 件の賞賛
返信

3,053件の閲覧回数
Raymond2
Contributor I
So does this mean that its a bug with UUU? Since -t command should prompt error if unable to wait for known USB device within the time limit.
0 件の賞賛
返信

3,025件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

I don't think this is bug, as I tested and showed, if you try to download images to the board with UUU though you don't connect board, you can find prompt error when you use -t command, pls try again, and I don't think you need waste time here, if you really use uuu to download images to the board, and you don't connect the board, you just use "uuu.exe -t 0 uuu.auto", you can find the error message as you want

0 件の賞賛
返信

3,018件の閲覧回数
Raymond2
Contributor I

I understand that UUU -t command works when trying to download image to the board, but I think you misunderstood my problem. The issue is that -t command should work as long as UUU is waiting for known device to appear, but as you can see from my post, the -t command behaves differently for UUU 1.4.72 and 1.4.139.

The reason I'm wasting time here is just to bring this up and hope this issue is known. I was facing the issue where it was waiting forever for known device to appear.

Just to highlight again the problem, -t command for UUU 1.4.72 and 1.4.139 behaves differently, if it works for download image, does not mean it is working for other scenarios, just like I've shown on this post.

0 件の賞賛
返信

3,015件の閲覧回数
Raymond2
Contributor I
I think if you were able to explain the scenarios below on why UUU 1.4.72 will give timeout error but UUU 1.4.139 did not, then it can help to understand the situation more.

C:\Users\wengng06\Desktop\UUU>uuu_1-4-72.exe -t 0 FB: ucmd echo
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.72-0-g8e9e189

Success 0 Failure 0 Wait for Known USB Device Appear...

Error: Timeout: Wait for USB Device Appear


C:\Users\wengng06\Desktop\UUU>uuu_1-4-139.exe -t 0 FB: ucmd echo
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.139-0-g1a8f760

Success 0 Failure 0 Wait for Known USB Device Appear...
0 件の賞賛
返信

3,012件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

as I mentioned, if I use uuu.exe -t 0 uuu.auto, I can find the error message "Error: Timeout: Wait for USB Device Appear" even I used 1.4.139, could you tell me what you need uuu for ? and how the issue affect you?

0 件の賞賛
返信

2,977件の閲覧回数
Raymond2
Contributor I
You shouldn't think that since "uuu.exe -t 0 uuu.auto" works, it means that there is no issue.

I hope you try to read and understand more about the issue I said. I think to understand more about my issue, you can try "uuu.exe -t 0 FB: ucmd echo" command on both 1.4.72 and 1.4.139 UUU.

UUU has a lot of capabilities, and one of is to use for communication during Fastboot mode. In the situation where user accidentally hit a key to stop autoboot, and it is not able to enter fastboot mode, then it will stuck forever since -t command did not work for "uuu.exe -t 0 FB: ucmd echo". In UUU 1.4.72, it works, so it is able to determine if target has successfully enter fastboot mode.

I really hope you don't repeat your, it works for "uuu.exe -t 0 uuu.auto". I already said, I know it works when you use "uuu.exe -t 0 uuu.auto", but that still doesn't explain the scenario that I have post.
0 件の賞賛
返信

2,966件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

I checked the source code of 1.4.72

if (g_wait_usb_timeout >= 0 && !g_known_device_appeared)
{
if (difftime(time(0), start) >= g_wait_usb_timeout)
{
set_last_err_string("Timeout: Wait for Known USB Device");
return -1;
}
}

the 1.4.139 code is

auto usb_timeout = g_wait_usb_timeout.load();
if (usb_timeout >= 0s && known_device_state == NoKnownDevice)
{
if (usb_timer.is_elapsed(usb_timeout))
{
set_last_err_string("Timeout: Wait for Known USB Device");
return -1;
}
}

the 1.4.139 add

enum KnownDeviceState {
NoKnownDevice,
KnownDeviceToDo,
KnownDeviceDone,
WaitNextKnownDevice,

};

you also can refer to the patch

https://github.com/NXPmicro/mfgtools/pull/268/commits/1be9bba111380685871cdaea2b74bd65acd84b77

my understanding is new uuu tool -t option works for the command which needs device, like download images or boot image from board, then -t works, if the command like FB:xxx which doesn't need any device, the -t doesn't work, I've checked this from internal tools team but I didn't get any response yet

0 件の賞賛
返信

2,953件の閲覧回数
Raymond2
Contributor I
Thanks for the explanation, I understand that now -t behaves differently from previous version. May I know if this is intentional? or is there any workaround when it is stuck at "Timeout: Wait for Known USB Device" for too long.
0 件の賞賛
返信

2,931件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

I checked all of issue report from https://github.com/NXPmicro/mfgtools/issues,

don't find this, I think you can replace the 1.4.139 code by 1.4.72 about -t option code according to the patch I sent to you, since this patch is for -T, but you can find the related file and code according to the patch, the source code you also can download from

"https://github.com/NXPmicro/mfgtools/releases"

 

0 件の賞賛
返信