Chronos Cam App open source build discussion

tesla500

Administrator
Staff member
At long last, the Chronos Camera application source is now available at the following git repository:

chronos-cam-app

Currently we only support Ubuntu 16.04 LTS as a build environment. 17.04 is known to NOT work due to different compiler versions included. You're welcome to try other environments, please let us know what works and what doesn't.

Follow the instructions in the repository readme to set up your build environment.

We suggest not doing any significant changes or customization right now. We are in the process of breaking out the low level camera control into a daemon controlled over D-Bus. This will allow the cam app to talk to the camera seamlessly, whether local or operating remotely over a network connection. Ideally, the exact same application will be able to be compiled to run on the camera or on a PC.

Once you have the application compiling, you can connect to your camera over SSH. Plug the mini-USB port into your computer, and it will enumerate as a USB to Ethernet bridge (serial numbers 00050 and above, earlier cameras need an update, available here). You can then log into the camera using root/<no password>

I'm sure there will be many questions, please let us know any problems so we can provide better build instructions.

David
 
That's great news and looking forward to trying it. I'm on Mint 17 which is based on the ubiquitous Ubuntu 14.04 so will let the forum know if all good.
 
Thanks!
Did a quick attempt at building the QT framework and got stuck at the step where you "make" "make install".
I will figure it out, but ran out of time, this time.
 
Running the script conf.sh to setup the QT build generates an error. I tried to Google it, seems lots of people have fallen i this trap but failed to find a solution. I am sure it's fixable but also guess it will take a lot of time. Any chance you could update the readme with the steps required to build tslib for the Chronos apps processor or maybe even include the necessary files in the target rootfs so we don't have to build it.
The error ...
"The tslib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR and QMAKE_LIBDIR in
/home/davor/work/qt-everywhere-opensource-src-4.8.7/mkspecs/qws/linux-omap2-g++.
"     
 
Hooking up the mini USB to a Linux machine to get an ETH interface works fine. The camera responds to ping.
But
"You can then log into the camera using root/<no password>"
user=root, password=<nothing just press enter>
Generates an "Access denied" response.

I am using Putty as my terminal program.
 
tretee said:
Running the script conf.sh to setup the QT build generates an error. I tried to Google it, seems lots of people have fallen i this trap but failed to find a solution. I am sure it's fixable but also guess it will take a lot of time. Any chance you could update the readme with the steps required to build tslib for the Chronos apps processor or maybe even include the necessary files in the target rootfs so we don't have to build it.
The error ...
"The tslib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR and QMAKE_LIBDIR in
/home/davor/work/qt-everywhere-opensource-src-4.8.7/mkspecs/qws/linux-omap2-g++.
"     

I knew there was a step missing from the instructions! You need to put tslib.h in /usr/include in your targetfs directory. Using the paths shown in the instructions, that would be ~/Work/chronos-sdk/targetfs/usr/include. We forgot to include that on the filesystem shipped with the camera.

File is attached.


tretee said:
Hooking up the mini USB to a Linux machine to get an ETH interface works fine. The camera responds to ping.
But
"You can then log into the camera using root/<no password>"
user=root, password=<nothing just press enter>
Generates an "Access denied" response.

I am using Putty as my terminal program.

The camera uses an old version of SSH, and only supports a deprecated (insecure) key exchange algorithm. You need to use the following command to connect to the camera with SSH from modern systems:

ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 [email protected]
 

Attachments

Thank you.
QT builds fine now and I can connect to the camera via SSH.
Next obstacle.
When trying to build the Camera app in QT creator I get an error in video.h originating from line 42 where OMX_Types.h is included.
I can't find the file so I assume that is a legitimate error and not the usual path problem.

 
tretee said:
Thank you.
QT builds fine now and I can connect to the camera via SSH.
Next obstacle.
When trying to build the Camera app in QT creator I get an error in video.h originating from line 42 where OMX_Types.h is included.
I can't find the file so I assume that is a legitimate error and not the usual path problem.

