-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get camera to display feed #2
Comments
Hello nldimartino, I have updated the Testrun for the camera the last days, so please update you uvc_camera app and run 'Set Up The Camera' on main screen. Thirst set up the camera with uvc settings. It would be easier to help, if I know your camera specifications, to compare your entered values with working values. The MaxPacketsize depends on your entered Altsetting. For the first try choose the smallest MaxPacketsize, 1 ActiveUrb, and 1 PacketPerRequest. So far, Peter |
Here are the specs for the Logitech webcam when I use lsusb -v -d in Linux. I've been texting different numbers for Altsetting, MaxPacketsize, ActiveUrbm and PacketPerRequest from what you told me and I still cannot get the stream to pop up. The app crashes every time. Can't check Logcat in Android Studio either to debug since the webcam is plugged in. |
Hello nldimartino, I'm trying to trace the problem and think, it's perhaps you use a newer 64 bit device and this Device has doesn't load a Library the right way. A solution for now would be, to test the camera from an older phone (with lower API) and look, if you get an output there. I will post here, if I can solve this issue. So far, Peter |
Are you saying the 64-bit phone I am using does not work with this app or that the device I am using is an too old to work with this app? I would prefer not to have to change the phone I am using so I'm curious if this app works with newer 64-bit phones. |
Updated the app's libraries to support all architectures. Please update the app and give it another try. Peter |
Hi, Thanks for fixing the app so that it does not crash all the time. It runs a lot smoother now. However, I am getting a message saying, ""Error: java.lang.Exception: Unable to open camera device connection." I found this part of the code in SetUpTheUsbDevice.java on line 620. It seems as though the camera I am using will not work correctly due to the kernel files not being patched. Is that true? Just want it cleared up. Thank you, |
Hello Nick, the moto z3 supports otg via usb. Try to connect a mouse or a keyboard via usb and look, if you can handle your phone with these input appliance. To solve the issue please try following steps:
Please also post, if your are using Android Studio to run the app (you can git clone the actual app version from here), or if you use the play store app. So far, Peter |
Hi, I forgot to mention that the app notices a camera is connected and it can list up the camera. The error occurs when I press the "Set up UVC settings" button. I am running this on Android Studio. I did all of the steps you mentioned. I connected a keyboard to the phone and it worked. It seems like the webcam might be the issue since the app sees it but UVC settings can't be applied. Thank you, |
Ok, Another questen is, if you have granted permissions to the usb device. Normally the app askes you, if you grant permissions? So far, |
Hi, I have reinstalled the app on my device and given it the right permissions. Thank you, |
And still this Exception? Peter |
Yes I still get the exception. I am not sure if I am entering in the correct information for the UVC settings. Any idea what they would be? |
Updated the camera permissions for the Android Usb Manager. |
Is it working now? |
No, it is still not working. I'm still just plugging in random combinations for the active URBs, Packets Per Request, and Max Packet Size and the camera transmission does not appear. |
Can you execute the 'Set Up With Uvc Settings' Button now without any errors? |
I cannot execute the 'Set Up With UVC Settings' button without getting the error. I also cannot attach a .txt file of the exception because my phone can't be connected to the webcam and Android Studio at the same time to look at the log. |
Sure you can. Use Adb over wifi: to use adb over wifi, connect you phone in debug mode and activate the wifi. adb devices Then you can unplug the usb cable and plug in your camera. Peter |
Dear Peter, I apologize for the delayed response. The equipment I am using is not the easiest to work with and loading times using virtual machines take a long time. Here is the logcat output for the camera when I press the 'Set Up The Camera Device' button. I get a popup message that says 'permision denied for device.' I have permissions allowed for the app so I am not sure how to clear up this permission. Sincerely, |
Hello Nic, the problem is, that the permissions for the usb device were missing. Try to execute all methods a few times and send me the log again to debug. Normally you should be able to grant the permissions for the camera. So far, Peter |
Dear Peter, The only box that appears is the 'Allow Debugging' one. I have granted permissions to the app but I am not able to access the camera permissions. The 'Find The Camera' button does not appear to be working. The Logcat output does not display anything when I press the button either. However, I am able to List Up the Camera. When I press the 'Set Up With UVC Settings' button, the only text that appears is 'No Permissions were granted to the Camera Device. I am not sure why I am not able to grant permissions from my camera since the phone does not offer a way to grant them from what I can see. Thank you, |
Hello Nic, please try out any other camera apps (CameraFi,...) from Play Store and report, if you get there the popup window, to grant the usb permissions and can check to remember them. Plz also attach the latest log from Android Studio So far, Peter |
Dear Peter, I tried out CameraFi. I am able to get permissions for everything to work. The app will display my webcam feed but the app will crash soon after. Probably a problem with that app. However, the camera feed is able to be displayed. I then went to your app and it says the permissions were denied. Sincerely, |
Hello Nic, I think i have solved to Problems with the permissions. Now I'm using an intent to find the camera and gain the permissions. Peter |
Dear Peter, Did you rename the app to humer.uvc_camera? I am not able to open the app now that I have updated it. Sincerely, |
Hello Nic, 1st.) Deinstall the app, install it from Play Store and report, if you can start the app. 2nd) Try to install it via Android Studio and attach the output of the log. Pls report when using the play store version, if you get a pop up window, to start the app, on your device, when you plug in the camera. (you should have permissions then to the usb device) My last two commits didn't change the app name (I never changed the app name up to now), so there must be an other reason for the crash.... In the Play store stack trace there is an Exception (Resources$NotFoundException) only on Android 9 Pie. I have added a new Resource file, which should detect your Camera in my last app commit. I started the app on Android 6 and it worked flawlessly. So far, Peter |
Dear Peter, I uninstalled the app and deleted the app files from my computer. I downloaded the app from the Play Store and also on Android Studio without the Virtual Machine. Both of these paths resulted in a message saying that the device permissions were denied. I then downloaded the app through the Virtual Machine on Android Studio and I can't open the app when the phone is directly connected to the computer and connected over wi-fi. It appears that the webcam device I am using will not allow me to access its permissions. These issues do not seem to be a problem with your software but a problem with the design of the device. If you have any other thoughts that would be great. Thank you, |
Dear Peter, What types of USB cameras have you used with your app that were successful? I would like tot est your app with a camera that you have personally tested. Sincerely, |
Hello Nic, in general I think, it could be a reason of the high android version too and not only the camera device. If other apps (CameraFi) works with you device, this app should work too and perhaps there were added some usb code in Android Pie, which makes it harder to connect to the camera. You can try your camera with an older android device (if present) and report your results here. My app works on devices down to API 15 (Ice cream sandwich). Some questions to the latest update:
So far, Peter |
One way to obtain the permissions could also be over the camera 2 api, which is also able to communicate with an external usb camera. I will test it out on WE. Peter |
Update: I was able to test the app with Android 8 by now and found a bug in the Storage Permissions. You can update the app again and test it. And another problem needs to be solved: So far, Peter |
64 bit support is now online. You can give the app another try. |
Hi, I try to set up the app for my uvc camera Alcor micro 5102 USB 2.0, with no success. Message is setup not correct. Do you have any idea how to resolve the problem. Thank you in advance for your help. |
Hello Nic, run the button "Set Up with Uvc Values" and then all the values should be correctly set. Save your values under a name and try to run the "Testrun" Button. Please post your output and values. So far, Peter |
Hello, if I run the button "set up with uvc values", it is not automatic, I have to select the values. |
Hello Nic, then lets make the first example for your camera: Please report the testrun or other values you use for your camera. So far, Peter |
dear Peter, i thank you for your reply. now it works with your recommendation, except i replace yuyv by mjpeg. but the images are not fluid. 1 image every 1.5 sec. which parameter i should modify in order to improve the fluidity. i do not care about the quality of image. for your information, i have this camera: |
Hello Nic, you sucessfully received the camera stream for your settings. (I don't know the exact settings you choose, perhaps you add a screenshot of the main screen.) When you compare the output you have to take a note on the frame length. Post the number you receive from the testrun. When the frames get longer, you get better Pictures with less errors from your camera. All the frames with errors are canceled automatically by the app. Everything clear? Peter |
I have connected a Logitech HD 720p C310 to the OTG cable and then into my Android Moto Z3 phone. I can't get the camera feed to come up. The app has crashed every time I've press "Transmission Start." I have been switching the numbers for Packets per Request, Active URBs, and Max Packet Size and nothing has worked. I would prefer not to do hundreds of combinations for this so do you have any tips on getting my camera to display the feed?
The text was updated successfully, but these errors were encountered: