The "src" contains the code for an ESP32-IDF based intervalometer.
There are 4 services in a Canon camera, which can be used to control it:
- 00010000-0000-1000-0000-d8492fffa821: Used for pairing.
-
- 00010005-0000-1000-0000-d8492fffa821: Unknown
-
- 00010006-0000-1000-0000-d8492fffa821: Pairing commands.
-
- 0001000a-0000-1000-0000-d8492fffa821: Pairing data.
-
- 0001000b-0000-1000-0000-d8492fffa821: Unknown
- 0002000-0000-1000-0000-d8492fffa821: Unknown. Seems to contain information about the camera.
- 0003000-0000-1000-0000-d8492fffa821: Used for triggering the camera.
-
- 00030010-0000-1000-0000-d8492fffa821: Seems to configure the trigger state notifications.
-
- 00030030-0000-1000-0000-d8492fffa821: Trigger.
-
- 00030031-0000-1000-0000-d8492fffa821: Trigger state notifications.
- 0004000-0000-1000-0000-d8492fffa821: Unknown.
The camera only connects to paired devices so in order to communicate with the camera the pairing process needs to be done first. Also only BLE bonded devices can communicate.
Pairing commands:
- 0x01: Confirm.
- 0x02: Fail.
- 0x03: Set UUID.
- 0x04: Set nickname.
- 0x05: Set type:
-
- Types:
-
- 0x01: iOS
-
- 0x02: Android
-
- 0x03: Remocon
Pairing commands start with the command byte then the data:
- UUID: [ 0x03, 128bits of UUID ]
- Nickname: [ 0x04, ASCII name ]
- Type: [ 0x05, 0x03 ] (Android)
Pairing indication results:
- 0x01: Request (does not seem to be used)
- 0x02: OK
- 0x03: "NG" (?)
The pairing process uses Service 1, the pairing process looks as follows:
- Connect to the camera and find all services and characteristics.
- Send the Set nickname command to the pairing command characteristic with security and bonding enabled, this should fail because the devices are not bonded.
- Wait for the bonding process to finish.
- Send the Set name command again without any security requirements.
- Enable indications for the pairing command characteristic.
- Wait for a callback, if the pairing is accepted continue, otherwise abort.
- Send the Set name command, Set platform command and the Confirm command to the pairing data characteristic.
- The devices are now paired.
After a device is paired with a camera and wants to connect it needs to do the following:
- Connect to the camera and find all services and characteristics.
- Write any characteristic or characteristic descriptor with security, this should fail and initiate the bonding process.
- After the bonding is finished commands can be sent to the camera.
- Write 0x0001 to the trigger characteristic. This triggers the camera.
- Write 0x0002 to the trigger characteristic. This finishes the trigger process and shows the result.
(Tested and works with Canon EOS M50)