I have been developing a BLE app and testing it an a Fairphone 6 which now has Android 16
I also have an older Sony Xperia with Android 9
The app is designed to read from and writes to a BLE serial module KT6368A attached to a M0 MCU to send configuration messages.
On the Fairphone 6 all is well
On the Sony Xperia the application crashes when trying to write to BLE.
\i have tested with an initial test application which is an extension of the BLE Example with this sub added:
This works on the Fairphone 6
I have also tested the BLE connection on the Sony Xperia with 'LightBlue' and that works as expected testing the Serial UUID
I can connect to my device and can Write to and Subscribe to service UUID '0000fff1-0000-8000-00805f9b34fb'
Sending the test message gets the expected response from the MCU via serial module KT6368A
Is this behavior on the Sony with Android 9 as expected i.e. this is a limitation of the B4A BLE or have I missed something.
Thanks
Ted Finch
I also have an older Sony Xperia with Android 9
The app is designed to read from and writes to a BLE serial module KT6368A attached to a M0 MCU to send configuration messages.
On the Fairphone 6 all is well
On the Sony Xperia the application crashes when trying to write to BLE.
\i have tested with an initial test application which is an extension of the BLE Example with this sub added:
Sub TestData
pbReadData.Show
'set up data notification
'manager.ReadData2("0000fff0-0000-1000-8000-00805f9b34fb","0000fff1-0000-1000-8000-00805f9b34fb")
Log("SetMTU")
manager.RequestMtu (64)
Log("SetNotify")
manager.SetNotify ("0000fff0-0000-1000-8000-00805f9b34fb","0000fff1-0000-1000-8000-00805f9b34fb", True)
'do initial write to get config data
Dim TextToSend As String = "@" & Chr(13)& Chr(10)
Dim DataToSend() As Byte = TextToSend.GetBytes("UTF8")
Log("Write Data: " & TextToSend )
'SONY crashes here
manager.WriteData( "0000fff0-0000-1000-8000-00805f9b34fb","0000fff1-0000-1000-8000-00805f9b34fb",DataToSend)
pbReadData.Hide
End SubThis works on the Fairphone 6
I have also tested the BLE connection on the Sony Xperia with 'LightBlue' and that works as expected testing the Serial UUID
I can connect to my device and can Write to and Subscribe to service UUID '0000fff1-0000-8000-00805f9b34fb'
Sending the test message gets the expected response from the MCU via serial module KT6368A
Is this behavior on the Sony with Android 9 as expected i.e. this is a limitation of the B4A BLE or have I missed something.
Thanks
Ted Finch