Skip to content

Once 'Failed to exit', never able to get in commandMode again #12

Description

@ricdijk

I'm using the library for a temperature sensor of my solar boiler system, it works great, thanks for the good work!

When WiFly::exitCommandMode() does not get 'EXIT\r\n' from the wifly it raises an error (correct) and leaves the variable inCommandMode as it is (= true).
Most probably the wifly did not return 'EXIT\r\n' because it somehow already left command mode.

WiFly::startCommand() first checks 'inCommandmode == true', thinks the wifly is still in commandmode and does not execute a '$$$' command. Because WiFly will not get in command mode, WiFly::exitCommandMode() will never get an 'EXIT\r\n' and doesn't change anything. Even a WiFly::reboot() won't work (because it uses WiFly::startCommand()). The way it is working right now, to me it seems impossible to get out of this situation.

A solution for this might be to assume the wifly is not in command mode when WiFly::exitCommandMode() doesn't get an 'EXIT\r\n'. In that situation still raise an error, but set inCommandMode false anyway.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions