Bluetooth GATT BMPCC4k

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Dell640

  • Posts: 3
  • Joined: Thu Jul 11, 2019 1:27 pm
  • Real Name: Peter Marsoun

Bluetooth GATT BMPCC4k

PostThu Jul 11, 2019 1:39 pm

Hey to all.
I'm trying to control the BMPCC 4k camera via bluetooth & Linux (Ubuntu - Bluez).
There is lack of detailed info about bluetooth control from BlackMagic, so methods of try&fail I got camera communicating, however not fully.

I'm able to connect the camera via BLE (gatttool connect) and read characteristics (UUIDs).
After that I'm able to read some of them, like Camera type / manufacturer. However some of them can not be read:
"Error: Characteristic value/descriptor read failed: Attribute can't be read"
Camera and computer are not paired, because GATTTOOL does not provide any pairing methods.
Bluetoothctl is not able to pair the camera properly unfortunately.

Must be camera paired to read all GATT UUIDs?
Must i write something to the camera to make it work?
Or what I'm missing?



^Croot@Alterum:~# gatttool -b D0:CF:5E:38:40:A0 -I
[D0:CF:5E:38:40:A0][LE]> connect
Attempting to connect to D0:CF:5E:38:40:A0
Connection successful
[D0:CF:5E:38:40:A0][LE]> characteristics
handle: 0x0002, char properties: 0x02, char value handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0004, char properties: 0x02, char value handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x0007, char properties: 0x02, char value handle: 0x0008, uuid: 00002a29-0000-1000-8000-00805f9b34fb
handle: 0x0009, char properties: 0x02, char value handle: 0x000a, uuid: 00002a24-0000-1000-8000-00805f9b34fb
handle: 0x000c, char properties: 0x08, char value handle: 0x000d, uuid: 5dd3465f-1aee-4299-8493-d2eca2f8e1bb
handle: 0x000e, char properties: 0x20, char value handle: 0x000f, uuid: b864e140-76a0-416a-bf30-5876504537d9
handle: 0x0011, char properties: 0x10, char value handle: 0x0012, uuid: 6d8f2110-86f1-41bf-9afb-451d87e976c8
handle: 0x0014, char properties: 0x1a, char value handle: 0x0015, uuid: 7fe8691d-95dc-4fc5-8abd-ca74339b51b9
handle: 0x0017, char properties: 0x08, char value handle: 0x0018, uuid: ffac0c52-c9fb-41a0-b063-cc76282eb89c
handle: 0x0019, char properties: 0x02, char value handle: 0x001a, uuid: 8f1fd018-b508-456f-8f82-3d392bee2706
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x0019
Characteristic value/descriptor: 02 1a 00 06 27 ee 2b 39 3d 82 8f 6f 45 08 b5 18 d0 1f 8f
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x0019
Characteristic value/descriptor: 02 1a 00 06 27 ee 2b 39 3d 82 8f 6f 45 08 b5 18 d0 1f 8f
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x0019
Characteristic value/descriptor: 02 1a 00 06 27 ee 2b 39 3d 82 8f 6f 45 08 b5 18 d0 1f 8f
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x0019
Characteristic value/descriptor: 02 1a 00 06 27 ee 2b 39 3d 82 8f 6f 45 08 b5 18 d0 1f 8f
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x0019
Characteristic value/descriptor: 02 1a 00 06 27 ee 2b 39 3d 82 8f 6f 45 08 b5 18 d0 1f 8f
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x0010
Characteristic value/descriptor: 00 00
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000f
Error: Characteristic value/descriptor read failed: Attribute can't be read
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000f
Error: Characteristic value/descriptor read failed: Attribute can't be read
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000e
Characteristic value/descriptor: 20 0f 00 d9 37 45 50 76 58 30 bf 6a 41 a0 76 40 e1 64 b8
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000e
Characteristic value/descriptor: 20 0f 00 d9 37 45 50 76 58 30 bf 6a 41 a0 76 40 e1 64 b8
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000e
Characteristic value/descriptor: 20 0f 00 d9 37 45 50 76 58 30 bf 6a 41 a0 76 40 e1 64 b8
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x0002
Characteristic value/descriptor: 02 03 00 00 2a
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000d
Error: Characteristic value/descriptor read failed: Attribute can't be read
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000c
Characteristic value/descriptor: 08 0d 00 bb e1 f8 a2 ec d2 93 84 99 42 ee 1a 5f 46 d3 5d
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000c
Characteristic value/descriptor: 08 0d 00 bb e1 f8 a2 ec d2 93 84 99 42 ee 1a 5f 46 d3 5d
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000d
Error: Characteristic value/descriptor read failed: Attribute can't be read
[D0:CF:5E:38:40:A0][LE]> sec-level high
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000d
Error: Characteristic value/descriptor read failed: Attribute can't be read
[D0:CF:5E:38:40:A0][LE]> sec-level medium
[D0:CF:5E:38:40:A0][LE]> char-read-hnd 0x000d
Error: Characteristic value/descriptor read failed: Attribute can't be read
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 217
  • Joined: Mon Sep 04, 2017 4:05 am

