2

I have been trying to get a USB webcam working on my Acer A500 using https://bitbucket.org/neuralassembly/simplewebcam as a guide.

According to the config file on my device it meets all the requirements and the app runs but I still cannot get it to work.

I have found a V4L2 patch here: http://code.google.com/p/android-m912/downloads/detail?name=v4l2_camera_v2.patch but I do not know what to do with it.

I would appreciate anyone who could help me compile/install this patch.

Thanks

Paul

Acer A500 CWM 3.2 Rooted with ADHOC wifi support

1
  • No patch is needed. use uvc and access the v4l2 layer which will get you the frames from webcams
    – Sandeep
    May 3, 2012 at 10:14

4 Answers 4

1

UVC compliance is not the problem here. The Acer A500 runs Android and based on your query it looks like you are attempting to get the USB webcam to be recognised by the Android camera app.

The problem you are running into is that the Android framework on your tablet recognises only the built-in cameras and does NOT support enumerating USB-cameras that the underlying Linux kernel supports. The patch you refer to is supposed to fix this issue. It modifies the Android camera framework to add support for generic v4l2 camera. Unfortunately this is NOT for the Acer A500, but for a completely different device (the Gigabyte M912X).

To add support for USB camera on your Acer A500, one will need to:

  • Get access to the android source-code.
  • Modify the camera framework (camera-HAL, camera service).
  • Build it and push the camera-HAL and framework binaries onto the device.
1

@TheCodeArtist, the bulk of my current activities is around webcams working on Android devices. Based on personal experience using the Acer A500, you do NOT need any modification to any of your sources to get a UVC compliant webcam to work with it!- especially the video portion.

. The Android implementation on the Acer A500 already has the video4linux2 driver installed as part of the base kernel. What it needs is an available /dev/video?? to run.

I will suggest that @1358628 you connect to the tablet using adb. Try something like adb ipaddress_of_the Acer_A500:5555 if the tablet is rooted or connect the tablet to your development system through USB. Plug your camera into the Acer A500 and check for the avialble /dev/video?? consumed.

1. Connect to the Acer A500 by using adb connect "address_of_camera:5555"
2. use adb devices to ensure that you are connected to the tablet. Then
4. Please try something like ls -l dev/video?. Check the number at the end of the word video --video? portion of your response. For example if you may notice ../video1, ../video2.

After this, turn the power off and unplug the webcam. Repeat the last exercise: check to see the ../video? listing. You should notice a missing ../video? entry. If you don't your camera is not UVC compliant. If you confirm the brand and model of your webcam I could verify things for you.

Try this suggestion an let me know the results

1

Patch is needed only if you needs to get USB webcam as native camera without any third party application which mostly uses jni with v4l2 calls and manipulate data. Patch you mentioned modifies android framework to get USB webcam. You need your device aosp source to apply patch and please note that this patch is old so probably relevant source is not same now.

Most probable reason for simplewebcam is not working is video device node is not matching with default 0 mentioned in source. Check which video node is getting created by executing ls -l /dev/video* after inserting webcam. Accordingly modify video node index in code. Also change write permission of the device if you are getting permission denied error by executing chmod 666 /dev/videoX where x is webcam video device index.

0

Could you explain what exactly you did trying to get a webcam working with your tablet? If you have a recent webcam, it would be UVC compliant - which means that you do not need any extra external driver to use the webcab

Please review this list at this URL to see if the camera you used is UVC compliant. http://www.ideasonboard.org/uvc/#devices

What you need is that the application needs to know how to identify and "call" and use the webcam. The example that you quoted from that university research website CERTAINLY works with your webcam model.
Go ahead and build that sample singlecam or doublecam app and your webcam should be able to display its output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.