Can't get autofocus working
#1
Hi,

I'm running into difficulty getting main camera autofocus running.  I've taken the following steps:

  1. Replaced my Braveheart motherboard with a new 3GiB motherboard.
  2. Replaced my camera module with a new one.
  3. Installed the latest Mobian weekly (2022-01-02).
  4. Upgraded all the things ( sudo apt-get upgrade -y ).
  5. Started Megapixels, and tapped the screen to trigger autofocus.

At this point the focus jumps around a bit (looks like autofocus starting to work as it does on other devices), but it never manages to properly focus on anything more than a few centimeters from the lens.  During this, the following is logged in dmesg:

Code:
[ 7895.103889] ov5640 3-004c: uploaded firmware didn't start, got to 0x7f, retrying...
[ 7895.423877] ov5640 3-004c: uploaded firmware didn't start, got to 0x7f
[ 7895.430507] ov5640 3-004c: ov5640_set_ctrl_focus: no autofocus firmware loaded
[ 7899.123759] ov5640 3-004c: firmware upload success
[ 7899.129210] ov5640 3-004c: fw started after 0 ms

The camera works just fine when I "focus" it by physically moving it close to an object:


[Image: IMG20220108060633.jpg]

... but if I try to take a photo of anything more than a few centimeters away, it completely fails to focus:


[Image: IMG20220108060559.jpg]

Any help would be greatly appreciated, as this is the final hurdle for me to adopt a PinePhone as my daily driver Smile
  Reply
#2
An update: I still can't get this to work.  I've tried every firmware at https://github.com/dragan-simic/ov5640-a...-firmware/, and also tried recompiling Megapixels from the latest source.

The basic behaviour is still the same: dmesg reports success; camera clicks indicating the lens is being controlled by the AF, and the focus jumps about when I touch the screen in Megapixels.  But it still seems completely unable to actually focus properly.
  Reply
#3
Sounds strange, especially since you already changed the hardware. Have you made sure your lens and the cover from the case is clean? Maybe there is some dust or something that prevents the auto focus from working correctly. You could take off the back case of the phone and see if it behaves differently.
  Reply
#4
I believe the lens is not working properly, Try adding back-inn.
  Reply
#5
So I solved it with a pair of tweezers Smile  Steps were ...

1. Remove the back cover.
2. Remove the inner back cover by taking out the screws.
3. Fine-tune the lens position by rotating it in the barrel with a pair of tweezers, while manually checking the results in Megapixels.

End result:

[Image: IMG20220123140940.jpg]
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  JumpDrive isn't working phytocube 2 105 06-05-2022, 03:22 PM
Last Post: phytocube
  SIM card slot not working dekrets 2 494 02-12-2022, 11:09 AM
Last Post: dekrets
  PinePhone Beta 3GB modem not working hannescam 15 2,791 01-19-2022, 02:08 AM
Last Post: bcnaz
  Video Out not working BenniTec 7 2,039 10-21-2021, 11:56 AM
Last Post: BenniTec
  How did you get data working on PureTalk? nelstomlinson 2 1,178 09-26-2021, 03:50 PM
Last Post: nelstomlinson
  JumpDrive not working due to device busy cnxsoft 3 1,342 08-08-2021, 12:18 AM
Last Post: mouffa
  Still trying, SMS not working Nutmeg 17 2,661 07-28-2021, 08:10 PM
Last Post: bcnaz
  For those of us that need a working daily driver Nutmeg 6 1,658 07-13-2021, 03:33 PM
Last Post: Nutmeg
  4G VoLTE calls confirmed working with carrier x dcinoz 6 5,776 07-08-2021, 04:34 AM
Last Post: zetabeta
  Is my VoLTE working? worden 1 1,051 06-27-2021, 03:03 AM
Last Post: dcinoz

Forum Jump:


Users browsing this thread: 1 Guest(s)