Peter-St / Android-UVC-Camera

GNU Lesser General Public License v2.1
139 stars 27 forks source link

setup for Huawei P8 with AN97 #11

Closed ErnstTom closed 2 years ago

ErnstTom commented 4 years ago

Dear Peter Stroiber now i have some time to try the UVC app. but a lot of things are new to me, unknown. How to set up a Huawei P8 (non-lite) mobile phone with AN97 endoscope. i have tried many apps but all of them only work with the high-end and samsung device only. and I think the huawei p8 isn't weak either

ErnstTom commented 4 years ago

previously as if I had read that the pen is not android capable. although it recognizes it as usb capable. in time for the second

at the endoscope, I do the recommended data manually.

appendosc2log.txt appendosclog.txt penapp6log.txt Screenshot_2020-05-16-17-40-33 Screenshot_2020-05-16-17-41-28 Screenshot_2020-05-16-17-45-25 Screenshot_2020-05-16-17-45-50 Screenshot_2020-05-16-17-50-31 Screenshot_2020-05-16-17-52-32 Screenshot_2020-05-16-17-52-58 Screenshot_2020-05-16-17-54-03 Screenshot_2020-05-16-17-54-33

Peter-St commented 4 years ago

On the Pen Usb device only click the Manual Set Up button. After the error close the app and attach the log.txt file.

Peter-St commented 4 years ago

https://drive.google.com/open?id=1mLBo1yZPJozDNxXTOMQ-mIjyFGLuSnNx you can use this apk for your pen usb camera

ErnstTom commented 4 years ago

does not do logtxt with app6 (none). the error text is already generated in the pinat when i tap the uvc key. does not enter for manual or auto selection. otherwise I tried to press the auto button earlier but got stuck at 0%

Peter-St commented 4 years ago

Use the latest App and try it out again.

ErnstTom commented 4 years ago

I change any data - which one is important, I don't know - but the test the stream always resets it. and probe-commit always produces a null result.

Peter-St commented 4 years ago

You do not need to change the entries. First we have to overcome this exception you get. Next you can set up the pen cam too...

I don't know if we get this cameras with your phone to work. Both cameras has a large Maxpacketsize with 3072 bytes, but I think you need a smaller one for your phone. The endoscope cam could have one, but I don't know how to access it (1x768 bytes)

Peter-St commented 4 years ago

When you get an output from the latest app with your pen camera, plz attach it.

Peter-St commented 4 years ago

https://drive.google.com/open?id=1qrNB0_0ovxLG_Jt1Zev-COI_hNm_Cu1U This app should write some outputs to the log.txt file when you run it with your pen camera. Please try out all the buttons and then attach the log.txt file. Also attach the log.txt file, when you get the Array Index Out of Bounds Exception.

ErnstTom commented 4 years ago

guten morgen I always delete the previous version before installing the new version. it is enough.? the result is always the same. uvc is java faulty before logging in. with any setting of variables - alts1-10, frameindex 1-10, formatindex 1,2,3, ppr 4,8,64, actu 1,8,64, frameintv - all of them need to be tested because the or a thousand settings. I have prtscr from some settings, but I didn't do annit as many configuration attempts. penc2-1log.txt penc2-2log.txt penc2-3log.txt Screenshot_2020-05-17-09-54-26 Screenshot_2020-05-17-10-03-34 Screenshot_2020-05-17-10-04-47 Screenshot_2020-05-17-10-16-14

ErnstTom commented 4 years ago

Dear Peter I’ve tried a few more setup versions I’ve dreamed of, but the result is always the same. I don't think the pen is suitable for android. I think I’ll try to contact the manufacturer of the AN97 again - I did it once in the beginning but it was only aimed at the camerafi (almost only samsung or some top categories). Or with huawei - but not with Hungarian, because it gave a meaningless answer. Or if I suddenly have a better device, it might not be a problem. Newer devices are basically suitable for more and more things.

Peter-St commented 4 years ago

Hello Ernst,

run this apk with your Pen Camera and post the log.txt again. https://drive.google.com/open?id=1L1U6YWNis9V2Wd69UWbn4eVhkdU1CuSQ

The penc2-1log.txt was the right file I needed. I think it will be hard for both cameras to get an image out on your current phone.

Peter-St commented 4 years ago

The Values you enter to your Pen cam doesn't matter up to now, because the app stopps, because of this exception. Perhaps you can set up the pen camera, when I can solve this exception.

Peter-St commented 4 years ago

For the endoscop try out this app: https://drive.google.com/open?id=15ALUspgG4ieCqP_dNnx6IKFv-MDZjTtO

Run the manual mehtod with following settings: 1st.) PacketsPerRequest: 4 // ActiveUrbs: 4 2nd.) PacketsPerRequest: 8 // ActiveUrbs: 8 3rd.) PacketsPerRequest: 16 // ActiveUrbs: 16 4th.) PacketsPerRequest: 2 // ActiveUrbs: 16

During the other settings you can choose what you want.

Post 4 times the log.txt, when you have clicked the new "Test the Stream" button.

ErnstTom commented 4 years ago

