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

0 Members and 1 Guest are viewing this topic.

Offline careyer

  • Newbie
  • Posts: 8
  • Country: de
Re: Question about FLIR One for Android
« Reply #450 on: May 28, 2018, 08:17:42 am »
@da-nie: Looks awesome!  :clap: What are you planning to do with it?

I tinkered all weekend with the flir8 driver for linux. However I wasn't able to alter it in the way needed and compile it. I am stuck.  :-BROKE
 

Offline da-nie

  • Contributor
  • Posts: 44
  • Country: ru
Re: Question about FLIR One for Android
« Reply #451 on: May 28, 2018, 02:29:18 pm »
Quote
What are you planning to do with it?

I want to make a night vision device. :)
 

Offline alromh87

  • Newbie
  • Posts: 1
  • Country: mx
Re: Question about FLIR One for Android
« Reply #452 on: September 11, 2018, 04:10:23 am »
@careyer Hello I got interested in your proyect and it could be of some use for me, I do lots of programming and electronics so I dont think It would be a problem to help you with small changes in software:

manual FFC
change color palette

Unfurtunately I don't have much time right now, so if you could point me to the right information would be very apreciated, same goes for EZ-Wifibroadcast.

In the mean time I'm building this USB sniffer to get needed packages and put them into the driver:
https://blog.gimx.fr/a-beagleboard-xm-based-usb-sniffer/

Hope to hear from you soon.

I like using github so I would like to put code there if its still ok with after tomas123 & cynfab
« Last Edit: September 11, 2018, 04:19:05 am by alromh87 »
 
The following users thanked this post: careyer

Offline careyer

  • Newbie
  • Posts: 8
  • Country: de
Re: Question about FLIR One for Android
« Reply #453 on: September 14, 2018, 01:16:54 pm »
@alromh87 : You have a PM :-+
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2682
  • Country: de
Re: Question about FLIR One for Android
« Reply #454 on: October 01, 2018, 10:51:27 am »
@da-nie: I have a FlirOne G2 for Android that's dead. I haven't taken a proper look at why yet, but I may end up building something like you show here. Do you have a webpage where all this is summarised, or is the thread the only source for your work?

McBryce.
30 Years making cars more difficult to repair.
 

Offline da-nie

  • Contributor
  • Posts: 44
  • Country: ru
Re: Question about FLIR One for Android
« Reply #455 on: October 01, 2018, 04:51:03 pm »
I write on different forums and update the results.
The program with lepton-3 and stm32 is updated on https://github.com/da-nie/STM32F407VGT6AndFlirLepton3
 

Offline reddypragnya

  • Newbie
  • Posts: 2
  • Country: in
Re: Question about FLIR One for Android
« Reply #456 on: February 17, 2019, 03:05:06 pm »
if any one is struggling with building of kernel headers,
Find the kernel version by
uname -a.
And build the kernel as instructed in rasbian site :  https://www.raspberrypi.org/documentation/linux/kernel/building.md
« Last Edit: February 21, 2019, 05:29:13 am by reddypragnya »
 

Offline dROb

  • Newbie
  • Posts: 1
  • Country: ru
Re: Question about FLIR One for Android
« Reply #457 on: February 22, 2019, 07:51:38 am »
Guys, sorry my question is a bit off the main subject, but..

I am going to have an old Flir One for iPhone. I will be using it with Raspberry - the main intention is to get the Lepton from there and interface it over SPI. But at the mean time it is interesting to use it as a complete device. But, unfortunately I will have IOS version. So the question is - can I interface the IOS version from Raspberry? I have seen the post in this thread, that says connecting IOS version to Andoid does not work. I think this is not my case, so would it work with Raspberry?
 

Offline a1b2c3d4e5f6

  • Newbie
  • Posts: 1
  • Country: au
Re: Question about FLIR One for Android
« Reply #458 on: March 20, 2019, 10:33:25 am »
Does anyone know if its possible to access both thermal and visible cameras independently on the Flir Duo using linux OS, e.g. ubuntu or rpi. I need to get two connections like /dev/video0 and /dev/video1 to make it work with another app.

Regards a
 

Offline da-nie

  • Contributor
  • Posts: 44
  • Country: ru
