Author Topic: Question about FLIR One for Android  (Read 173503 times)

0 Members and 2 Guests are viewing this topic.

Offline aund

  • Contributor
  • Posts: 8
  • Country: gb
Re: Question about FLIR One for Android
« Reply #475 on: May 16, 2020, 12:38:52 pm »
Ah thank you. When I switched the video ref in ffmpeg I can see the optical image.

So assuming I have the LT is it just a case of changing the right variables to match?

 

Offline Inflex

  • Regular Contributor
  • *
  • Posts: 141
  • Country: au
    • Charters Towers Phone & Computer Repairs
Re: Question about FLIR One for Android
« Reply #476 on: May 16, 2020, 12:40:05 pm »
Ah thank you. When I switched the video ref in ffmpeg I can see the optical image.
So assuming I have the LT is it just a case of changing the right variables to match?

Yes, it'll be a very small output frame (80x60 + 8 at the bottom if you want the text, and only 13 characters).
Magicsmoke abuser | What I repair daily on YouTube | FlexBV
- BoardView
| Paul Daniels
 
The following users thanked this post: aund

Offline aund

  • Contributor
  • Posts: 8
  • Country: gb
Re: Question about FLIR One for Android
« Reply #477 on: May 17, 2020, 01:28:39 pm »
It is indeed the LT model.

I've tried a few things now to get up and running

1) Changing the VIDEO_DEVICE2 resolutions to match

Code: [Select]
#define VIDEO_DEVICE2 "/dev/video3" // colorized thermal image
#define FRAME_WIDTH2  80
#define FRAME_HEIGHT2 60

This yields the attached pic which is my hand (just legible). I don't have extreme frost byte so I think the colour range is off somewhere.  There are various hard coded references to what I assume is fixed height and width through the code (i.e. 160, 120  & 128).

2) I've tried changes all references of 160 -> 80, 120 -> 60 & 128 - > 64. This is obviously quite a bad stab in the dark which shows how little I understand of how the image is put together and unsurprisingly just results in errors when trying to run.

I think I'm a little of of my depth so I'm going to see if I can get my hands on the non LT model instead.

Thanks again for all your help.

 

Offline Inflex

  • Regular Contributor
  • *
  • Posts: 141
  • Country: au
    • Charters Towers Phone & Computer Repairs
Re: Question about FLIR One for Android
« Reply #478 on: May 17, 2020, 01:57:53 pm »
Hello Aund,

   I'm just cleaning up the workshop and then I'll come back and have a look at the IR data block that you sent through last night; did you want to send me a copy of your code that you're using and I'll try see if I can spot something obvious (or attach it here, just the main C file)
Magicsmoke abuser | What I repair daily on YouTube | FlexBV
- BoardView
| Paul Daniels
 

Offline aund

  • Contributor
  • Posts: 8
  • Country: gb
Re: Question about FLIR One for Android
« Reply #479 on: May 17, 2020, 02:17:11 pm »
Here you go - thanks!

Do you need an updated frame dump with the new resolutions in place? I did try that but ffmpeg now errors with "[video4linux2,v4l2 @ 0x23ad2b0] ioctl(VIDIOC_G_FMT): Invalid argument
/dev/video3: Invalid argument" when I put the framedump code in place, so it's commented out for now.
 

Offline Inflex

  • Regular Contributor
  • *
  • Posts: 141
  • Country: au
    • Charters Towers Phone & Computer Repairs
Re: Question about FLIR One for Android
« Reply #480 on: May 17, 2020, 04:29:07 pm »
Here you go - thanks!

   All good - just getting in late now (02H28) after cleaning up in the workshop, I'll have a look at the code in the morning.

Paul.

Magicsmoke abuser | What I repair daily on YouTube | FlexBV
- BoardView
| Paul Daniels
 

Offline Mowj

  • Newbie
  • Posts: 1
  • Country: ir
Re: Question about FLIR One for Android
« Reply #481 on: May 19, 2020, 04:36:00 pm »
I want to thank all those who shared information on FLIR One here. It really made my work possible. I would also like to share some more info that I gained about the usb software interface. Some (most?) of the info below are repeated from the previous posts for the sake of completeness.

All messages are preceded by a header.
All headers are comprised of 32-bit words in little-endian order.
Headers of config endpoints have 4 words, those of file endpoints have 6 words, and those of frame endpoints are 7 words.
The first word is always the magic number (0x1cc for config, 0x5510 for file, 0xbeef for frame).
The second word appears to be always one. I'm still not sure about its meaning.
The third word is always the payload (message) size in bytes.
The last word is always the CRC-32 of all but the last word of header with the following parameters (this is the conventional CRC-32):
Polynomial: 0x04C11DB7,  Init: 0xFFFFFFFF,  Reflect Input: true,  Reflect Output: true,  XOR Output: 0xFFFFFFFF

For file headers:
The fourth word is the stream identifier.
The fifth word is the conventional CRC-32 of the file itself.

For frame headers:
The fourth word is the size of thermal image.
The fifth word is the size of visual (jpeg) image.
The sixth word is the size of status string.

After issuing a command to the config endpoint, you can query it for a response.
For commands of type 'setOption', the response is of type 'setOptionStatus' and indicates the new value of the option (-1 if the option does not exist).
For commands of type 'openFile', the response is of type 'openFileStatus' and indicates the stream identifier of the opened file. The stream identifier is essentially the return value of the fopen function. Negative values indicate different error codes. Non-negative values could be used by a readFile command to read the opened file.
Analysis of the sdk binary reveals that there are also 'reboot' and 'upgradeFirmware' commands with corresponding responses 'rebootStatus' and 'upgradeFirmwareStatus'. But I haven't worked out the required arguments for these commands.
« Last Edit: May 26, 2020, 06:18:35 am by Mowj »
 

Offline da-nie

  • Contributor
  • Posts: 44
  • Country: ru
Re: Question about FLIR One for Android
« Reply #482 on: May 20, 2020, 05:36:26 pm »
I created new Flir One Gen 2 control programm for Linux.

Programm used Qt5 and libusb (Run through "sudo" if you do not have sufficient user rights.).


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf