LeoDJ / P2Pro-Viewer

A viewer and API for the InfiRay P2 Pro thermal camera module
MIT License
171 stars 22 forks source link

Would it work with iphone version #2

Open dorinclisu opened 1 year ago

dorinclisu commented 1 year ago

Initially only the Android USB-C was available but now we also have iphone lightning, example here: https://www.aliexpress.com/item/1005004816021872.html

Also the iOS app: https://apps.apple.com/us/app/p2-pro/id1619041411

The reason I'm asking is that I'm trying to decide which version to buy. Since I am an iphone user, I would of course prefer the iphone version, but I would also like the ability to plug it into a computer such as raspberry pi.

Provided the physical usb adapter would not be a problem, is there any particular concern from a usb driver point of view?

LeoDJ commented 1 year ago

Sorry, I don't know about the Lightning version of the camera, it's quite new too, I think.

My guess would be that they didn't change the underlying protocol, just added a lightning connector and the required circuitry to tell the iPhone it's a USB device. If so, it would work with an adapter. But I don't know that for sure, I'm just guessing into the blue.

I don't know anybody who owns one either. But if someone reads this who owns one, I'm happy to hear back if it works or how it behaves.

If they changed the protocol a bit, I'm also happy to help figuring that out and implement support for the Lightning version in the future.

Tomatendose commented 1 year ago

I have an iphone and got the USB-C version for compatibility reasons. I tried to connect the camera to my iphone 12 mini with a USB-C adapter on lighning, unfortunately this did not work. I'm currently using it via my Raspberry Pi 4 running LineageOS. Via the Android 13 I use the P2Pro app. This runs quite passably. Unfortunately not exactly mobile and compact.

Tomatendose commented 1 year ago

But what I would like to say about the app. I find the range of functions of the app very limited and also the setting options here for the rainbow for the specially defined temperature range not nicely implemented. In this respect, I'm waiting for a proper software. The following software seems promising to me when the new version is released:

https://www.eevblog.com/forum/thermal-imaging/thermal-imaging-windows-application-for-infiray-t2-t3-thermal-cameras/25/

LeoDJ commented 1 year ago

@Tomatendose

I tried to connect the camera to my iphone 12 mini with a USB-C adapter on lighning, unfortunately this did not work.

Out of interest, which adapter did you use specifically?

But what I would like to say about the app. I find the range of functions of the app very limited and also the setting options here for the rainbow for the specially defined temperature range not nicely implemented.

Yeah, I noticed those and more limitations too and would like to implement most missing features in my viewer at some point. (I could probably use some help with that once the "base scaffolding" is finished)

The following software seems promising to me when the new version is released: https://www.eevblog.com/forum/thermal-imaging/thermal-imaging-windows-application-for-infiray-t2-t3-thermal-cameras/25/

The software looks nice, but is neither open-source nor platform-independent if I read correctly? (Also sorry, I have a personal, deep-seated dislike for software releases "hosted" on Discord and the trend to use Discord as a forum ^^")

Tomatendose commented 1 year ago

Out of interest, which adapter did you use specifically?

I have used these adapters:

https://www.ebay.de/itm/175059299135?var=474230246681

At first I suspected that it was defective, but the replacement did not work either. I also tried to charge the iPhone with it. That didn't work either. Now I don't want to invest any more money in adapters.

Yeah, I noticed those and more limitations too and would like to implement most missing features in my viewer at some point. (I could probably use some help with that once the "base scaffolding" is finished)

That sounds very promising. Unfortunately, my Python skills are not very high and have so far been limited to small computations and GUI with PyQt5. Otherwise I would like to get involved.

The software looks nice, but is neither open-source nor platform-independent if I read correctly? (Also sorry, I have a personal, deep-seated dislike for software releases "hosted" on Discord and the trend to use Discord as a forum ^^")

I also don't like the fact that it is not platform-independent, as I am a macOS user. Which is why I find your approach very interesting. The P2Pro is not yet integrated there either. I still use Parallel Desktop on my Mac, but I tried other thermal image processing programmes that unfortunately didn't work. I will have to test the software from the forum as soon as it is released.

dorinclisu commented 1 year ago

I have an iphone and got the USB-C version for compatibility reasons. I tried to connect the camera to my iphone 12 mini with a USB-C adapter on lighning, unfortunately this did not work. I'm currently using it via my Raspberry Pi 4 running LineageOS. Via the Android 13 I use the P2Pro app. This runs quite passably. Unfortunately not exactly mobile and compact.

Thanks for reporting, so we know the usb-c version doesn't work with iphone, but it's not a proof that iphone version can't work on a generic usb.

Anyhow I don't want to carry an extra android phone around (unless the ios app somehow sucks more), so I may bite the risk and get the iphone version and report back. Can help with python if need be, though I don't have any usb protocol experience.

Tomatendose commented 1 year ago

I have tested another adapter:

https://www.amazon.de/dp/B09H2PZTG2?psc=1&ref=ppx_yo2ov_dt_b_product_details

in connection with a USB-C adapter. The P2Pro now gets power. Notice the clicking sound every few seconds. But the P2Pro app does not recognise the P2Pro. Other apps like the one from Uni-T did not work either.

dorinclisu commented 1 year ago

@Tomatendose It would be interesting to know if the original usb adapter would work: https://www.apple.com/shop/product/MD826AM/A/lightning-digital-av-adapter

I've read stories that the aftermarket adapters can have unknown issues. Not saying you should waste more money on adapters :) Just perhaps you could borrow one for testing.

The thing is, I'm still not buying the iOS version because there is something fishy about it - only one Aliexpress store (Youda Thermal) on the entire internet has it on stock. And the Infiray official store on amazon.de say it's simply not available yet.

Arnold1 commented 1 year ago

@dorinclisu did you buy the android version of the infiray p2 pro and use this adapter to connect to your iphone?

im also a iphone user and want to use the infiray p2 pro with my iphone.

dorinclisu commented 1 year ago

I bought the iphone version as stocks arrived in EU, it works as expected.

Did not manage to try it on linux with this software yet, I need to buy an adapter like this https://www.amazon.com/Lightning-Adapter-Compatible-Charging-Connector/dp/B08X4SXDQX/ref=sr_1_3?keywords=lightning+female+to+usb+c+male+adapter&qid=1684167523&sr=8-3

Arnold1 commented 1 year ago

@dorinclisu please let me know if that adapter works to connect to that raspberry pi.

dorinclisu commented 1 year ago

So I tried the adapter and unfortunately it doesn't work.

I also coupled it with the inverse adapter (usb-c female to lightning male) to rule out any defects, and as it turns out the adapter is functional, but the P2 camera definitely needs some extra pins or circuitry that are normally not needed for basic lightning to usb conversion.

IMG_0363 IMG_0362 IMG_0361

Arnold1 commented 1 year ago

why is the connect to the computer not working? i also saw people connecting it to a raspberry pi - is that a different connection?

dorinclisu commented 1 year ago

Where did you see people connecting it to RPi? You probably saw the android variant being connected, not this one. As far as I can see, I'm the first one to try connect the ios variant to a usb and it doesn't work.

Arnold1 commented 1 year ago

@dorinclisu here: https://www.youtube.com/watch?v=JYp3dDWWEJ4 https://www.youtube.com/watch?v=2cKUCA-EBAo

dorinclisu commented 1 year ago

@dorinclisu here: https://www.youtube.com/watch?v=JYp3dDWWEJ4 https://www.youtube.com/watch?v=2cKUCA-EBAo

Are you aware of the fact P2 Pro comes in 2 variants or are you just a troll?

Arnold1 commented 1 year ago

@dorinclisu im aware that there are 2 version. what troll?