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

wait for DFU device to appear #417

Closed

Conversation

danielkucera
Copy link

No description provided.

@lacklustrlabs
Copy link
Contributor

I have not tested your modification yet, but it might be a good idea to update tools/linux64/maple_upload too

@tfry-git
Copy link
Contributor

Works great for me on Linux. Without this I get one successful upload in a dozen attempts or so (symptoms as in #328), with this, I get reliable uploads.

In addition to linux and linux64, same thing on Mac, I presume.

(But actually, when is linux64 used? I am running this on a 64 bit linux system, and for me, the "linux" code is being used.)

@lacklustrlabs
Copy link
Contributor

I'm not sure there is a preinstalled lsusb under mac, I think i installed mine via homebrew.
(hint: ioreg -p IOUSB -l -w 0)

You will have to make custom changes to platform.txt (or use platform.local.txt) to make use of the linux64 tools. It's not really needed with you have IA32 installed, but some of us actually use the linux64 tools.

@hanyazou
Copy link
Contributor

The dfu_util itself have that function. Please see PR #297 and patch 1902867

Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion to better print progress

while ! lsusb | grep -i ${usbID}
do
sleep 1
echo "."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest doing echo -n . instead, i.e. remove the newline. Also, add an empty echo after done, so it will look like this:

Waiting for device in DFU mode .........

@@ -28,6 +28,12 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

"${DIR}/upload-reset" ${dummy_port_fullpath} 750

echo "Waiting for device in DFU mode"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add -n flag to echo (see below)

do
sleep 1
echo "."
done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add an empty echo (will print a newline) after done

@danielkucera
Copy link
Author

closing in favour of #297

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

Successfully merging this pull request may close these issues.

5 participants