Skip to content

Add code for emitting "Propeller Not Found" error message response #28

Closed
@PropGit

Description

@PropGit

This relates to Issue #27 but making specific message issue for this one.

[From an email conversation between @dbetz and @PropGit]

I looked at the Parallax-ESP sources and while there is an error defined for “Propeller Not Found”, there is currently no code that issues this error.

Thanks for confirming that

For serial downloads, a -v error indicates “handshake failed”. I guess that is what should instead display “Propeller Not Found”, right?

Yes, well... keep the "Handshake failed" (for -v) but that's a fail point that should also emit a "Propeller not found" message (regardless of -v).

More specifically, the "Propeller not found" error message should occur at any fatal moment from the point of receiving the Rx Handshake through just after receiving the version number, unless of course, a valid number of bytes is received for version response but it just equates to a different-than-expected version number, in which case it should be reporting that it found "Propeller 1 version #" but also indicate that it can not program that version of Propeller. If no Rx Handshake, or later, version number, is received, or the received data for Rx Handshake is invalid, it should say "Propeller not found" because either nothing's there, or something's there but we don't know what.

For wi-fi downloads it’s a bit more complicated. The handshake is done by the ESP not by the PC and the ESP returns “400 - RX handshake timeout”. Currently, the network code on the PC side does nothing with the strings that come along with “400” errors. In fact, I think every error returned by the WX is “400”. Should we look at all of these to find better mappings to the standard HTTP error codes? I meant to do that a year ago when I was first writing the ESP code but never had the chance. I used “400” as a placeholder until I had time.

Yes, we'll need to distinguish the "RX handshake timeout" from other errors (is there also a "Bad Rx Handshake" and "Version Timeout" and "Bad Version Response" (i.e.: too little or too many bytes received) error message?) and the PropLoader will need to address at least those specific errors so it can display "Propeller Not Found" if that's the case.

I think we can use 400 as a generic failure error (one we don't specifically process a certain way within the loader) and use 401+ for the other specific errors; rather than try to map each case to an existing 4xx error message commonly use by the Internet since there's unlikely to be any that will really match appropriately.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions