Tenrec-Builders / pi-scan

Pi Scan is a simple, robust capture appliance for book scanners. It runs on a Raspberry Pi 2.
BSD 2-Clause "Simplified" License
264 stars 37 forks source link

Not seeing cameras #3

Closed mcdonaldm closed 7 years ago

mcdonaldm commented 7 years ago

Hi Jonothan,

I've downloaded the pi-scan 1.0 imaged it to a SD card. But when I boot up it does not recognize my cameras. I'm using Two Canon A2500 cameras that are plugged directly into my Pi 2.

When I click through after the storage option it flashes up that the even camera is not found but then instantly says no cameras found. They are turned on and connected correctly, but the lens never extend out when booted. The SD cards in the camera have been updated but still no luck.

One of the cameras still shows the last picture it took while the other says "no image".

I'm using the keyboard option.

Any ideas?

Thanks Michael McDonald

duerig commented 7 years ago

Reading back through personal email we have exchanged on this, the root problem was that things weren't working on Spreads before. And now they aren't working on Pi Scan either. So I think it is probably not a software issue with Pi Scan itself.

(1) Look at the debug log on the external SD card. Does it indicate any failure? Or is the USB connection just not appearing?

(2) Let's see if USB generally is working on the Raspberry Pi. When you boot up the Pi, tap the 'Quit to Console' button. Then plug in a working USB keyboard on each port and verify that you can type on the login prompt at each port.

(3) Verify the cables. Use them to plug in some other device into a normal computer and transfer data over them.

(4) Verify the phones. Plug their USB into a normal computer. They should appear as a PTP device and then as a disk drive that you can copy to/from.

Given that things were working fine and then just suddenly stopped, the biggest probability is a hardware failure. So we just need to be systematic and test each component individually to find out the problem. Once we have discovered what is failing, then it can be replaced. Let me know what you find.

-D

mcdonaldm commented 7 years ago

Thanks Jonothan, I'll do some testing this afternoon.

Michael

deligoez commented 7 years ago

We have similar kind of a problem. At first everything was perfect. After 3-4k shoots nearly everything crashes. Sometimes cameras not recognized, other times crash on zoom settings or at the first page scan.

We have Canon A1400, Raspberry Pi 3

Thats the error.log error.log.zip

Any other ideas? Thank you again

duerig commented 7 years ago

Aside from the above, I have discovered a new failure mode recently. If the camera SD card is full, then capture will fail. When scanning, nothing is saved on the camera. But if you manually press the shutter, the photo is kept. One user had accidentally filled up their camera cards with video of themselves aligning the camera.

So, look at the camera screen after turning it on and if you see photos or videos on the camera (rather than just the black screen), delete them all to free up the space.

If that doesn't work, let me know and I can dig deeper.

deligoez commented 7 years ago

Unfortunately that too didn't work. I think that's a hardware issue, but i'm not sure if its because of the Raspberry Pi or the Canon cameras.

Can you look at my error.log maybe that brings your mind something? Thanks Yunus Emre Deligöz

error (1).log.zip

duerig commented 7 years ago

deligoez, I looked through your error log. It looks like what is happening is that the cameras keep connecting and disconnecting. It searches for a camera, finds that camera, and then when it starts to use that usb connection, it has disappeared.

So I think you are right that this is probably a USB issue. The most likely culprits are the USB cables and/or hub between your cameras and the Pi.

Make sure all cables are seated firmly.

If that doesn't help, then If you have a hub, get rid of it. I have found them to be unreliable in practice. Plug the cameras directly into the Pi and see if that helps.

If it doesn't help or if you aren't using a hub, then switch out the cables and see if that helps.

If that doesn't help, then it may be the USB host on the Raspberry Pi itself. Try using a different port on the Pi. Or swap out the Pi entirely with another one.

--- Below this are things to try that might fix the problem. But I haven't had these happen in practice, so they are unlikely to be the cause ---

If the drivers or software on one of the cameras or on the Pi has become corrupted, this could cause it. Try to re-image all the SD cards and/or swap them out.

The last thing to try is to figure out if it is one of the cameras itself. Unplug one camera entirely and see if you can get just one camera to connect reliably. Then unplug that one and plug in the other camera alone. If just one of the cameras seems to be flaky and you have eliminated the above causes, then it is likely the camera.

deligoez commented 7 years ago

Thanks for the great response/care. I'll try them.

deligoez commented 7 years ago

hi, duerig

We changed everything except for cameras. Now we get crash after 5-10 shoots. Do you think that the problem on the Cameras now?

The error.log is attached.

error.log.zip

duerig commented 7 years ago

Two questions:

(1) Did you replace the SD cards, or just re-image the existing ones? (2) In the log, the first 8 times it crashes on the 'odd' camera. The last 3 times it crashes on the 'even' camera. Is it really the case that both cameras are crashing, first all one and then all the other? Or is it a single camera that consistently crashed and you clicked 'swap' or otherwise changed it from 'odd' to 'even'?

deligoez commented 7 years ago

These problems began after we moved the scanner to another office. Before the move everything was perfect. We worked with the replaceable batteries and took about 5K shoots. After the move, we prepared two power adaptors instead of the replaceable batteries for the canon a1400 cameras.

In the first try we see that one camera doesn't start with the CHDK. Interestingly the SD card was completely not working. So we replaced that SD card.

In the next tries we had always immediate crashes. So I'd wrote to you.

Then we changed all cables and switched to a new powered usb hub. The first one was not powered. The cameras connected directly to pi, not to the usb hub.

That didn't worked too. So we changed the pi. This time we were able to shoot 5-50 shoots. But it is completely unstable. The cameras works alone without any problem.

And lastly for your last question, we tried always with two cameras.

At this point frankly we don't know what to do. Do you?

I'm attaching the last error.log

error (1).log.zip

The hardware we use:

duerig commented 7 years ago

At this point, I think your most likely problem is one or both SD cards in the cameras. One of the errors in the log was triggered by a file not being found on the SD card that should be there. So my recommendation is:

(1) But two new SD cards. Ensure that they are from a reputable supplier so they are not counterfeit. I like Sandisk, but there are several good brands.

(2) Make sure to install the full version of CHDK for your camera firmware. The minimal version will not work.

(3) Lock the cards after install by flipping the tab and insert them into the cameras, making sure that when the cameras boot up you see the CHDK splash screen.

Some other things that you should watch carefully while testing:

(1) Which camera is crashing? I still can't tell from your statements if it is just one or both.

(2) When the camera crashes, does the lens remain extended or does it retract?

(3) When the camera crashes, is there anything on the camera screen? Or is the screen blank? When you turn on the camera, is there anything on the camera screen?

One other idea:

The crashes started happening when you switched to using AC adapters instead of the batteries. This change shouldn't matter and I've not yet seen a problem with using AC adapters. But try going back to batteries to see if this could somehow be affecting things?

mcdonaldm commented 7 years ago

Hi Jonathon,

Quick question regarding the problem I was having. I’ve downloaded the file pi-scan-camera-a2500-latest.zip. Does this have the required CHDK already in the image file? I tried reformatting the SD card for the camera having issues and still no joy. When I turn it on and boot into pi-scan the camera never extends the lens. It just shows No Image on the screen, but does show the CHDK splash screen initially.

I’m about to run out and get 2 new Sandisk SD and a new usb extender cable to see if that helps. But if I don’t have the correct CHDK loaded that is probably the issue.

Thanks

Michael

From: Jonathon Duerig [mailto:notifications@github.com] Sent: Friday, January 06, 2017 7:00 PM To: Tenrec-Builders/pi-scan pi-scan@noreply.github.com Cc: Michael McDonald mcdonaldm@pinetec.com; Author author@noreply.github.com Subject: Re: [Tenrec-Builders/pi-scan] Not seeing cameras (#3)

At this point, I think your most likely problem is one or both SD cards in the cameras. One of the errors in the log was triggered by a file not being found on the SD card that should be there. So my recommendation is:

(1) But two new SD cards. Ensure that they are from a reputable supplier so they are not counterfeit. I like Sandisk, but there are several good brands.

(2) Make sure to install the full version of CHDK for your camera firmware. The minimal version will not work.

(3) Lock the cards after install by flipping the tab and insert them into the cameras, making sure that when the cameras boot up you see the CHDK splash screen.

Some other things that you should watch carefully while testing:

(1) Which camera is crashing? I still can't tell from your statements if it is just one or both.

(2) When the camera crashes, does the lens remain extended or does it retract?

(3) When the camera crashes, is there anything on the camera screen? Or is the screen blank? When you turn on the camera, is there anything on the camera screen?

One other idea:

The crashes started happening when you switched to using AC adapters instead of the batteries. This change shouldn't matter and I've not yet seen a problem with using AC adapters. But try going back to batteries to see if this could somehow be affecting things?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Tenrec-Builders/pi-scan/issues/3#issuecomment-271042530 , or mute the thread https://github.com/notifications/unsubscribe-auth/AMkZvMHKy8LcFq6YSq-msxl0tVVlkEmpks5rPtV-gaJpZM4Kbisf . https://github.com/notifications/beacon/AMkZvJXDpzh7kB8NUsrfYCJsqXyR4vQ3ks5rPtV-gaJpZM4Kbisf.gif

duerig commented 7 years ago

I don't remember where we got to with debugging your system last October or what exactly was going wrong. Please email me at help@tenrec.builders and let me know what the symptoms are and I can then provide you with some advice about what to do.

If you are seeing the splash screen and you used the image in pi-scan-camera-a2500-latest, then the version of CHDK is correct. If it is still failing because it can't find that file, then it is likely to be a corrupted memory card and re-imaging it or replacing it is the way to go. I wouldn't recommend replacing your USB extension cable just yet, though you can if it is easy to test.

-Jonathon Duerig