Understanding basics of remote camera controlling over USB port
Around us, there are many computers available including your laptop, desktop, mobile phones, and mini-computers like RaspberryPi, Arduino, even your home internet routers.
Any of these computers can be used to interact with the camera.
Let's start with understanding existing apps in the market and their working.
DSLR Controller , DSLR Remote Plus , Camoodoo are some of the applications tried and tested with multiple cameras for your reference.
Any of these computers can be used to interact with the camera.
Let's start with understanding existing apps in the market and their working.
There are several apps already available for the Android and iOS platforms which can control most of the digital cameras over wifi, USB, or Bluetooth connectivity.
Some of the good quality apps are listed below to try with your camera and mobile or laptop. This is just to understand how computers can handle different operations on your camera.
DSLR Controller , DSLR Remote Plus , Camoodoo are some of the applications tried and tested with multiple cameras for your reference.
If you see the core of these applications, all are based on PTP (Picture transfer protocol) or PTP2. Most of the new edge digital cameras including simple CC-TV cameras, DSLR, or even the latest Mirrorless cameras support one of these protocols. It is always mentioned there in the camera specification manual.
Programmatically, these PTP Commands can be sent to the camera. Please be aware that, over the internet, there is very little information available around these protocols, but don't worry, in my future posts, I will share ways to understand these protocols with some simple tricks.
So now we know that there is a way to interact with your camera over a USB port. Let's try some hands-on to start with.
In this use case, we will try one existing solution available with a sophisticated mobile APP.
Step 1: Setting up the proxy server on ubuntu
For this particular exercise, we will be using the DSLRDashboard app with dslrdashboardserver.
This is a simple proxy server(TCP & UDP server) with a few lines of C++ code between your computer and the camera which exchanges PTP packets over the network.
As your camera is going to be communicated over the USB port, you need to have 3rd party utility “libusb” installed on the computer.
1) Install all the required dependencies to build the code
4) Make the resulting ddserver binary executable and launch the server
5) Go to syslogs to monitor the activity
That's all!
Now you know that there is a way to control your camera remotely and understanding implementation is also not so difficult.
Programmatically, these PTP Commands can be sent to the camera. Please be aware that, over the internet, there is very little information available around these protocols, but don't worry, in my future posts, I will share ways to understand these protocols with some simple tricks.
So now we know that there is a way to interact with your camera over a USB port. Let's try some hands-on to start with.
In this use case, we will try one existing solution available with a sophisticated mobile APP.
Prerequisites
- OSX, Linux or Windows 64bit laptop/desktop
- DSLR or mirrorless camera
- USB Cable to connect your camera to the computer
- Smartphone with qDslrDashboard App installed
Step 1: Setting up the proxy server on ubuntu
For this particular exercise, we will be using the DSLRDashboard app with dslrdashboardserver.
This is a simple proxy server(TCP & UDP server) with a few lines of C++ code between your computer and the camera which exchanges PTP packets over the network.
As your camera is going to be communicated over the USB port, you need to have 3rd party utility “libusb” installed on the computer.
1) Install all the required dependencies to build the code
2) Clone or download the code from the git repository
3) Build the code
4) Make the resulting ddserver binary executable and launch the server
5) Go to syslogs to monitor the activity
Step 2: Connect your DSLR Camera over USB to your ubuntu box
- Connect your camera to USB port using a compatible cable (Generally it comes with your camera, if not then check USB compatible cable for your particular camera model)
- On Ubuntu, you will get a new icon when your camera is mounted
- Just right click on the icon and UNMOUNT this device. Yes, this step is required, because by default the camera will be mounted as a media device but we want to communicate it over USB via PTP.
Step 3: Check the working of this server
- Simply download and install the qDslrDashboard APP from the playstore on your smartphone.
- On Ubuntu machine, turn on HotSpot
- Note the IP Address after turning on HotSpot by using command ifconfig
- Connect your mobile phone to this new set wifi HotSpot
- Open qDslrDashboard App on your mobile phone and long press connect icon
- Enter the computer’s IP Address (You can not change the port) and press OK
- Click on the same icon again and you will see that the App is able to detect your camera.
Now you can try different settings on your camera through this App. Also, keep observing syslogs on the server-side to understand more about the working of this server proxy code.
Try modifying Communicator.cpp & Main.cpp from the proxy server and put some more logs to understand PTP packets coming from the mobile app to this proxy.
That's all!
Now you know that there is a way to control your camera remotely and understanding implementation is also not so difficult.
Comment below and let me know if you face any issues in this process. If you get success then congratulations, keep playing with your newly built camera remote, and share your RnD with all of us.
Thank you!
Akshay
Comments
Post a Comment