S Steve-h Member Jan 1, 2022 #1 The data sheet for the module I am trying to communicate with tells me the service UUID is :- 49535343-FE7D-4AE5-8FA9-9FAFD205E455 and the Characteristic UUID for write without response is :- 49535343-8841-43F4-A8D4-ECBE34729BB3 It is not clear to me how I use those UUID. Plainly this is wrong, but if I try this understandably it crashes. B4X: WriteData(49535343-FE7D-4AE5-8FA9-9FAFD205E455, 49535343-8841-43F4-A8D4-ECBE34729BB3(1)) I really don't understand what I am doing here, please can someone give me a clue how I can send just 1 character to the remote BLE device.
The data sheet for the module I am trying to communicate with tells me the service UUID is :- 49535343-FE7D-4AE5-8FA9-9FAFD205E455 and the Characteristic UUID for write without response is :- 49535343-8841-43F4-A8D4-ECBE34729BB3 It is not clear to me how I use those UUID. Plainly this is wrong, but if I try this understandably it crashes. B4X: WriteData(49535343-FE7D-4AE5-8FA9-9FAFD205E455, 49535343-8841-43F4-A8D4-ECBE34729BB3(1)) I really don't understand what I am doing here, please can someone give me a clue how I can send just 1 character to the remote BLE device.
f0raster0 Well-Known Member Licensed User Longtime User Jan 2, 2022 #2 to write try some way like that WriteData("6e400001-b5a3-f393-e0a9-e50e24dcca9e", "6e400002-b5a3-f393-e0a9-e50e24dcca9e", Array As Byte(1)) Upvote 0
to write try some way like that WriteData("6e400001-b5a3-f393-e0a9-e50e24dcca9e", "6e400002-b5a3-f393-e0a9-e50e24dcca9e", Array As Byte(1))
toby Well-Known Member Licensed User Longtime User Jan 2, 2022 #3 Try the example firstThread '[B4X] BLE 2 - Bluetooth Low Energy' https://www.b4x.com/android/forum/threads/b4x-ble-2-bluetooth-low-energy.59937/ Upvote 0
Try the example firstThread '[B4X] BLE 2 - Bluetooth Low Energy' https://www.b4x.com/android/forum/threads/b4x-ble-2-bluetooth-low-energy.59937/
S Steve-h Member Jan 2, 2022 #4 f0raster0 said: to write try some way like that WriteData("6e400001-b5a3-f393-e0a9-e50e24dcca9e", "6e400002-b5a3-f393-e0a9-e50e24dcca9e", Array As Byte(1)) Click to expand... Thank you. It was the “Array as byte” I was missing. Upvote 0
f0raster0 said: to write try some way like that WriteData("6e400001-b5a3-f393-e0a9-e50e24dcca9e", "6e400002-b5a3-f393-e0a9-e50e24dcca9e", Array As Byte(1)) Click to expand... Thank you. It was the “Array as byte” I was missing.