Because this has to be in the loop I need to base the call to the bluetooth configuration on the current state of the bluetooth bee - and that's where "+BTSTA:xx" comes in. It's supposed to return the current state of the Bee as a two digit pair.
Code: Select all
\r\n+BTSTA:xx\r\n xx status: 0, Initializing 1, Ready 2, Inquiring 3, Connecting 4, Connected
I'm trying to write code that looks at the state of the BT bee and if it's not connected and / or not ready then initialize it. This is on the theory that even inside the loop the state of the external device will allow conditional logic to work - (insert laughter here)
So, why does "+BTSTA:xx" only ever return 13 to me when the LEDs on the BT Bee clearly indicate that it's not connecting - that it's ready (inquirable) and not paired (connected)?