0

VC0706 Stops Sending Image Data
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

VC0706 Stops Sending Image Data

by nvandoorn on Tue Dec 05, 2017 3:59 pm

Hello all,

I'm working on getting the VC0706 camera running on the Legato platform (http://legato.io/). I fully understand that this is unsupported by Adafruit so any help at all is greatly appreciated. The Legato serial interface (http://legato.io/legato-docs/latest/le__tty_8h.html) returns a standard file descriptor, so serial I/O is fairly straight forward and conventional.

Our code base is ported over from Adafruit's VC0706 repository (https://github.com/adafruit/Adafruit-VC0706-Serial-Camera-Library) and is available here: https://github.com/brnkl/VC0706-cam-lib-legato.

Everything is working except reading photos. Our readPicture (line 123) function called inside snapshotToFile (line 284) times out and stops receiving data after the camera's frameptr reaches 320. I've been debugging this for quite a while and I'm starting to run out of ideas.

Any help is greatly appreciated. Please let me know if our repository's licence or readme needs to be modified to give proper credit to the original authors.

nvandoorn
 
Posts: 3
Joined: Tue Dec 05, 2017 3:25 pm

Re: VC0706 Stops Sending Image Data

by adafruit_support_mike on Fri Dec 15, 2017 4:23 am

Our license only asks for attribution, and from what I see in your Github repo you've already done a wonderful job with that.

My next suggestion would be to put the board on a logic analyzer and compare the signals on your Legato board to the signals from an Arduino. It's always useful to see what the signals are doing, and to compare failed transmissions with working ones.

adafruit_support_mike
 
Posts: 54016
Joined: Thu Feb 11, 2010 2:51 pm

Re: VC0706 Stops Sending Image Data

by nvandoorn on Fri Dec 15, 2017 2:22 pm

Hey Mike,

Thanks for the suggestion. If we get desperate enough we may give this a go, but a recent developments lead me to believe this is a software related issue.

I noticed that all commands (not just the command to read image data) stopped working after reading 320 bytes of image data, which lead me to believe the serial connection was somehow locking up (buffer overflow somewhere in the OS maybe?). After this, I tried closing and re-opening the serial port file descriptor after each read of image data. This allowed me to get a full image (around 48kb), but unfortunately the images are corrupted and un-viewable. I suspect this is a side effect of resetting the serial connection so frequently.

As such I've started a thread on the MangOH (the board that runs Legato) forums here: http://forum.mangoh.io/t/serial-connection-becomes-unresponsive/987.

I'll try my best to keep this thread up to date as I go. Thanks again for the support!

nvandoorn
 
Posts: 3
Joined: Tue Dec 05, 2017 3:25 pm

Re: VC0706 Stops Sending Image Data

by nvandoorn on Fri Dec 15, 2017 6:19 pm

Hello all,

We solved this by using system calls for the serial connection. Release 1.0.0 of our VC0706 driver will be available later today.

nvandoorn
 
Posts: 3
Joined: Tue Dec 05, 2017 3:25 pm

Please be positive and constructive with your questions and comments.