parallaxinc / PropLoader

Parallax Propeller loader supporting both serial and wifi downloads
MIT License
27 stars 13 forks source link

Decrease timeout when "Loading second-stage loader" #13

Closed PropGit closed 8 years ago

PropGit commented 8 years ago

If a problem occurs while loading second-stage loader that prevents a response, the timeout is unreasonable long; about 10 seconds.

Loading 'LargeSpinCodePABWX.binary'
Loading second-stage loader     <-- Delays a long time here
error: receive response failed
error: load request failed
error: load failed: -1

This timeout can safely be lowered to 2.5 seconds because there is no chance at recovery beyond that.

dbetz commented 8 years ago

I'll have to try this. The code says that the timeout is 2 seconds. I'm not sure why it would be as long as 10 seconds. My guess is it isn't aborting when it receives the timeout.

dbetz commented 8 years ago

Are you using the most recent version of proploader? I just looked and the error message you should get from proploader if it can't sync with the second-stage loader looks like this:

error: second-stage loader failed to start - cnt %d, packetID %d, result %d

Admitedly, there is too much debugging information there. Before we release this, we should make a pass through to see what messages we really want. There are lots of progress messages I put in so that I could figure out where things were hanging up that may be too verbose for a product.

PropGit commented 8 years ago

Agreed, that would be great.

No, it's not the latest. I'll update them now.

dbetz commented 8 years ago

This is done.