Is there a reason that AT commands executed from the Adafruit_BLE base class shouldn't ensure command mode before being executed? I didn't realize that isConnected used an AT command and while in data mode that AT command just ends up going out to what is connected. I can construct a PR with what I'm thinking as a change but I wanted to make sure I'm not missing something.
This is what I ended up doing and it seems to work just fine but I'm using an LE micro so I don't know if there are reasons the UART version shouldn't do this for example:
Roughly I'm thinking you shouldn't need to worry about switching, the library should just do it for you for anything that expects AT commands or executes AT commands under the covers.
Is there a reason that AT commands executed from the Adafruit_BLE base class shouldn't ensure command mode before being executed? I didn't realize that isConnected used an AT command and while in data mode that AT command just ends up going out to what is connected. I can construct a PR with what I'm thinking as a change but I wanted to make sure I'm not missing something.
This is what I ended up doing and it seems to work just fine but I'm using an LE micro so I don't know if there are reasons the UART version shouldn't do this for example:
Roughly I'm thinking you shouldn't need to worry about switching, the library should just do it for you for anything that expects AT commands or executes AT commands under the covers.