BLE "Could not get config descriptor" error

Ask, and ye shall receive.
nogray1
Posts: 3
Joined: 04:59, 10 Jun 2016

BLE "Could not get config descriptor" error

Postby nogray1 » 06:48, 10 Jun 2016

Hi,
I've built an app using the Bluno Example on the Evothings Studio and it works great on iPhone viewer. However, I ran into issues trying to run the default bluno sample on two android tablets. Here is the steps to recreate the error

I used two new tablets, Amazon Fire HD 6" and RCA Voyager II.

Both running android 5 and support Bluetooth 4 with LE support (GattService is running). I couldn't install the Official Viewer on the RCA because it shows the app is not compatible and the app is not in the amazon store.

I downloaded the viewer version 1.4.0 from github, built it with cordova and installed it in both tablets via adb.

The app will connected to the bluno ble, but it fails when it tries to enable notification. The default app looks like it's working, but the error will be in the log and the app won't send or receive data.

I edited the BLE java to show all the descriptors using characteristic.getDescriptors() but it only returns "00002901-0000-1000-8000-00805f9b34fb" (not 0x2902)

After two days trying different approaches to get the app to work on the tablets, I ran out of ideas and don't know what else to do. If these tables do not support the BLE plugin, can you suggest a tablet so we can run further testing.

Thanks for you help with this matter and thanks for Evothings Studio and Viewer. They do make development a lot easier and faster.

nogray1
Posts: 3
Joined: 04:59, 10 Jun 2016

Re: BLE "Could not get config descriptor" error

Postby nogray1 » 06:07, 15 Jun 2016

According to http://www.dfrobot.com/forum/viewtopic.php?f=18&t=2035 bluno does not expose the x2902 because it's always enabled. To fix the issue with the plugin, I modified the Java file so it doesn't cause an error because of the missing descriptor.

This works and now the app receives the notifications, but now another issue came up. This is only tested in an Amazon Fire HD tablet so far (I'll test on a different tablet shortly).

Before enabling or disabling the notifications, writeCharacteristic works (data received by the bluno board)

After enabling or disabling the notifications, writeCharacteristic no longer works and does not fire the win or fail functions. Bluno does not receive the data either.

nogray1
Posts: 3
Joined: 04:59, 10 Jun 2016

Re: BLE "Could not get config descriptor" error

Postby nogray1 » 23:30, 16 Jun 2016

All the android tablets I have could not write data once the notifications were enabled. It seems that only the first request (either write or enable notification) works and nothing else work after that. I updated the Java file so the writeCharacteristic is not queued and that caused either the write operation to work or the notifiation, but not both.

After a couple of days trying to get this plugin to work and failing. I switch to cordova-plugin-ble-central at https://github.com/don/cordova-plugin-ble-central/ Updated the Java file so it doesn't cause an error for the missing descriptors and rebuilt the viewer. Now everything is working perfectly.


Return to “Questions and answers”

Who is online

Users browsing this forum: No registered users and 2 guests