Application Program Interface (API)
This chapter is NOT intended for photographers in general, but for engineers who want to build custom applications or devices which communicate with a Metabones Speed Booster or Smart Adapter through the micro USB port (if equipped). (Or for the photographer-engineer, we know.)
You may query the status and the metadata of the lens, such as focal length, focus distance (requires lens support), aperture, zoom range, lens name, etc. via USB. You may use macOS, Windows, Linux, Android and possibly other operating systems (but not iOS, for lack of USB-OTG support). You may program in C, Python, Java and possibly other languages.
The Metabones API is nothing more than the amalgamation of its two underlying technologies: Cooke Optics' /i Technology and HID-class serial communication.
For quick start, use YAT by Matthias Kläs on Windows or USB HID Terminal by Ihor Lavryniuk on Android. The following instructions are for YAT on Windows but Android is similar. Initiate a new connection, choose the USB Ser/HID protocol and find the Metabones Speed Booster or Smart Adapter already connected to your computer in the HID Device drop down list. Start sending /i Technology commands according to Cooke's documentation. Every command shall be terminated by a carriage return which is \r (blackslash r) in YAT. Every session shall begin with the N\r command. You may then use the C\r command to continuously monitor the status of the lens.
To program in C on OSX, Windows and Linux, use HIDAPI by Signal 11 Software. For Python, you may install the hidapi package, which is the Cython wrapper of the C hidapi library. There is no known standard library for HID-class serial communication on Android. You will have to make your own on top of Android USB Host support.
We recommend using one of our MFT products for your custom device because they are capable of powering the lens from the USB port (except for the discontinued Speed Booster S product). Be forewarned, however, that most lenses draw transient current in excess of 500mA and they will be operating outside of USB specifications. Prolonged use may cause your computer to malfunction.
Our E-mount products always power the lens from the camera body. The E-mount camera must be on for the Metabones API to operate.
The camera, if used, must have the sleep function disabled because if the camera goes to sleep the USB connection will be severed. It can only be reestablished by unplugging the USB, waking up the camera and connecting USB again.