๐ŸŽ๐Ÿ“ฌโ„๏ธ๐Ÿ“ฆ Holiday Shipping Deadlines are approaching! International customers and domestic ground - get your orders in 12/9/2020 ๐Ÿ“ฆโ„๏ธ๐Ÿ“ฌ๐ŸŽ
0

HELP: Where to find BLE Central expertise?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

HELP: Where to find BLE Central expertise?

by twrackers on Mon Sep 07, 2020 10:07 pm

I've been trying for weeks to get the ItsyBitsy nRF52840 (https://www.adafruit.com/product/4481) set up as a BLE Central either with the Arduino IDE or with CIrcuitPython, to respond to Bluetooth remote camera shutter fobs, usually used with mobile phones to trigger the camera app. I have had zero success getting my code to respond to the fobs. They appear to be HID Keyboard devices, and apparently send "Volume Up" or "Enter + Volume Up", depending whether you press the iOS or Android button. My codes can see the fob is there, and can read the fob's BLE information, but nothing I do will catch a NOTIFY from the button presses.

Where can I find someone with expertise in working with such devices? None of the example codes I can find cover the case of programming a BLE Central to read an HID Keyboard. Plenty of examples to mimic a keyboard, but not how to read from one.

twrackers
 
Posts: 100
Joined: Fri Jan 18, 2013 7:42 pm

Re: HELP: Where to find BLE Central expertise?

by hathach on Tue Sep 08, 2020 2:07 am

Here is the example but it is more complicated than prph. You will need to spend decent time to get it sorted

https://github.com/adafruit/Adafruit_nR ... entral_hid

hathach
 
Posts: 1137
Joined: Tue Apr 23, 2013 1:02 am

Re: HELP: Where to find BLE Central expertise?

by twrackers on Tue Sep 08, 2020 8:00 pm

Here is the example but it is more complicated than prph. You will need to spend decent time to get it sorted

https://github.com/adafruit/Adafruit_nRF52_Arduino/tree/master/libraries/Bluefruit52Lib/examples/Central/central_hid


I've been using that example, it doesn't work with POLLING set to zero or non-zero. And the hid.discover() line always returns false. I've been fighting with that very example for two weeks now and have made no progress. That's why I'm trying to find someone who has actual BLE Central experience who might give me a clue as to where the issue is between the BLE fob and the Itsy BLE board.

What I'm afraid of is that what I'm trying to do is a corner case and the Arduino/Adafruit BLE libraries won' do what I need. And I think the equivalent CircuitPython modules support even less, I had no luck there either. (I have two of the Itsy's, one set for Arduino IDE and the other for CircuitPython so I can try both ways.)

twrackers
 
Posts: 100
Joined: Fri Jan 18, 2013 7:42 pm

Re: HELP: Where to find BLE Central expertise?

by hathach on Wed Sep 09, 2020 12:28 am

I has been awhile since I wrote that central_hid example, it is intended to work with boot keyboard/boot mouse profile, and can be used to connect to the peripheral example such as hid_keyscan/hid_camerashutter. Currently I don't have time to work on this example again, however if you are willing to do the coding, I could help you out.
1. First, I would suggest you try to run one of the nrf as hid_camerashutter since it is similar to what you are trying to do. Just to verify the central_hid does work out. Note: however your consumer keyfob can implement composite hid and therefore need extra tweak to get it work.
2. hid.discover() line always returns false you need to do more than this. You should investigate why and where the discover() return false, i.e is there any missing char/service that the function expect. For this you may want to get the full gatt table of your device. This can be done easily by using nrfConnect on the mobile and do a full discovery there. e.g

Image

3. You should run the sketch with DEBUG LEVEL set to 2 in the IDE, it will print out the discovery and other BLE information that can be useful for troubleshooting.

hathach
 
Posts: 1137
Joined: Tue Apr 23, 2013 1:02 am

Re: HELP: Where to find BLE Central expertise?

by Samou on Sat Sep 19, 2020 4:29 pm

Hello;

I bought a NRF52832 Bluefruit Feathethis is an exemple for wath i resevedr card to send data from a sensor to my phone,
I have a question about the Bluetooth transminion, I read the article (https://punchthrough.com/maximizing-ble ... d-android /) I understood that I am limited by the connection interval with my iphone at 30 [ms], so i decided to change to an android for arrived at 7.5 [ms], but when i tested them with an android samsung i still 30 [ms] the same connection interval of an iphone ?? I do not know how?

I also have another problem with the repetition of the same time data 2 to 4 times with other measurement data.


this is an example of what i receive with my phone (iphone 8)
i have this data :
15:49:38.381,RX,"414.84"
15:49:38.381,RX,"414.84"

15:49:38.382,RX,"407.81"
15:49:38.382,RX,"414.84"
15:49:38.383,RX,"411.33"
15:49:38.411,RX,"411.33"
15:49:38.412,RX,"407.81"
15:49:38.412,RX,"411.33"
15:49:38.412,RX,"414.84"
15:49:38.440,RX,"411.33"
15:49:38.441,RX,"414.84"
15:49:38.441,RX,"411.33"
15:49:38.442,RX,"414.84"
15:49:38.442,RX,"411.33"
15:49:38.443,RX,"407.81"
15:49:38.470,RX,"414.84"
15:49:38.471,RX,"411.33"
15:49:38.471,RX,"411.33"
15:49:38.472,RX,"414.84"
15:49:38.473,RX,"418.36"
15:49:38.501,RX,"414.84"
15:49:38.501,RX,"414.84"
15:49:38.501,RX,"414.84"
15:49:38.502,RX,"414.84"
15:49:38.502,RX,"414.84"
15:49:38.531,RX,"414.84"
15:49:38.531,RX,"411.33"
15:49:38.531,RX,"411.33"
15:49:38.532,RX,"411.33"
15:49:38.533,RX,"414.84"
15:49:38.561,RX,"421.88"
15:49:38.561,RX,"411.33"

Samou
 
Posts: 25
Joined: Thu May 07, 2020 12:19 pm

Re: HELP: Where to find BLE Central expertise?

by twrackers on Mon Oct 05, 2020 9:29 pm

Samou,

You should post your question as a new thread, it's not really related to the subject of this thread.

twrackers
 
Posts: 100
Joined: Fri Jan 18, 2013 7:42 pm

Please be positive and constructive with your questions and comments.