So I am working through with the example with the link below and I am getting the following:
Searching for devices
Sears Demo, 00:07:80:68:91:6F
Discovering services.
main_ble_connected (B4A line: 156)
managerBLE.ReadCharacteristic(c) HERE IS THE ERROR
java.lang.RuntimeException: Object should first be initialized (BleCharacteristic).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:46)
at anywheresoftware.b4a.objects.BleManager.ReadCharacteristic(BleManager.java:93)
at b4a.searsdemo.main._ble_connected(main.java:437)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.BA$3.run(BA.java:307)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
It looks like I am not able to get characteristics.
Sub BLE_Connected (Services AsMap)
cs.Initialize
Dim s AsBleService = Services.GetValueAt(0)
'Read the manufacturer characteristic
Dim c As BleCharacteristic = s.GetCharacteristics.Get("a32bdfa7-9952-4e54-8d5b-44b7be5fbba5")
managerBLE.ReadCharacteristic(c)
End Sub
Searching for devices
Sears Demo, 00:07:80:68:91:6F
Discovering services.
main_ble_connected (B4A line: 156)
managerBLE.ReadCharacteristic(c) HERE IS THE ERROR
java.lang.RuntimeException: Object should first be initialized (BleCharacteristic).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:46)
at anywheresoftware.b4a.objects.BleManager.ReadCharacteristic(BleManager.java:93)
at b4a.searsdemo.main._ble_connected(main.java:437)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.BA$3.run(BA.java:307)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
It looks like I am not able to get characteristics.
Sub BLE_Connected (Services AsMap)
cs.Initialize
Dim s AsBleService = Services.GetValueAt(0)
'Read the manufacturer characteristic
Dim c As BleCharacteristic = s.GetCharacteristics.Get("a32bdfa7-9952-4e54-8d5b-44b7be5fbba5")
managerBLE.ReadCharacteristic(c)
End Sub