In your App Inventor code you need to add:
otherwise your StringsReceived block will never receive anything.
RegisterForStrings
– Registers to receive updates when one or more null-terminated strings from a connected BluetoothLE device are changed. Service Unique ID and Characteristic Unique ID are required. Theutf16
parameter indicates whether the content should be decoded as UTF-16 (true) or UTF-8 (false) code points when converting to App Inventor strings. Whenever a change is received, theStringsReceived
event will be run.Parameters:
RequestMTU
– Requests a new minimum transmission unit (MUT) for the BluetoothLE connection. This feature is only supported when both devices support Bluetooth 4.2 or higher. If the MTU is changed successfully, the MTUChanged event will be run. The default MTU is 20.This block is intended for advanced apps that need to change the size of the messages sent between the BLE devices. Most developers will not need to adjust this value.
Parameters:
bytes
(number) — The desired MTU size.