Sehr Geehrte Peter die Einstellungen sind gleich mit pemcam2. Leider das Ergebnisse für mich auch. penc3-1log.txt Screenshot_2020-05-17-12-25-36

Peter-St commented 4 years ago

Hello Ernst,

With the pen cam, try to click the manual method, and when you get the exception, then post the log.txt.

So far,

Peter

ErnstTom commented 4 years ago

endoscope data0 (May 25, 25): if I click on the actual stream after test the stream then there are already reset values in the setup after it flows endc0-1log.txt endc0-2log.txt endc0-3log.txt endc0-4log.txt

Screenshot_2020-05-17-12-51-05 Screenshot_2020-05-17-12-55-10 Screenshot_2020-05-17-12-57-21 Screenshot_2020-05-17-12-58-47 Screenshot_2020-05-17-12-58-59 Screenshot_2020-05-17-12-59-54

ErnstTom commented 4 years ago

answer for 12.48 performing the operation with penc3 - same as before - javc java error and no logtxt. manually set according to the attachment, but atest the stream after resetting the settings penc3-2log.txt Screenshot_2020-05-17-13-13-10

Peter-St commented 4 years ago

Ok, some good news for your endoscop camera. With 16 packetsPerRequest and 16 Active Urbs you received the best solution up to now. In the log file endc0-3log.txt you can see, that the longest frames were 537479 bytes long. Normally all frames you receive from the endoscop should be 614400 bytes long.

Lets continue testing with: 32 packetsPerRequest and 32 ActiveUrbs 64 PacketsPerRequest and 64 ActiveUrbs 16 PacketsPerRequest 64 ActiveUrbs 64 PacketsPerRequest 16 ActiveUrbs

Post again all 4 log files.

Peter-St commented 4 years ago

And plz attach the log file from the pen camera, when you click on SetUpWithUvcSettings and you get the Arrayindexoutofbounds Exception.

Peter-St commented 4 years ago

Run all methods with you Pen Camera. --> Find the cam --> List up the Camera --> Set Up With UVC Settings.

You do not need to perform a Testrun, because first the other buttons need to work.

In your logfile there need to be an output like this: setUpWithUvcSettings - clicked setUpWithUvcSettings // Error during openCam(false):

At last you can attach the log.txt file.

Peter-St commented 4 years ago

You can try this apk with your endoscope camera: https://drive.google.com/open?id=1kkG8m40ksJe8SqbWltmXv_OxSOBOnCZB

With this version I think you are able to start the stream with the "Start the Camera Stream" button. First run the manual method --> Save your values. Then return to Main and next click on "Start the Camera Stream" --> Transmission start. Hope it works.

ErnstTom commented 4 years ago

it is only up to 32 in the manual, rewritten with manual modification - appendices. the camera stream did not indicate an error in either case. photo and video are also allowed. ONLY there was no image on the monitor that could have saved. endc1-1log.txt endc1-2log.txt endc1-3log.txt endc1-4log.txt Screenshot_2020-05-17-14-50-33 Screenshot_2020-05-17-14-53-38 Screenshot_2020-05-17-14-56-06 Screenshot_2020-05-17-14-57-56

video folder with size 0 files. I couldn't find where to save the photos.

Peter-St commented 4 years ago

If no more output comes from your Phone, then restart.

Sadly the frames get bigger than 614400 bytes, which means something is not correct.

Plz adjust the outputs from the Pen Cam.

ErnstTom commented 4 years ago

this now applies to the endoscope or penis. the phone or app needs to be restarted. I logged in and out of the app several times. I have to do each with a different app. my last data was for the endoscope. the output since, where should I set it?

Peter-St commented 4 years ago

Best to reboot the phone one times, when something not works.

Peter-St commented 4 years ago

For your Pen Cam:

Run all methods with you Pen Camera. --> Find the cam --> List up the Camera --> Set Up With UVC Settings.

You do not need to perform a Testrun, because first the other buttons need to work.

In your logfile there need to be an output like this: setUpWithUvcSettings - clicked setUpWithUvcSettings // Error during openCam(false):

At last you can attach the log.txt file.

Peter-St commented 4 years ago

With your Endoscop Camera use highest values 16 / 16 for ActiveUrbs / PacketsPerRequest.

ErnstTom commented 4 years ago

I restarted it several times even after the settings. I tried: 1/1, 1/4, 8/8, 16/16, 32/32, 64/64, usw. which were in the former. now none of the settings get the error message that cannot connect to the camera. but the monitor is blank (no picture). the exposure happens, but there is probably nothing empty on the save that it d don't put in the uvc folder because there is no such folder there. but not in dcim either.

Peter-St commented 4 years ago

Yes,

when you look into the log.txt file, you notice, that most of the data is 00:

data = 00 00 00 00 00 00 00 00 00

and all frames contains an error. This means, the data you receive from the camera is not valid.

I don't know how to solve it up to now.

It's as you said, the camera does not accept other camera settings for some reason.

ErnstTom commented 4 years ago

