Hi, Domingo,
I had already seen that GitHub repository, which doesn't seem to focus on a Bluetooth connection like the one I am describing here. I am not sure whether Tilta has changed its communication protocol since
err4o4 first attempted to reverse-engineer the Nucleus-Nano, a couple of years ago, or the commands the Nucleus-Nano transmits via a wired connection are structured differently than the ones it sends via Bluetooth.
In my own Bluetooth test, the data structure is different compared to the one err4o4 describes in their repository. I was able to determine that the commands are sent as 6-byte packets, with the following structure:
NN MM DD DD DD SS where
NN MM are two bytes determining the command,
DD DD DD is the value being sent as a 3-byte big-endian and
SS is the checksum of the 5 preceding bytes.
For example, the record button sends the following commands:
- Code: Select all
C9 00 00 00 00 37 (record off)
C9 00 00 00 01 36 (record on)
while the opposite ends of the wheel position correspond to:
- Code: Select all
01 05 00 00 00 FA (focus near)
01 05 00 27 0F C4 (focus far)
The last byte of each packet is always the checksum of the 5 preceding bytes. That is what conclusively confirms that we are dealing with 6-byte long packets, even when the data is transmitted as a train of 20-byte long data (the maximum data packet BLE allows) because fast movements of the wheel produce a flurry of packets being sent. In that case, we are receiving ten 6-byte packets for every three 20-byte packets. Therefore, the checksum byte is what guarantees we are reading the data correctly.
With the previous assumptions, the ESP32 microcontroller I programmed to read the commands from the Bluetooth connection, translate them according to the Blackmagic Camera Control protocol and send them to the camera works flawlessly as one can see in the latest video I posted.
I cannot speak for a wired connection as my main goal was being able to control the BMPCC from the Nucleus via Bluetooth. In my case, the record/focus commands definitely follow the structure I described above.