Re: Bluetooth GATT BMPCC4k

PostMon Jul 15, 2019 2:28 am

Hi Peter,

The characteristics you are trying to read are encrypted and can only be accessed once the device has been successfully paired. Please review the Blackmagic Bluetooth Camera Control specification for a list of encrypted and non-encrypted characteristics and their UUIDs to determine which can be accessed without pairing.

https://www.blackmagicdesign.com/develo ... uct/camera
- Download PDF - Blackmagic Camera Control

Regards
Cameron
Offline

Firedan1176

  • Posts: 5
  • Joined: Tue Dec 04, 2018 4:24 am
  • Real Name: Daniel Moore

Re: Bluetooth GATT BMPCC4k

PostThu Jul 18, 2019 2:51 pm

Yes only some of the characteristics can be read without pairing. To pair, you must poll the device name characteristic which will trigger the bonding process on the camera and cause the pairing device to ask for the PIN number displayed on the camera. After that, you can then read the characteristics on the other services that are encrypted.

Send your device's name to this characteristic:
Device Name
UUID: FFAC0C52-C9FB-41A0-B063-CC76282EB89C
Send a device name to the camera (max. 32 characters).The camera will display this name in the Bluetooth Setup Menu
Offline

Dell640

  • Posts: 3
  • Joined: Thu Jul 11, 2019 1:27 pm
  • Real Name: Peter Marsoun

Re: Bluetooth GATT BMPCC4k

PostFri Aug 02, 2019 8:27 am

Thanks to both of you, guys.

My problem was a malfunction of pairing with camera. Bluez accepted pairing as successful however camera doesn't, that confused me, camera, everybody.

I can change camera settings by writing to CONTROL UUID, that works fine.
I can also read status updates (subscribed for notification) from STATUS UUID 7FE8691D-95DC-4FC5-8ABD-CA74339B51B9, this UUID is updated when some parameter is changed in the camera or by myself by writing to control UUID.

But, "incremental" control seems not working for some command IDs
If I write this packet, camera sets iso to 100 (that works as expected):
"0xff 0x08 0x00 0x00 0x01 0x0e 0x03 0x00 0x64 0x00 0x00 0x00"

But, I if i want to increment ISO by 100, it does not work:
"0xff 0x08 0x00 0x00 0x01 0x0e 0x03 0x01 0x64 0x00 0x00 0x00"
This packet will also set always ISO to 100.
Is stepping supported on BMPCC4k?

And lastly, is there a way to receive a list of available candidates, for example, list of available ISOs which camera "can use"?

Response to any part will be much appreciated, documentation is not well made by BM in this part.
Offline
User avatar

insorior

  • Posts: 5
  • Joined: Thu Sep 05, 2019 7:30 am
  • Location: Europe
  • Real Name: Vincent Monteil

Re: Bluetooth GATT BMPCC4k

PostThu Sep 05, 2019 8:39 am

Dell640 wrote:Thanks to both of you, guys.

My problem was a malfunction of pairing with camera. Bluez accepted pairing as successful however camera doesn't, that confused me, camera, everybody.

I can change camera settings by writing to CONTROL UUID, that works fine.
I can also read status updates (subscribed for notification) from STATUS UUID 7FE8691D-95DC-4FC5-8ABD-CA74339B51B9, this UUID is updated when some parameter is changed in the camera or by myself by writing to control UUID.

But, "incremental" control seems not working for some command IDs
If I write this packet, camera sets iso to 100 (that works as expected):
"0xff 0x08 0x00 0x00 0x01 0x0e 0x03 0x00 0x64 0x00 0x00 0x00"

But, I if i want to increment ISO by 100, it does not work:
"0xff 0x08 0x00 0x00 0x01 0x0e 0x03 0x01 0x64 0x00 0x00 0x00"
This packet will also set always ISO to 100.
Is stepping supported on BMPCC4k?

And lastly, is there a way to receive a list of available candidates, for example, list of available ISOs which camera "can use"?

Response to any part will be much appreciated, documentation is not well made by BM in this part.




Hi ! I am facing a very similar problem as yours.
I am connected to the camera via bluetooth, but can only access the non encrypted services... no way to get the camera to ask me for the code, when I try to write to encrypted services it will just loop and eventually fail...

I both tried with bluetoothctl and gatttool :
Connect
Select service / characteristic
Read constructor name (works fine)
Write (for instance iso to 100 or turn camera on)

(Just those commands, nothing more, and I’m pretty sure that I’m missing something somewhere that is essential and obvious just not to me)

Would you mind explaining how you did solve this question ?
This is for a fully DIY and personal project. Honestly if you could share the commands I would be very very grateful haha!

Thanks very much in advance !
Vincent

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 8 guests