Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

JeVois Freezing on PC and RaspberryPi

0 votes
I have my new JeVois and got started immediately creating a card from the latest image (http://jevois.org/data/jevois-image-latest-8G.zip) using jevois.org/start as instructed. I used Windows 10 + Win32DiskImager + SanDisk Ultra 16GB HC1 SD. I used USB 3.0 and a nice cable to power the JeVois. I used Windows "Camera" app and it connected immediately and I watched the entire intro video and played with the JeVois for about 10 minutes before the first freeze occurred. The video stream stopped; Windows remained functional. I removed power to the JeVois and let it restart. I was able to stream for only a few seconds before the stream stopped again. I then tried VLC and amcap with the exact same results. I used Hyperterm to monitor the serial output and While JeVois streams, I am able to communicate with JeVois. When JeVois freezes, the serial communication also freezes. One strange thing I noticed is when I "close" the frozen video stream (leaving Hyperterm connected), the serial communication resumes until I again open the video application and freeze the stream.

I decided to switch environments from PC to Linux. I connected JeVois directly to a RaspberryPI + GUVCVIEW, but was not able to connect until I used a USB Hub with external power. GUVCVIEW then connected, but the exact same freeze occurred a few seconds into streaming. I then attempted to reformat my SD card and put a fresh image. I formatted the card using a camera (I've had issues formatting SD cards on Windows 10) and then downloaded a fresh image and used Win32DiskImage to write to the SD card. I powered the JeVois and it freezes after a few seconds once again.

I hope that I am doing something fundamentally wrong and that there is a simple solution. But I have not been able to find any support regarding freezing video from JeVois and I would be surprised if I was alone unless I had defective hardware, maybe?

Please let me know if there are any further suggestions.

Thank you,

David B.
asked Mar 16, 2017 in Hardware Questions by dbnit82 (120 points)

1 Answer

0 votes

Hum, the fact that the serial connection still works when you close the frozen video would suggest that the transfer of video frames is choking somehow. Indeed, we handle serial communications in between video frames (send one frame, handle serial, send next frame, handle serial, etc).

Can you try some other, lower bandwidth video modes, for example

guvcview -f YUYV -x 320x120

This is the background subtraction demo at 30fps. Or maybe your USB cable is not so good?

answered Mar 16, 2017 by JeVois (46,580 points)
Very helpful, thank you. I played around with lower resolutions and there are certainly some settings that do not freeze at all. The larger the resolution gets, the quicker JeVois stops streaming; the time span ranges from working -> 10-12 seconds -> immediate fail.

I found the "thickest" USB cable I could find in my posession and it definitely helped. I also had success both with RaspberryPi and Windows with my trials.

It does appear that a "choking" effect is happening. Can you send a model/part number or picture of the USB cable you recommend? Is it likely this is a cable issue or a combination of other issues as well?
incidentally, we just experienced something similar with a local backer who just unpacked his camera. AMCap on Windows would work but after some time it also dropped the camera. If we re-opened it, it looks like the camera was still running (i.e., had not crashed).

We were connected to the front-panel USB ports. Once we connected directly to the USB ports on the motherboard of the host PC, the issue disappeared. So I am guessing some power or data integrity issues in that connection to the front panel might have been the problem.

If you are using a Y cable, can you try to connect the long end (power+data) to your Pi and the short end (power only) to a reliable USB charger that is rated 1A or more (or a USB battery bank or such)? That may solve the problem by providing better power.
Update. I ordered and received a 'Y' adapter USB cable sized at 26AWG. I am using an A/C USB power adapter rated at 2.4 AMPS max. I am using USB 3.0 (so theoretically I don't need the 'Y' adapter). I'm using Windows 10 and AmCap. I have changed to a smaller SD card at 8GB (SanDisk SD Class 10). I downloaded the latest Jevois .img file (on 4/5/17). I flashed the SD card using a camera and then used Win32Imager to write the image.

I plugged everything together, the Jevois powers on, boots and the correct Green then Orange lights appear.

I can again connect a terminal program to the Jevois and communicate with it, setpar, listmappings, info, ping all work. I used the terminal to set the serout and serlog to USB and changed the logging to INFO.

I run AmCap and set the video settings from the lowest through the highest and the low resolutions work for a few seconds and again the higher fail almost immediately or simply show black video AND frozen terminal ( I type "info" return, and there is no response until I close the AmCap application where I instantly receive the info message).

Here is the logging from the terminal beginning with the info command, then I start AmCap (black video) and that is the last event logged until I close AmCap.

INFO: JeVois 1.0
INFO: Linux version 3.4.39
INFO: CPU: 1344MHz, 28C, load: 1.00 0.72 0.34 1/52 82
INFO: MemTotal: 238452 kB, MemFree: 193016 kB
OK
INF Engine::setFormatInternal: OUT: YUYV 320x120 @ 30fps CAM: YUYV 160x120 @ 30fps MOD: JeVois:DemoBackgroundSubtract
INF Camera::setFormat: Camera set video format to 160x120 YUYV
INF Engine::setFormatInternal: Module [DemoBackgroundSubtract] loaded, initialized, and ready.
INF Camera::streamOn: 32 buffers of 38400 bytes allocated
INF Gadget::streamOn: 16 buffers of 76800 bytes allocated

I recorded my experience to an AVI that will play in VLC: https://drive.google.com/open?id=0B3Fqdhmz0GapYnoxTC13UlVDcU0

I changed the power from the A/C adapter to a battery back rated at 2A. Same results.

I configured the serout to USB and left serlog to default and got a slightly different log stream. The end of the log is where the video eventually froze:

setpar loglevel info
OK
setpar serout USB
OK
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0
T1D 0

I'm truly at a loss on what to try next. According to these threads, there are so many people having no issues and so I'm still very surprised I am unable to have success.
Thanks for the video. Your JeVois camera seems to not be working well. Why don't we send you a replacement camera to try out? Can you please contact us via kickstarter so we have your shipping info, etc? just send a message to creator.
I noticed that AMCap says "no device selected" in your video (bottom of AMCap window), I assume this was just that one time? Otherwise you should select the JeVois camera in AMCap. What the camera says when you change mode (error: not streaming) also indicates that AMCap was not trying to connect to and grab frames from the camera. But this would not address the freezing problems you had reported previously.
I ran the same test again and the lower left corner of AmCap displays "Video Control" which is the device listed in the "Devices" menu after JeVois boots.

Screenshot: https://drive.google.com/open?id=0B3Fqdhmz0GapOE03dEtBeWpKNGM
Thank you, I will head over to the KickStarter page.
...