LeoDJ / P2Pro-Viewer

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

Question: Are you able to see Serial Number, Chip ID or something unique? #11

Closed crashedapp closed 1 year ago

crashedapp commented 1 year ago

I see you have a get device info call that looks like it returns the following below: Can you tell me if you have been able to get any values for the SN "Serial Number?". Got a couple of these on the way and wondering if I can uniquely identify them. class DeviceInfoType(enum.IntEnum): DEV_INFO_CHIP_ID = 0 DEV_INFO_FW_COMPILE_DATE = 1 DEV_INFO_DEV_QUALIFICATION = 2 DEV_INFO_IR_INFO = 3 DEV_INFO_PROJECT_INFO = 4 DEV_INFO_FW_BUILD_VERSION_INFO = 5 DEV_INFO_GET_PN = 6 DEV_INFO_GET_SN = 7 DEV_INFO_GET_SENSOR_ID = 8

LeoDJ commented 1 year ago

Yes, the camera has a serial number that can be read out. The official P2 Pro Android app does show the serial number of the camera and it looks unique.

The get_device_info function currently has the problem that it'll only read the chip id, no matter what device info parameter you pass. But it's probably just a byte order problem. I'll fix it later today / in the coming days.

But in principle it works, yes.

LeoDJ commented 1 year ago

I fixed the problem, now I could read out the serial number of my P2 Pro using: cam_cmd.get_device_info(P2Pro_CMD.DeviceInfoType.DEV_INFO_GET_SN)