Erel B4X founder Staff member Licensed User Longtime User Jan 25, 2015 #121 This means that the internal onConnectionStateChange event never fires as it should be. As I wrote in the first post BLE in its current state is problematic. If you are using USB debugging then it is worth checking the unfiltered logs.
This means that the internal onConnectionStateChange event never fires as it should be. As I wrote in the first post BLE in its current state is problematic. If you are using USB debugging then it is worth checking the unfiltered logs.
B bioident Member Licensed User Longtime User Jan 25, 2015 #122 I tested few comercial program and BLE work stable on Android 4.4.2 On my phone and the same version. Something must be wrong in this implementation on B4A. Or I have not good implementation. Please send to me work project BLE- example code
I tested few comercial program and BLE work stable on Android 4.4.2 On my phone and the same version. Something must be wrong in this implementation on B4A. Or I have not good implementation. Please send to me work project BLE- example code
Erel B4X founder Staff member Licensed User Longtime User Jan 25, 2015 #123 Try the code in the first post.
B bioident Member Licensed User Longtime User Jan 25, 2015 #124 Erel said: Try the code in the first post. Click to expand... I used it. Don't call Sub BLE_Connected and BLE_CharacteristicRead. Could You share project of it ?
Erel said: Try the code in the first post. Click to expand... I used it. Don't call Sub BLE_Connected and BLE_CharacteristicRead. Could You share project of it ?
Erel B4X founder Staff member Licensed User Longtime User Jan 26, 2015 #125 This project works here. Attachments 1.zip 1.zip 11.8 KB · Views: 635
B bioident Member Licensed User Longtime User Jan 27, 2015 #126 Erel said: This project works here. Click to expand... This project is no work. Can be a problem with patch ? I use B4A 4.0 Path: JAVA: version jdk1.8.0_25 ANDROID: version 19 Maybe not correct version. In manifest target is 19
Erel said: This project works here. Click to expand... This project is no work. Can be a problem with patch ? I use B4A 4.0 Path: JAVA: version jdk1.8.0_25 ANDROID: version 19 Maybe not correct version. In manifest target is 19
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2015 #127 In which way it doesn't work?
B bioident Member Licensed User Longtime User Jan 27, 2015 #128 Erel said: In which way it doesn't work? Click to expand... The same problem. Only search. But without connect and read charateristic
Erel said: In which way it doesn't work? Click to expand... The same problem. Only search. But without connect and read charateristic
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2015 #129 A low level API is failing on your device (gatt.discoverServices never completes). I don't see any workaround for this.
A low level API is failing on your device (gatt.discoverServices never completes). I don't see any workaround for this.
B bioident Member Licensed User Longtime User Jan 27, 2015 #130 Erel said: A low level API is failing on your device (gatt.discoverServices never completes). I don't see any workaround for this. Click to expand... If I connect few times I get discoverServices
Erel said: A low level API is failing on your device (gatt.discoverServices never completes). I don't see any workaround for this. Click to expand... If I connect few times I get discoverServices
B bioident Member Licensed User Longtime User Jan 28, 2015 #131 bioident said: If I connect few times I get discoverServices Click to expand... Another application from shop PLAY work perfect . Why I can't use BLE and B4A without problem ? PLEASE HELPS EREL
bioident said: If I connect few times I get discoverServices Click to expand... Another application from shop PLAY work perfect . Why I can't use BLE and B4A without problem ? PLEASE HELPS EREL
Erel B4X founder Staff member Licensed User Longtime User Jan 29, 2015 #132 The BLE library is implemented based on Google documentation. It does work on most devices. If the native callback method is not working then I don't see any workaround. Does the other app actually connect to the BLE device?
The BLE library is implemented based on Google documentation. It does work on most devices. If the native callback method is not working then I don't see any workaround. Does the other app actually connect to the BLE device?
B bioident Member Licensed User Longtime User Mar 11, 2015 #133 Erel said: The BLE library is implemented based on Google documentation. It does work on most devices. If the native callback method is not working then I don't see any workaround. Does the other app actually connect to the BLE device? Click to expand... Yes, I have another application connect to BLE devices.
Erel said: The BLE library is implemented based on Google documentation. It does work on most devices. If the native callback method is not working then I don't see any workaround. Does the other app actually connect to the BLE device? Click to expand... Yes, I have another application connect to BLE devices.
Thuong Member Licensed User Longtime User Jun 12, 2015 #134 Dear My Characteristic has array of hex byte. How can I receive to array variable? Thank
Erel B4X founder Staff member Licensed User Longtime User Jun 12, 2015 #135 Characteristic.GetValue will return an array of bytes.
Thuong Member Licensed User Longtime User Jun 13, 2015 #136 Thank Erel Can you write a example code of Characteristic.GetValue
Erel B4X founder Staff member Licensed User Longtime User Jun 14, 2015 #137 This method just returns an array of bytes: Code: Dim data() As Byte = Char1.GetValue
Thuong Member Licensed User Longtime User Jun 14, 2015 #138 Thank Erel with your code, I ready solved my problem
Thuong Member Licensed User Longtime User Jun 15, 2015 #139 Erel said: You can do something like: Code: Sub BLE_Connected (Services As Map) For Each s As BleService In Services.Values For Each key As String In s.GetCharacteristics Log(key) Dim c As BleCharacteristic = s.GetCharacteristics.Get(key) Next Next Click to expand... Dear Erel I used this code, but log display null (nothing service found) although with BLE Scanner software from google play indicate more services Thank
Erel said: You can do something like: Code: Sub BLE_Connected (Services As Map) For Each s As BleService In Services.Values For Each key As String In s.GetCharacteristics Log(key) Dim c As BleCharacteristic = s.GetCharacteristics.Get(key) Next Next Click to expand... Dear Erel I used this code, but log display null (nothing service found) although with BLE Scanner software from google play indicate more services Thank
Erel B4X founder Staff member Licensed User Longtime User Jun 15, 2015 #140 What is the output of Log("Services = " & Services)?