Re: Question about FLIR One for Android
« Reply #459 on: March 22, 2019, 07:32:41 am »
You need to write the driver yourself. Ready probably not.
 

Offline reddypragnya

  • Newbie
  • Posts: 2
  • Country: in
Re: Question about FLIR One for Android
« Reply #460 on: April 26, 2019, 08:01:58 am »
I have been trying to make modifications in flir8p1.c code and make executable file to run. But i have been unable to do so. I am using codeblock to run edit and run the c code. The errors notified are header files to be added which i did by downloading them from github and other sources. But then again it shows error of unable to find certain syntax in jconfig.h. 
Seems like it is bout the header files, please help.
 

Offline gusisin

  • Newbie
  • Posts: 2
  • Country: gb
Re: Question about FLIR One for Android
« Reply #461 on: July 09, 2019, 11:52:36 am »
Tomas, Firstly THANK YOU!!!! the work you have done on the FLIR cameras is amazing. I have been playing with your code and when I process the raw data it seems that the temperature slop is a little off. As I understand it (from my Lepton SPI experiences the raw data from the sensor is Deg Kelvin * 100. So to convert to Deg C is

Raw temp - 273.15 = Deg C.

Using a laser spot meter I get the following

Measured temp (Laser)                             Two Byte raw value               Kelvin                     Centigrade
                                                  (seems to be missing some resolution)
         20.5                                                             3387                            338.7                            64
          0 (Ice)                                                         2236                            223.6                           -50
         37.2 (my mouth :-)                                       3757                            375.7                            101 :'(

As I understand it the raw values come in in two bytes an LSByte and an MSByte. I downloaded the SDK for android to check and sure enough to convert raw to Celsius is (raw/100) -273.15.

When you were testing did you find any issues with the values? When I use my flie one pro on my phone the spot meter is spot on.

Can you help with an idea?

Thanks
Gus
 

Offline gusisin

  • Newbie
  • Posts: 2
  • Country: gb
FLIR one pro new part number IR problem
« Reply #462 on: April 11, 2020, 07:06:45 am »
@tomas123 and all,
I think FLIR are fighting back.

I am building an application for search and rescue that uses two Flir one pro devices connected to a single raspberry pi. I have it working and its great. There is however a new issue.

When I use the device part number 435-0007-01 (made in China) all is wonderful both visible and IR images show as expected. When I then use cameras with the part number 435-0013-03 (made in Estonia) the visible is still fine and the IT displays as what I think looks like a random memory segment.

In a test I connected one of each and displayed the images so you can see what I mean. when I run an lsusb -v against both devices the output and endpoints are identical. I suspect that it might be a timing issue does anyone have an idea??

Thanks in advance

Gus
 

Offline aund

  • Newbie
  • Posts: 9
  • Country: gb
Re: Question about FLIR One for Android
« Reply #463 on: May 15, 2020, 04:34:03 pm »
Hi @gusisin

Having the same issue with an RPI4 and the Flirone Pro LT part no - 435-0013-03 M/N 0013, (although mine's is made in China).

Did you manage to get anywhere with yours? I'm going to try an RPI3 and see if I fair any better.
 

Offline Inflex

  • Regular Contributor
  • *
  • Posts: 166
  • Country: au
    • Charters Towers Phone & Computer Repairs
Re: Question about FLIR One for Android
« Reply #464 on: May 16, 2020, 05:55:09 am »
@aund

Any chance you can save the bulk transfer data to a file for analysis?

Looks like at the start it's got some typical header, and then interestingly a continuous colour palette band, before it turns in to the noise.
Magicsmoke abuser | What I repair daily on YouTube | FlexBV
- BoardView
| Paul Daniels
 

Offline aund

  • Newbie
  • Posts: 9
  • Country: gb
Re: Question about FLIR One for Android
« Reply #465 on: May 16, 2020, 08:31:14 am »
Thanks for replying Inflex. Unfortunately following a reboot on two different devices I'm getting the following when trying to start ffmpeg on both

Code: [Select]
ffmpeg -f video4linux2 -i /dev/video3 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.0.131:1234

results in

Code: [Select]
[video4linux2,v4l2 @ 0x14822b0] ioctl(VIDIOC_G_FMT): Invalid argument
/dev/video3: Invalid argument



The v4l2loopback module is loaded and I can see the 3 video devices created.

Can you give me a steer on how to do the bulk transfer and once I've resolved the above I'll upload the file.

Thanks!
 

Offline Inflex

  • Regular Contributor
  • *
  • Posts: 166
  • Country: au
    • Charters Towers Phone & Computer Repairs
Re: Question about FLIR One for Android
« Reply #466 on: May 16, 2020, 08:54:39 am »
Sounds like your V4L2 device names have moved around.

What does the following command give you?

   v4l2-ctl --list-devices


I'm not sure which source code you're using, but you might have to tweak/change it to suite the new v4l2 loopback numbers?

Thanks for replying Inflex. Unfortunately following a reboot on two different devices I'm getting the following when trying to s
Code: [Select]
[video4linux2,v4l2 @ 0x14822b0] ioctl(VIDIOC_G_FMT): Invalid argument
/dev/video3: Invalid argument


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

Offline aund

  • Newbie
  • Posts: 9
  • Country: gb
Re: Question about FLIR One for Android
« Reply #467 on: May 16, 2020, 09:23:11 am »
Thanks - got it fixed - I just needed to power cycle the camera - doh!

Can you give me a steer on how to do the bulk transfer and once I've resolved the above I'll upload the file.

Cheers
 

Offline Inflex

  • Regular Contributor
  • *
  • Posts: 166
  • Country: au
    • Charters Towers Phone & Computer Repairs
Re: Question about FLIR One for Android
« Reply #468 on: May 16, 2020, 09:49:35 am »
Thanks - got it fixed - I just needed to power cycle the camera - doh!

Can you give me a steer on how to do the bulk transfer and once I've resolved the above I'll upload the file.

Cheers

You could try something like the following added in ( the last block is the block to add, the other bits of code are for you to know where roughly to add it :)



Code: [Select]
uint32_t FrameSize   = g->buf85[ 8] + (g->buf85[ 9] << 8) + (g->buf85[10] << 16) + (g->buf85[11] << 24);
uint32_t ThermalSize = g->buf85[12] + (g->buf85[13] << 8) + (g->buf85[14] << 16) + (g->buf85[15] << 24);
uint32_t JpgSize     = g->buf85[16] + (g->buf85[17] << 8) + (g->buf85[18] << 16) + (g->buf85[19] << 24);
uint32_t StatusSize  = g->buf85[20] + (g->buf85[21] << 8) + (g->buf85[22] << 16) + (g->buf85[23] << 24);

if ( (FrameSize+28) > (g->buf85pointer) ) {
// wait for next chunk
//
return 0;
}

        //  Write a framesize block of code to a file called frame.data
        //
{
int fo;
fo = open("frame.data", O_CREAT, O_WRONLY);
if (fo) {
write(fo, g->buf85, FrameSize );
close(fo);
}
}
Magicsmoke abuser | What I repair daily on YouTube | FlexBV
- BoardView
| Paul Daniels
 
The following users thanked this post: aund

Offline Inflex

  • Regular Contributor
  • *
  • Posts: 166
  • Country: au
    • Charters Towers Phone & Computer Repairs
Re: Question about FLIR One for Android
« Reply #469 on: May 16, 2020, 09:52:24 am »
I should note, you probably want to kill this with ctrl-c in the middle of it running so that it can dump a working frame and hopefully it'll be the right size :)
Magicsmoke abuser | What I repair daily on YouTube | FlexBV
- BoardView
| Paul Daniels
 

Offline aund

  • Newbie
  • Posts: 9
  • Country: gb
Re: Question about FLIR One for Android
« Reply #470 on: May 16, 2020, 12:10:39 pm »
Thanks again Inflex.

Unfortunately the frame.data file size is 0. I haven't touched c in about 20 years but I think the buf85 object isn't being written to the file for some reason.

This is what I added into flir8p1.c

Code: [Select]
  uint32_t StatusSize  = buf85[20] + (buf85[21] << 8) + (buf85[22] << 16) + (buf85[23] << 24);

  printf("FrameSize= %d (+28=%d), ThermalSize %d, JPG %d, StatusSize %d, Pointer %d\n",FrameSize,FrameSize+28, ThermalSize, JpgSize,StatusSize,buf85pointer);

  if ( (FrameSize+28) > (buf85pointer) )
  {
    // wait for next chunk
    return;
  }

  // Write a framsize block of code to a file called frame.data
  //
  {
        int fo;
        fo = open("frame.data", O_CREAT, O_WRONLY);
        if (fo) {
                printf("Frame size is: %d\n", FrameSize);
                printf("Buffer is: %d\n", buf85);
                write(fo, buf85, FrameSize );
                close(fo);
                }
        }

  int i,v;
  // get a full frame, first print the status
  t1=t2;


and this is what I got out

Code: [Select]
Frame size is: 80412
Buffer is: 148308
FrameSize= 80540 (+28=80568), ThermalSize 10332, JPG 70040, StatusSize 168, Pointer 28
FrameSize= 80540 (+28=80568), ThermalSize 10332, JPG 70040, StatusSize 168, Pointer 10360
FrameSize= 80540 (+28=80568), ThermalSize 10332, JPG 70040, StatusSize 168, Pointer 80568
Frame size is: 80540
Buffer is: 148308
FrameSize= 80683 (+28=80711), ThermalSize 10332, JPG 70184, StatusSize 167, Pointer 28
FrameSize= 80683 (+28=80711), ThermalSize 10332, JPG 70184, StatusSize 167, Pointer 10360
FrameSize= 80683 (+28=80711), ThermalSize 10332, JPG 70184, StatusSize 167, Pointer 80711
Frame size is: 80683
Buffer is: 148308
FrameSize= 80484 (+28=80512), ThermalSize 10332, JPG 69984, StatusSize 168, Pointer 28
FrameSize= 80484 (+28=80512), ThermalSize 10332, JPG 69984, StatusSize 168, Pointer 10360
^C
root@raspberrypi:/home/pi/temp/flir8p1-gpl# ls -lrt frame.data
---------x 1 root root 0 May 16 12:45 frame.data

 

Offline Inflex

  • Regular Contributor
  • *
  • Posts: 166
  • Country: au
    • Charters Towers Phone & Computer Repairs
Re: Question about FLIR One for Android
« Reply #471 on: May 16, 2020, 12:14:29 pm »
My bad, the open() call is slightly wrong, should have been;

fo = open("frame.data", O_CREAT|O_WRONLY, 0644);
Magicsmoke abuser | What I repair daily on YouTube | FlexBV
- BoardView
| Paul Daniels
 
The following users thanked this post: aund

Offline aund

  • Newbie
  • Posts: 9
  • Country: gb
Re: Question about FLIR One for Android
« Reply #472 on: May 16, 2020, 12:23:18 pm »
Awesome,

Got some data now

 

Offline Inflex

  • Regular Contributor
  • *
  • Posts: 166
  • Country: au
    • Charters Towers Phone & Computer Repairs
Re: Question about FLIR One for Android
« Reply #473 on: May 16, 2020, 12:23:37 pm »
Quote
FrameSize= 80540 (+28=80568), ThermalSize 10332, JPG 70040, StatusSize 168, Pointer 28

Just hit me... what's the chance you've been supplied the LT version with 80x60 sensor?

PRO 160x120 version has a 160|4|160|4 row structure for the IR, but yours will be 160|4 byte only, and with 10332 bytes for the sensor, that makes 63 rows of data, perfect fit :\
« Last Edit: May 16, 2020, 12:25:08 pm by Inflex »
Magicsmoke abuser | What I repair daily on YouTube | FlexBV
- BoardView
| Paul Daniels
 

Offline Inflex

  • Regular Contributor
  • *
  • Posts: 166
  • Country: au
    • Charters Towers Phone & Computer Repairs
Re: Question about FLIR One for Android
« Reply #474 on: May 16, 2020, 12:34:34 pm »
Just extracted the JPEG frame out, so the data is good; I haven't however loaded the IR data in to my interpreter yet but I'd say that is what's happened, you've got the LT version.
Magicsmoke abuser | What I repair daily on YouTube | FlexBV
- BoardView
| Paul Daniels
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf