move parse_hex function away from the global context
add initialization timeout for flash on connect, rework functionality so each new detected port can trigger flashing sequence