although the same name, but I overwrote it with the returnee. in this version, the camera stream always, as before, prints failed to start camera streaming. although exposure also goes after, but there is nothing, no picture. endc0-5log.txt endc0-6log.txt endc0-7log.txt endc0-8log.txt Screenshot_2020-05-17-16-32-04 Screenshot_2020-05-17-16-34-25 Screenshot_2020-05-17-16-38-50 Screenshot_2020-05-17-16-44-41 Screenshot_2020-05-17-16-49-31

ErnstTom commented 4 years ago

in the meantime, i asked kkmoon (an97) and huawei to comment on whether there is a possibility of a connection and that there is no conflict of interest. Not to work in vain. I hope we get and correct answer. The good time is coming, the virus is gone.?, You can go to work - if you have what.

Peter-St commented 4 years ago

One question:

When you run the manul setupwithuvcsettings Method, how many resolutions can you choose there? Al the 5 Resolutions? -> 640x480 / 352x288 / 320x240 / 176x144 / 160x120

Can you attach the log.txt, when you choose an other resolution, than 640x480?

ErnstTom commented 4 years ago

yes, all 5 are optional. I now chose the usual small medium. the result is unfortunately the same - "failed to" for camera streaming endc0-xlog.txt Screenshot_2020-05-17-20-24-26

Peter-St commented 4 years ago

Hello Ernst,

this app delivers more results from the endoscop camera to the log file: https://drive.google.com/open?id=1c_GFZf19rFL4ipdZViE7PZegcFHRF8-g

So far,

Peter

ErnstTom commented 4 years ago

Hello, the result is the same - in a week there wasn’t even any read feedback, although I asked huawei and kkmoon via contact us on their own website. I suspect this form of image display is officially banned. Although Huawe, as a Chinese manufacturer, wants to prove at all costs that its devices are no worse than Taiwanese. endsc5-1log.txt endsc5-2log.txt endsc5-3log.txt Screenshot_2020-05-23-16-09-22 Screenshot_2020-05-23-16-11-27

Peter-St commented 4 years ago

Hello Ernst,

perhaps some good news for you !

I sucessfuly got this endoscop to work on my devices! The 4th Controltransfer allways returns an error --> on my pc as on my android devs. But: It don't matter, that the 4th control transfer doesn't work, because the camera initializes the values you enter and commit it already with the 3rd controltransfer, which is sucessful !!

So please try out the following on your Device: Connect the Cam. Find Button, List Button, Set up with the manual Method ! 3072 4 Packets 4 Urbs YUY2 160 x 120 ---> Here choose the lowest Value !!!! 666667 ------> Highest Value, because then less Frames arrive ... Save 'ok' ---> Savefile is then 'dev' I think ...

Next "Video Probe Commit Control ! --> You have to see there 3 sucessful Controltransfers and the last failed one! The failed one does not matter, because the camera is then initialized ! Then the "Test The Stream" Button: you can post a screenshot here again, if you want ... My Frames here are between 10000 and 30000 bytes long --> all ones different, --> I don't know why they are different but it works with this settings.

If you get an output there --> Return to Main and then "Start The Stream Button" --> Start Transmission --> Start the Camera !

If for some reason the Button "Video Probe Commit Control" returns 4 times "null" --> disconnect the camera and connect again, restart the app and run the manual method again.

ErnstTom commented 4 years ago

hello I did it 3x log file was not created for some reason Screenshot_2020-05-27-11-03-17 Screenshot_2020-05-27-11-03-32 Screenshot_2020-05-27-11-03-45 Screenshot_2020-05-27-11-04-24 Screenshot_2020-05-27-11-04-57 Screenshot_2020-05-27-11-05-09 Screenshot_2020-05-27-11-05-22 Screenshot_2020-05-27-11-06-14 Screenshot_2020-05-27-11-07-04

Peter-St commented 4 years ago

Hm, from the last log files I noticed, that most of the frames byte value of your endoscope is: 0x00 So this would be the reason, that nothing is displayed, when starting the camera stream.

Perhaps it could be, that I'm using a litle bit newer version of this endoscope, because it's already linked to the AN98 apk from the play store.

I also noticed, that other apps working far more better than mine, using the standard uvc driver. I will have to spend some time on this behavior, to update my app, that it also receives the same data than with the original uvc driver.

If I can solve it, you can give em another try.

So far,

Peter

ErnstTom commented 4 years ago

Dear Peter

go ahead. I've been buying and trying for 2.5 to 3 years. Not vital, it would have been good. When I bought it on ebay, I didn’t know the binding of my phone / camera / program yet. Just after trying out the different apps and reading the comments and other afterwards. It's "old." It might go with another, but it might not work the same way. I like your UVC because it is at least adjustable and you can see the settings. Another app just prints that no reason. Ernst

Peter-St commented 3 years ago

Hello Ernst Tom,

if you still have your phone and Camera, you cam try it out again.

I have added a new driver (Libusb support). With this approach the devices are a lot more faster than before.

You can do the Setup like described in this post before and perhaps the outputs are getting better.

ErnstTom commented 3 years ago

welcome Peter. of course I still have everything because the tools aren't bad anyway. although I intend to add a samsung a41 (a21s?). of course i will try uvc-camera again? but I do not intend to hold you up as I did before. I was just interested. E. T.