You've copied the contents of the boot MicroSD card to the targetfs folder, right? There are some header files in there that are needed. Also, what OS are you using as your build host?
 
Yes I did copy the content of the SD card ROOTFS partion to the ...../targetfs/  folder.
Where on the SD card can I find the missing header files? I already looked in the most obvious places and did a search. 

My host machine runs Ubuntu 16.04 LTS
 
Did you copy from the Linux EXT3 partition? I can make up a tar with the entire filesystem on it if needed.
 
As far as I can see the SD card has 2 partitions. One EXT3 with volume name "ROOTFS" and one called BOOT. I copied the content of the ROOTFS partition.
I assumed that all files might not have come across in the copy operation (tar the rootfs and then untar on host is the way it should be done but is normally only necessary if you want to use it as a NFS for the camera during development)
So when I look for the missing header files (OMX_Types.h is the first one reported as missing) I am looking both on the SD card and the copy on my host.

Delivering the file system as a tar ball will not help if the required files are not there. Based on your response it sounds like you know they are there. So where on the SD card can I find for example the "OMX_Types.h" file?
E.g. either we need to modify the project to remove that dependency or include the files.
 
I have those files in mine, we did change the SD card image after serial number 00049, I believe those older cameras may not have the include files on them. I've attached a tar with all the includes, extract it to /targetfs/usr/

Let me know if this works.
 

Attachments

Thanks David, (getting replies from the main dev around Christmas is unheard of, so an extra thanks for that and Merry Christmas)

That's it!
Quick hack to remove the annoying warning message about unsaved data in RAM. Built the app and tested it on the camera.
Works as expected. 

Now need to figure out a way to develop app and test without the SD card in and out copy. That works fine for a quick test but for any more advanced development I need either the camera to mount rootfs over NFS or a way to have the debugger load the executable directly to the camera.
Never used QT before but that looks fairly easy to learn. How do you develop/debug?

Best Regards
Davor
 
The README in the github repository has been updated with a description of how to get the debug environment working under Ubuntu 16.04. Unfortunately I haven't been able to get debugging working from anything newer (ie: Ubuntu 17.04 and beyond) due to some issues in newer versions in QT creator. There process is roughly broken down as:
  • Install a cross debugger and configure the camera kit to use it.
  • Add the Camera as a device in QT creator using SSH.
  • Kill the camApp daemon via SSH to gracefully shutdown the video pipeline.
  • Start your debug build of the camApp from QT creator.

SSH access to the Camera is provided through the mini-USB port labelled "OTG". When you connect your laptop to this port it will come up as a USB network adapter. The Camera has a static IP address on this interface of 192.168.12.1, and your laptop will get an IP address assigned to it via DHCP (this should be familiar if you've worked with Beaglebones before). By default there is no root password, and SSH will accept anything you type for a password until a password is configured.
 
Hi foobar, thanks for the update.

The deploy/debug part does not work.
- Setup device -> works fine and "test" shows.
Connecting to host...
Checking kernel version...
Linux 2.6.37+ armv7l

Checking if specified ports are available...
All specified ports are available.

Device test finished successfully.

-> Deploy/debug generates following error. (yes i did first kill the running camApp)
16:32:53: The process "/usr/bin/make" exited normally.
16:32:53: Unexpected output from remote process: "Available"
16:32:53: Deploy step failed.
Error while building/deploying project camApp (kit: Camera)
When executing step "Check for free disk space"
16:32:53: Elapsed time: 00:00.

PS.
As far as I can see the Ethernet port works fine and actually better than the USB/ETH connection. E.g. I can use WinSCP and Putty/ssh when camera is connected to my local network with ethernet cable. As you already explained that will not work with the USB/ETH.
I tried both ETH port & USB/ETH for the debug and the result is the same.
 
Back
Top