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

0 Members and 1 Guest are viewing this topic.

Offline tomas123

  • Frequent Contributor
  • **
  • Posts: 832
  • Country: de
Re: Question about FLIR One for Android
« Reply #275 on: December 08, 2016, 08:41:29 am »
the v4l kernel driver for raspberry pi is a pain.

Due to this post from G0MJW in november I replayed all steps but this end in a "insmod: ERROR: could not insert module /lib/modules/4.4.34/extra/v4l2loopback.ko: Unknown symbol in module".

I was right about there being something missing. The v412loopback driver. Installing this is Raspian is a bit of a trial. It required kernel headers, but no, not the ones that you can install from apt-get which are missing a build directory.

The headers are found from https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/

You need to know your kernel:

$ uname -a
Linux raspberrypi 4.4.21-v7+ #911 SMP Thu Sep 15 14:22:38 BST 2016 armv7l GNU/Linux

Download the appropriate headers and install with:
$ sudo dpkg -i /home/pi/linux-headers-4.4.21-v7+_4.4.21-v7+-2_armhf.deb

Its important to get the right ones, your world might end otherwise. Then you can download and make:

$ git clone https://github.com/umlaeute/v4l2loopback
$ cd v412loopback
$ sudo make    [I needed sudo - normally you don't]
$ sudo make install

But I has to insmod rather than modprobe, I am still thinking about that.

e.g. sudo insmod v4l2loopback/v4l2loopback.ko video_nr=0,1,2,3


here my steps on with clean raspberry pi installation
Code: [Select]
$ uname -a
Linux raspberrypi 4.4.34+ #930 Wed Nov 23 15:12:30 GMT 2016 armv6l GNU/Linux

[url]https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi[/url]
// linux-headers-4.4.34+_4.4.34+-2_armhf.deb
[url]https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-4.4.34%2B_4.4.34%2B-2_armhf.deb[/url]

$ sudo apt-get install bc

$ sudo dpkg -i linux-headers-4.4.34+_4.4.34+-2_armhf.deb
...
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/recordmcount
  HOSTCC  scripts/sortextable
make: Leaving directory '/usr/src/linux-headers-4.4.34+'
/var/lib/dpkg/info/linux-headers-4.4.34+.postinst: 1: /var/lib/dpkg/info/linux-headers-4.4.34+.postinst: dkms: not found

$ sudo apt-get install libv4l-dev

$ sudo apt-get install v4l2loopback-dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  dkms
Suggested packages:
  v4l2loopback-utils
The following NEW packages will be installed:
  dkms v4l2loopback-dkms
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 102 kB of archives.
After this operation, 462 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main dkms all 2.2.0.3-2 [70.9 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main v4l2loopback-dkms all 0.8.0-4 [31.2 kB]
Fetched 102 kB in 1s (98.6 kB/s)       
Selecting previously unselected package dkms.
(Reading database ... 50298 files and directories currently installed.)
Preparing to unpack .../dkms_2.2.0.3-2_all.deb ...
Unpacking dkms (2.2.0.3-2) ...
Selecting previously unselected package v4l2loopback-dkms.
Preparing to unpack .../v4l2loopback-dkms_0.8.0-4_all.deb ...
Unpacking v4l2loopback-dkms (0.8.0-4) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up dkms (2.2.0.3-2) ...
Setting up v4l2loopback-dkms (0.8.0-4) ...
Loading new v4l2loopback-0.8.0 DKMS files...
First Installation: checking all kernels...
dpkg: warning: version '*-*' has bad syntax: version number does not start with digit
It is likely that 4.4.34+ belongs to a chroot's host
Building initial module for 4.4.34+
Error! Bad return status for module build on kernel: 4.4.34+ (armv6l)
Consult /var/lib/dkms/v4l2loopback/0.8.0/build/make.log for more information.


$ dpkg --get-selections |grep v4l
libv4l-0:armhf install
libv4l-dev:armhf install
libv4l2rds0:armhf install
libv4lconvert0:armhf install
v4l-utils install
v4l2loopback-dkms install


$ git clone [url]https://github.com/umlaeute/v4l2loopback[/url]
Cloning into 'v4l2loopback'...
remote: Counting objects: 1561, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 1561 (delta 2), reused 0 (delta 0), pack-reused 1548
Receiving objects: 100% (1561/1561), 754.93 KiB | 542.00 KiB/s, done.
Resolving deltas: 100% (860/860), done.
Checking connectivity... done.

$ cd v4l2loopback/
pi@raspberrypi:~/v4l2loopback $ sudo make
Building v4l2-loopback driver...
make -C /lib/modules/`uname -r`/build M=/home/pi/v4l2loopback modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.34+'
  CC [M]  /home/pi/v4l2loopback/v4l2loopback.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/pi/v4l2loopback/v4l2loopback.mod.o
  LD [M]  /home/pi/v4l2loopback/v4l2loopback.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.4.34+'


$  sudo make install
make -C /lib/modules/`uname -r`/build M=/home/pi/v4l2loopback modules_install
make[1]: Entering directory '/usr/src/linux-headers-4.4.34+'
  INSTALL /home/pi/v4l2loopback/v4l2loopback.ko
  DEPMOD  4.4.34
make[1]: Leaving directory '/usr/src/linux-headers-4.4.34+'
depmod -a  `uname -r`

$ find / -name v4l2loopback.ko  2>/dev/zero
/lib/modules/4.4.34/extra/v4l2loopback.ko
/home/pi/v4l2loopback/v4l2loopback.ko

$ sudo insmod /lib/modules/4.4.34/extra/v4l2loopback.ko video_nr=0,1,2,3
insmod: ERROR: could not insert module /lib/modules/4.4.34/extra/v4l2loopback.ko: Unknown symbol in module



PS: If you get the error
"insmod: ERROR: could not insert module ./v4l2loopback.ko: Invalid module format"
than you loaded a wrong kernel header file (like linux-headers-4.4.34+_4.4.34+-2_armhf.deb  and linux-headers-4.4.34-v7+_4.4.34-v7+-2_armhf.deb   
« Last Edit: December 11, 2016, 04:38:07 pm by tomas123 »
 

Offline tomas123

  • Frequent Contributor
  • **
  • Posts: 832
  • Country: de
Re: Question about FLIR One for Android
« Reply #276 on: December 10, 2016, 03:32:51 pm »
I answer myself

...
But I has to insmod rather than modprobe, I am still thinking about that.

e.g. sudo insmod v4l2loopback/v4l2loopback.ko video_nr=0,1,2,3
Yes, modprobe doesn't work..
...but insmod doesn't load needed dependencies.

I found this
https://github.com/umlaeute/v4l2loopback/issues/94
Quote
umlaeute commented on 11 Aug 2015
the trick is that v4l2loopback needs the videodev module to be loaded.

make modprobe does that for you

alternatively, when installing the module, a call to depmod should resolve inter-module dependencies, so when you do modprobe v4l2loopback, the system already knows that it also needs to load videodev.

lets test it and preload the videodev.ko

Code: [Select]
pi@raspberrypi:~/v4l2loopback $ sudo insmod ./v4l2loopback.ko
insmod: ERROR: could not insert module ./v4l2loopback.ko: Unknown symbol in module

pi@raspberrypi:~/v4l2loopback $ sudo modprobe videodev

pi@raspberrypi:~/v4l2loopback $ sudo insmod ./v4l2loopback.ko

pi@raspberrypi:~/v4l2loopback $ lsmod
Module                  Size  Used by
v4l2loopback           26994  0
videodev              172779  1 v4l2loopback
media                  16312  1 videodev
...

v4l2loopback is succesfull loaded!!
Code: [Select]
$ ls /dev/video*
/dev/video0

Offline G0MJW

  • Regular Contributor
  • *
  • Posts: 51
  • Country: gb
  • Mike
    • G0MJW
Re: Question about FLIR One for Android
« Reply #277 on: December 11, 2016, 11:28:04 pm »
Well done! Now we need to get it automated.

Meanwhile, my ZnSe lens arrived which will be interesting for close ups.

Mike
Mike
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #278 on: January 17, 2017, 04:36:44 am »
Anybody yet managed to create a Windows EXE file which can access the FLIR One? I've just gotten my USB-A-male to MicroUSB-female adapter. I've plugged the FLIR One into the one end of the adapter, and the other end of the adapter into my Windows laptop.

Windows lists it in Device Manager as "USB Composite Device". As for VID and PID:
VID = 09CB
PID = 1996

I need either a driver that matches this VID and PID that can then be used with a variety of programs, or I need a program that can skip the use of a driver and instead use Windows API functions for raw-reading and raw-writing of data to the USB port.

Anybody here managed to make any progress on either of those (either the driver, or the program that directly communicates with the USB port)?
 

Offline tomas123

  • Frequent Contributor
  • **
  • Posts: 832
  • Country: de
Re: Question about FLIR One for Android
« Reply #279 on: January 17, 2017, 05:03:55 pm »
ask joe-c, he is working on a driver for Thermovision_JoeC ;)

joe-c Have you succeeded in connecting Flir One same as Seek Compact to PC ?
Connection yes, but not ready for stream.

i was able to read the Descriptors, write some data, but i can't get the FLIR into the Frame Stream mode.
tomas123 give me great help but sadly i had no success yet.
...

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #280 on: January 17, 2017, 05:54:51 pm »
ask joe-c, he is working on a driver for Thermovision_JoeC ;)

joe-c Have you succeeded in connecting Flir One same as Seek Compact to PC ?
Connection yes, but not ready for stream.

i was able to read the Descriptors, write some data, but i can't get the FLIR into the Frame Stream mode.
tomas123 give me great help but sadly i had no success yet.
...

I saw a LOT of people writing Linux code for it in this thread. I assumed some of the people doing that, might also have the knowhow to port that code to Windows, so that their program would work in Windows.
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #281 on: January 17, 2017, 09:50:07 pm »
Anybody? Please? I'm still looking for an EXE file for Windows, that is a port of the Linux application that already is shown on this thread. Anybody know how to make one for me? Or do you guys so exclusively use Linux, that you actually have no idea how to compile an EXE file for Windows?
 

Offline joe-c

  • Frequent Contributor
  • **
  • Posts: 350
  • Country: de
    • Joe-c.de
Re: Question about FLIR One for Android
« Reply #282 on: January 17, 2017, 10:37:38 pm »
Here is my latest playground.

Connection an reading the Descriptors was possible. But i cant get the EPs let deliver frames. But i have no time to play with it, i have more focus on my Thermal Expert.

but for anyone who wants to try, here is a C# Sample, ported from the Seek Thermal Program.
Workflow:
-Click on Button on top left "Connect and Stream"... with a connected FLIR ONE it should be green.
-Click on "Get 1 Frame (Bytearray)"
in the second step it goes to a infinite loop, because it don't work.
Use
Seekthermal.cs->FlirOneG2Class->public byte[] GetFrame_asBytes()
as entry point with the debugger.

good luck  :-/O
joe-c
Freeware Thermal Analysis Software: ThermoVision_Joe-C
Some Thermal cameras: Kameras
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #283 on: January 17, 2017, 11:41:26 pm »
Here is my latest playground.

Connection an reading the Descriptors was possible. But i cant get the EPs let deliver frames. But i have no time to play with it, i have more focus on my Thermal Expert.

but for anyone who wants to try, here is a C# Sample, ported from the Seek Thermal Program.
Workflow:
-Click on Button on top left "Connect and Stream"... with a connected FLIR ONE it should be green.
-Click on "Get 1 Frame (Bytearray)"
in the second step it goes to a infinite loop, because it don't work.
Use
Seekthermal.cs->FlirOneG2Class->public byte[] GetFrame_asBytes()
as entry point with the debugger.

good luck  :-/O
joe-c

Zadig can't find my FLIR One. When I plugged my FLIR One into my computer, Windows detected it as a "USB Composite Device". I can see that in Device Manager. Unfortunately, it does not appear in Zadig's list of USB devices. Is there an alternative method to install WinUSB for the FLIR One?
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #284 on: January 17, 2017, 11:45:11 pm »


Quote from: joe-c on September 21, 2016, 06:44:35 AM
Hey Guys,
I want to use the Flir One on Windows with .NET (like the Seek Thermal).
i was able to connect to the Flir One with Zadig Driver:
1. Plung in Flir One, the Device manager note "could not start"
2. install standard driver for "unknown device"
3. reinstall zadig for the unknown Device "Flir One Camera"
Now the Device could be found and accessed.

now I try to implant the initialization routine for linux, made by cynfab and tomas123. but i get no response on the Endpoints 0x81,0x83 and 0x85.
I don't know what I am doing wrong... :-//
Any suggestions?



joe-c Have you succeeded in connecting Flir One same as Seek Compact to PC ?

With my computer, it does not show up as "Unkown Device". Instead, at least on my PC, it shows up as "USB Composite Device". Unfortunately, the entry for "USB Composite Device" does not show up in Zadig's menu. Do you have an alternative method I can use to install WinUSB for the FLIR One on my PC that does not involve Zadig? Or maybe, is there a way to force Zadig to "see" it?
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #285 on: January 17, 2017, 11:58:35 pm »
Never mind. I figured it out. I had to disable the setting called "Ignore Hubs or Composite Parents" in Zadig, in order for it to find items called "USB Composite Device". After I did that, the FLIR One camera appeared in the Zadig device list, under the name "FLIR ONE Camera". I was then able to install the WinUSB driver for the FLIR One.


Now getting on with debugging Joe-C's program.
When I connect to the FLIR One, and then click the "Get 1 Frame (Bytearray)" button, it gives me an error that says "Not all data transferred". After that, in the "details" section of the error message, it says this:
Quote
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Exception: Not all data transferred
   at SeekThermal.WinUSBDevice.ControlTransferOut(Byte requestType, Byte request, UInt16 value, UInt16 index, Byte[] data) in d:\CloudStation\tech\Flir\FlirOne\FlirOneThermal_010 - NotWork\SeekThermal\SeekThermal.cs:line 2054
   at SeekThermal.FlirOneG2Class.GetFrame_asBytes() in d:\CloudStation\tech\Flir\FlirOne\FlirOneThermal_010 - NotWork\SeekThermal\SeekThermal.cs:line 680
   at SeekThermal_Form.MainForm.Btn_GetFrame_AsByteArrayClick(Object sender, EventArgs e) in d:\CloudStation\tech\Flir\FlirOne\FlirOneThermal_010 - NotWork\SeekThermal\MainForm.cs:line 191
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8745 (WinRel.050727-8700)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
FlirOneThermal
    Assembly Version: 1.0.6214.3154
    Win32 Version: 1.0.6214.3154
    CodeBase: file:///C:/Users/Ben%20Hutchinson/Desktop/FLIR%20One%20Test/FlirOneThermal.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8745 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8750 (QFE.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8745 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.8763 built by: WinRel
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8745 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8745 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

I hope somebody will find this useful in debugging Joe-C's program.
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #286 on: January 19, 2017, 08:08:12 pm »
Has anybody been able yet to fix Joe-C's software for connecting the FLIR One for Android to a Windows PC? He included his source so you can re-compile it if you can figure out what's wrong. To help to that end, I posted the entire error message details (see my post above this one) for the error that occurs when you try to just read a byte-array of raw data from the device with it. Yet there have been no followup posts by either Joe-C or any other members who have taken it upon themselves to try to fix the bug.

I'm really eager for this program to end up working. I've already bought a micro USB to standard USB adapter, and have used Zadig to install the WinUSB driver for FLIR One. So everything now is ready on my PC, except for the software that will actually interact with the FLIR One. I need somebody here to help get that software ready. Joe-C's software was written in C# (pronounced C Sharp), which is a programming language that I have no experience using. So I'm leaving it up to you guys to actually fix Joe-C's program.
 

Offline joe-c

  • Frequent Contributor
  • **
  • Posts: 350
  • Country: de
    • Joe-c.de
Re: Question about FLIR One for Android
« Reply #287 on: January 19, 2017, 09:05:11 pm »
This Test version has no real image acquisition inside, because I can't get the endpoints 0x83 and 0x85 talking.
I tried to reproduce the Linux code samples, but I guess, I make something wrong with the pipe handling.

The first step is get EP 0x85 deliver Frames.

I guess the Exception text above is just a follow-up from the not working transmission.
Freeware Thermal Analysis Software: ThermoVision_Joe-C
Some Thermal cameras: Kameras
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #288 on: January 19, 2017, 09:51:56 pm »
This Test version has no real image acquisition inside, because I can't get the endpoints 0x83 and 0x85 talking.
I tried to reproduce the Linux code samples, but I guess, I make something wrong with the pipe handling.

The first step is get EP 0x85 deliver Frames.

I guess the Exception text above is just a follow-up from the not working transmission.

You are using the WinUsb API functions, right? I happen to be using Visual Basic 6, and I believe I can use WinUsb in VB6, as well (no dot-net programming languages like C# are required for just using WinUsb). And I'm working on duplicating the basic parts of your project in VB6, but the problem is I haven't learned C#, so I don't know how to interpret all of the different parts of your program. I need to know how your program works at its most basic level, in order to port that functionality over to VB6 code.

My problem is figuring out how to send and receive raw data over USB.

My program does 2 things so far. It uses CreateFile to get a handle to the USB device itself (in this case the FLIR One), and then uses WinUsb_Initialize to get a handle to WinUsb (which I believe is a handle to the main interface of the USB device). Now that I have this handle, I should be able to read and write data to the FLIR One. However, I still need to figure out which WinUsb are used to read and write raw data to the USB port. I think I need to find something called "end points" in order to read and write, but I don't know how to find these "end points". What WinUsb functions do I need to use to find these "end points"?

Note that I've skipped the step of using the SetupDi functions in my program, and instead used RegEdit to search through the registry to find the symbolic device path that is needed to be used as the FileName in the CreateFile function. I have hardcoded this path into my program, so I don't need to worry about all of the extra mess that comes from using the SetupDi functions.
 

Offline joe-c

  • Frequent Contributor
  • **
  • Posts: 350
  • Country: de
    • Joe-c.de
Re: Question about FLIR One for Android
« Reply #289 on: January 20, 2017, 05:12:31 am »
Don't try to port my non working sample (and waste your time), better use the Linux sample in C, that was confirmed to work:
https://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg819493/#msg819493

additional its good to read the messages before and after this post.
Freeware Thermal Analysis Software: ThermoVision_Joe-C
Some Thermal cameras: Kameras
 

Offline gtoal

  • Newbie
  • Posts: 1
  • Country: us
Re: Question about FLIR One for Android
« Reply #290 on: January 25, 2017, 06:24:14 am »
Well done! Now we need to get it automated.

Casual readers like myself who have just ploughed through 22 pages of conversation looking for the code to install FlirOne (V2) support on your RPi, please don't use this until the regulars have checked it out and posted any fixes needed.  IT IS UNTESTED.

This is a very quick conversion of the two most recent linux posts into a shell script which generates the commands which I think the authors are saying are needed.  Being short a spare SD card at this particular moment, I haven't yet tried it out on a clean install (or otherwise) myself, so caveat emptor.

Code: [Select]
#!/bin/bash
KERNEL_VSN=`uname -a|tr ' ' '\n'|head -3|tail -1`
echo "#!/bin/sh"
echo "mv linux-headers-${KERNEL_VSN}_${KERNEL_VSN}-2_armhf.deb linux-headers-${KERNEL_VSN}_${KERNEL_VSN}-2_armhf.deb.PREV 2> /dev/null"
echo "wget [url]https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-[/url]${KERNEL_VSN}_${KERNEL_VSN}-2_armhf.deb"
echo "sudo apt-get --assume-yes install bc"
echo "sudo dpkg -i linux-headers-${KERNEL_VSN}_${KERNEL_VSN}-2_armhf.deb"
echo "sudo apt-get --assume-yes install libv4l-dev"
echo "sudo apt-get --assume-yes install v4l2loopback-dkms"
echo "dpkg --get-selections |grep v4l"
echo "git clone [url]https://github.com/umlaeute/v4l2loopback[/url]"
echo "cd v4l2loopback/"
echo "sudo make"
echo "sudo make install"
echo "find / -name v4l2loopback.ko  2>/dev/zero"
echo "sudo modprobe videodev"
echo "sudo insmod ./v4l2loopback.ko"
echo "# sudo insmod /lib/modules/${KERNEL_VSN}/extra/v4l2loopback.ko video_nr=0,1,2,3"
exit 0

offhand I wonder if git or dkpg come preinstalled on the rpi or if they will need to be installed with apt-get too? (not having a virgin system to hand I can't check that right now).  In any case maybe this quick script will provide the impetus for a proper installer to be created.

Graham
 

Offline Mohanad

  • Newbie
  • Posts: 1
  • Country: ae
Re: Question about FLIR One for Android
« Reply #291 on: January 25, 2017, 02:42:06 pm »
Hello

I'm trying to build an android app using the FLIR ONE SDK, but am facing some difficulties.

Is it possible to obtain an image with its temperature spread data ? the Raw Image? How?

And how can i get the correct code to extract the temperature at any point within the image.

Thanks
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #292 on: January 27, 2017, 03:28:09 am »
You know that FLIR One Linux program that was posted much earlier in this thread. Has anybody yet managed to port any of that Linux source code to Windows yet?
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #293 on: February 05, 2017, 05:38:03 am »
This thread has different versions of a linux program for working with the FLIR One over USB. They are presented a C source code in files like flir7h.c, flir8g.c, etc. What I can't figure out is which is the latest version of this program. I would like to attempt to port it to Windows, and want to make sure I'm working with the latest version.
 

Offline tomas123

  • Frequent Contributor
  • **
  • Posts: 832
  • Country: de
Re: Question about FLIR One for Android
« Reply #294 on: February 05, 2017, 01:45:57 pm »
There is no latest = best version  ;)

If you want to port it to windows, then keep it simple.
Ignore the v4l device and save thermal.jpg and real.jpg images:
https://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg839518/#msg839518

for v4l see this and the following post:
https://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg840976/#msg840976
« Last Edit: February 05, 2017, 01:51:22 pm by tomas123 »
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Question about FLIR One for Android
« Reply #295 on: February 09, 2017, 05:00:33 am »
There is no latest = best version  ;)

If you want to port it to windows, then keep it simple.
Ignore the v4l device and save thermal.jpg and real.jpg images:
https://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg839518/#msg839518

for v4l see this and the following post:
https://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg840976/#msg840976

I don't want to save just JPEG images. I want to access the 16-bits raw video data stream, but do it on Windows. It would seem that the V4L version is what's needed to access the raw streams (rather than just jpeg compressed images), but V4L is of course Video for Linux, and of course that doesn't work on Windows. I need a solution that combines the 2, and lets me access the raw 16bit-per-pixel thermal video stream from within Windows.

Anybody know how to do that?
 

Offline RTouris

  • Newbie
  • Posts: 5
  • Country: gr
Re: Question about FLIR One for Android
« Reply #296 on: February 09, 2017, 10:53:27 am »
Apologies for being OT but having not managed to find a specific answer to my somewhat peculiar question elsewhere I thought I'd post it here since it's next to the closest related (as well as heavily populated) thread.

So I have this FlirOne (v2) for iOS which I wonder if it is possible to use on an Android device via a ligthing to micro-usb adapter. I'd expect this to be somewhat possible (I'd expect that the internals are the same?) however having an Intel Atom tablet (Lenovo S8-50) I fail to get this to work using the app that Georg released (as outlined here: https://www.eevblog.com/forum/thermal-imaging/flir-one-gen-2-android-app-that-works-with-intel-atom-based-platforms/ ), being so that the native app won't even launch on the x86 android platform.

So I'm at a loss as to why I'm not getting any feedback seeing that F1G2 (Android) works on other x86 Android tablets, it is due to F1G2 being the iOS variant using it with an adapter or maybe because the particular tablet is somehow incompatible with the specific app? (Other USB OTG apps function properly on this particular tablet).

FYI. Tablet runs x86 Lollipop 5.0.1.
« Last Edit: February 09, 2017, 10:58:48 am by RTouris »
 

Online Fraser

  • Super Contributor
  • ***
  • Posts: 13165
  • Country: gb
Re: Question about FLIR One for Android
« Reply #297 on: February 09, 2017, 01:25:47 pm »
It has been previously reported that the iOS F1G2 will not work with an Android host using an adapter cable. I am no expert but I suspect the Apple ID chip that resides inside the iOS version causes the issue. Either that or the iOS port does not identify itself in the same way that a standard USB port does.

IIRC, someone eve. Tried tapping into the USB data lines after the Apple ID chip and it was still not recognised by a USB host.

Others may know more about this.

For info. I can run the official FLIR on my Motorola MOTO G Android phones that are using the ARM, but it will not run on a Hudl that is using the Atom processor. The app by Georg works well on the Moto G and the Hudl.

Fraser
If I have helped you please consider a donation : https://gofund.me/c86b0a2c
 

Offline RTouris

  • Newbie
  • Posts: 5
  • Country: gr
Re: Question about FLIR One for Android
« Reply #298 on: February 09, 2017, 05:16:23 pm »
Thanks for the insight, exactly the info I was looking for. I was aware of the native Flir app being unable to run on the Atom Android platform, so I thought I'd give Georg's app a spin on that Intel tablet only to bump into that other issue (iOS adapter on Android host). Oh well, I suppose it's kudos to Georg for releasing it for the iOS platform afterall :)  :-+
 

Offline tomas123

  • Frequent Contributor
  • **
  • Posts: 832
  • Country: de
Re: Question about FLIR One for Android
« Reply #299 on: February 10, 2017, 08:52:39 am »

I don't want to save just JPEG images. I want to access the 16-bits raw video data stream, but do it on Windows.
Anybody know how to do that?

Yes, I understand your problem, but there are two steps:
(1) USB communication with F1G2
(2) video stream in windows

I think, for solution of the first task the smaller jpg-version without  V4L part is a good entry point.
There is no Click-To-Run solution for compiling the linux code in windows.
Have fun  ;)


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf