Open JelzDalman opened 7 years ago
I've found a solution for the send function on iOS
void sendChar(char theChar) { Serial.print("Sending: "); Serial.println(theChar); if (theChar == 0x28) { ble.print("AT+BLEKEYBOARDCODE="); ble.println("00-00-28-00-00");
if ( ble.waitForOK() )
{
Serial.println( F("OK!") );
} else
{
Serial.println( F("FAILED!") );
// Failed, probably pairing is not complete yet
Serial.println( F("Please make sure Bluefruit is paired and try again") );
}
ble.print("AT+BLEKEYBOARDCODE=");
ble.println("00-00");
} else { ble.print("AT+BleKeyboard="); ble.println(theChar); // wait for feedback if ( ble.waitForOK() ) { Serial.println("OK!"); } else { Serial.println("FAILED!"); } } }
Great! Thanks Mark. So now we can send messages from iOS and Android. Android users, make sure you check out Mark's code before going the mouse click path - it is much neater - it didn't work for my HTC M8 with Google Messages but other phones from other manufacturers may work.
Scott.
Sick thank you!
I couldn't find a way to do this via HID key codes or control characters. I have a solution for Android that uses mouse movement and clicks - see the example code. Doesn't work in iOS because mouse movements are ignored here. There may be a solution for iOS using Accessibility - Switch Control.