Question about FLIR One for Android - Page 1
Forum section: electronics / general

author: Ben321
author_rank: Frequent Contributor
timestamp: October 04, 2015, 03:12:39 am
content: Now that FLIR has finally released it (not just for pre-sale anymore), has anybody managed to make a USB driver for Windows for it yet? I remember with the Seek Thermal imager, somebody managed to (after connecting it to their PC's USB port, via a USB-A to micro-USB cable) create Windows drivers for it, so that it was usable on the PC as a webcam. Has anybody yet managed to do the same thing with the FLIR One for Android, which (like the Seek Thermal) has a micro-USB connector on it?

author: Ben321
author_rank: Frequent Contributor
timestamp: October 05, 2015, 12:02:50 am
content: 50 views and no replies? I think there was an entire thread, several pages long, regarding 3rd party drivers for the Seek Thermal imager. I'd think this would be a hot topic, but nobody has replied yet. I'd think somebody would be trying to accomplish the same thing with the FLIR One for Android, but there seems to be little interest, as evidenced by the fact that this thread is on the second page of the Test Equipment section, and yet has no replies (other than the one I'm posting now, for the purpose of putting it back on the first page).

author: encryptededdy
author_rank: Frequent Contributor
timestamp: October 05, 2015, 01:40:42 am
content: I think due to the use of a Lepton sensor, those who are interesting in integrating thermal imaging into some kind of product or for some kind of static PC-connected setup are just waiting for FLIR to officially release the Lepton 3 for sale. We already know PureEngineering/GroupGets has their hands on a Lepton 3 module and developed a USB <-> Lepton 3 interface board.https://vine.co/v/edPq5ZD9aO7Also I can't see much use in connecting the FLIR One Gen 2 to a PC... with the Seek we could use it to increase image quality, fix the gradient, and get raw data out. However with the FLIR One I doubt there's much to be improved on in terms of IQ (due to FLIR's already heavy image processing done in-module) and it also saves radiometric JPEGs with full raw data.

author: Ben321
author_rank: Frequent Contributor
timestamp: October 05, 2015, 05:53:52 am
content: Quote from: encryptededdy on October 05, 2015, 01:40:42 amEven so, for those who want a simple way of doing it, without soldering (as you would need to do with the USB interface board you have been speaking of), having an already existing module (like the FLIR One for Android) would be a great thing. Also, you can get raw, unprocessed thermal image, if you create your own reverse engineered driver for the FLIR One for Android on the PC. And I want that raw, unprocessed data, and I don't want to have to use a soldered project board (like the one you were talking about) to do it. Using a PC driver created from info gathered by reverse engineering it the FLIR One for Android, I would be able to use an already assembled thermal module, that costs very little money, and requires absolutely ZERO soldering, in order to capture true thermal images. So consider this thread a request to all reverse engineers out there, to get on with reverse engineering the FLIR One for Android, so that I will be able to use it ultimately as a thermal webcam for doing all kinds of fun experiments.One of the things about using the official software on an Android device is that it resizes the thermal image prior to embedding it in a JPEG. You see, the "FLIR One for Android"'s actual output is a 160x120 thermal image that comes out of the USB port, and is then processes by the FLIR One app on an Android device. Part of the processing is to interpolate the 160x120 thermal raw pixels to a 320x240 image. This interpolation is done prior to saving in the radiometric JPEG file, but it is done by the app, NOT by the microcontroller in the "FLIR One for Android" hardware (or at least I hope that's the case). If you can reverse engineer the USB communication protocol used by the FLIR One for Android, and then write your own driver for it for a PC, you SHOULD be able to access the truly RAW (160x120) thermal pixels data stream from the device. As nice as it is to have an image that is bigger than 160x120, doubling the resolution to 320x240 is in effect falsifying scientific data, meaning that it's basically useless for anything other than taking thermal pictures for fun. At this point, saving it as a thermometric JPEG image (as if the data was scientifically valid) is a quite deceptive practice. It give the false impression that the data is actually useful for measuring real temperatures. It is not. It only gives you APPROXIMATE temperatures (which any true scientist would laugh at).But if I can access (via PC drivers, created through reverse engineering), the actual 160x120 raw thermal image data, I will have my hands on actual usable scientific data. And I will be guarantied that the temperatures calculated from this data are completely accurate.And by the way, I've never heard of a Lepton 3. I haven't even heard of a Lepton 2. I've just heard of a Lepton, and that the new version with double the horizontal and vertical resolution (160x120, instead of 80x60) is still just called the Lepton. FLIR does not seem to number its newer versions of cores. I can't find any official naming of the Lepton 3 on FLIR's website.

author: encryptededdy
author_rank: Frequent Contributor
timestamp: October 05, 2015, 06:25:17 am
content: Lepton 2 is the 80x60 one we currently have access to. Lepton 3 is the new 160x120 one. They appear to be just internal FLIR names, so you won't find them on the FLIR website. Seethisdocument.At least groupget's previous breakout boards were all sold pre-soldered and ready to use. See:https://groupgets.com/manufacturers/groupgets-labs/products/flir-lepton-breakout-board-v1-4Here is the full datasheet for Lepton 3:http://media.wix.com/ugd/53cdb6_5191be73d1c943d78d2e1a095cb7f3b8.pdfAccording to that, the Lepton 3 does output 160x120 data over voSPI (page 38), so the upscaling must be done in the app or the hardware of the FLIR One.To be honest, I don't understand your issue with the upscaling. While it's true that native resolution data is the most optimal, if we consider the issues with sharpness on the Lepton's lens (see the FLIR One G2 actual resolution thread) making the sensor only resolve details similarly to a ~120x90 sensor (even though the sensor really is 160x120) and the fact that the Lepton's temperature accuracy is ±2 degrees C, I doubt the upscaling makes any appreciable difference to the observed accuracy of the temperature readings.

author: Ben321
author_rank: Frequent Contributor
timestamp: October 05, 2015, 06:30:22 am
content: Quote from: encryptededdy on October 05, 2015, 06:25:17 amDo you have the software programming skills needed to write a driver for me, that will let me use a FLIR One for Android as a webcam on my PC? If so, please write this driver for me. I have no interest in building a thermal webcam from scratch, by soldering together a project board like the one mentioned in an above post. It should ideally be a VFW (video for windows) driver, as I have recently discovered how to control webcams in Visual Basic 6, using VFW drivers.

author: encryptededdy
author_rank: Frequent Contributor
timestamp: October 05, 2015, 06:48:06 am
content: I literally just said that no soldering is required (at least for the previous boards they've shipped).I don't have a skills to write a driver, and I also don't have access to the FLIR One gen 2 at this time.I think your best bet is to wait until Groupgets release their USB interface board. I'm sure it will come with sample software that you can use.

author: Ben321
author_rank: Frequent Contributor
timestamp: October 06, 2015, 04:04:51 am
content: Quote from: encryptededdy on October 05, 2015, 06:48:06 amAs far as I know, the only Lepton chip being sold as a separate component is the old one with 80x60 resolution. The new one with 160x120 resolution is not yet being sold to the public, and is only found inside gen-2 FLIR One units. Are you aware of any plans FLIR has to sell the new Lepton chip as a separate component?

author: tomas123
author_rank: Frequent Contributor
timestamp: October 06, 2015, 05:11:32 pm
content: Quote from: Ben321 on October 05, 2015, 12:02:50 amThe only reason why there is no discussion, is the lack of a Flir One G2 camera.In Germany no trader can deliver this part.The combination of a thermal camera with an automatic shutter and a real camera is a nice feature for robotics, spy cams and another hacker toys.You can download the Flir One SDK and study the interesting docs and the code sample.There is a precompiled flir library for Arm7 CPU. This is the only part which needs reverse engineeringUntil now we only know the similar USB announcements from Flir and Seek cameras (iAP Interface)see my post herehttps://www.eevblog.com/forum/testgear/new-flir-products/msg750352/#msg750352

author: Ben321
author_rank: Frequent Contributor
timestamp: October 07, 2015, 03:11:03 am
content: Quote from: tomas123 on October 06, 2015, 05:11:32 pmBut there's lots of other discussion of FLIR products here, why not a lot about the FLIR One version2? I believe it can be sold in Germany too, by the way. It is only 9 frames per second, which means that it is not prevented from being sold outside the USA by ITAR. Besides, there's lots of people on these forums from many places in the world, including the USA.If I buy one of these FLIR One for Android units for $250, I won't want to have to buy a separate chip (another $150) plus a project board in order to use it on a PC. I will want to use one unit (the one I spent $250 for) to be able to work on both the PC and android. So that's why I want to see some reverse engineering project going on regarding the FLIR One for Android.

author: tomas123
author_rank: Frequent Contributor
timestamp: October 07, 2015, 10:12:53 am
content: Quote from: Ben321 on October 07, 2015, 03:11:03 amYes, it's shipped from Flir UK to Germany. But if I want a regular bill with germany VAT then I need a germany Flir distributor.Flir moved the deliver date to the germany distributors from end of september to november.

author: cynfab
author_rank: Regular Contributor
timestamp: October 07, 2015, 01:53:06 pm
content: There is some RE going on, just not as obvious as in the early E4 and Seek days.Attached is a annotated dump of the first few seconds of usb activity between a F1G2 and the F1 Android app.It's not finished.There may be inaccuracies.There is much more to uncover.This is a long way from a stand alone PC program.Your mileage may vary.blah, blah, blah.

author: tomas123
author_rank: Frequent Contributor
timestamp: October 07, 2015, 10:43:06 pm
content: very interstingHow do you got the datas from a android handy?

author: cynfab
author_rank: Regular Contributor
timestamp: October 07, 2015, 10:47:17 pm
content: I used my handy USB analyzer in series with the F1 and my tablet running F1 app.

author: cynfab
author_rank: Regular Contributor
timestamp: October 07, 2015, 10:57:20 pm
content: Guess I can't add a picture after the fact...

author: tomas123
author_rank: Frequent Contributor
timestamp: October 07, 2015, 11:06:57 pm
content: Thank you, but which nice hardware is this? (altium is a PCB design software)

author: cynfab
author_rank: Regular Contributor
timestamp: October 07, 2015, 11:26:01 pm
content: Sorry, forgot to add the link:http://openvizsla.org/Part of a KickStarter campaign, took many years to get the hardware, but it finally arrived, and works too!Though it does take a bit of fiddling, and there is no nice GUI.

author: tomas123
author_rank: Frequent Contributor
timestamp: October 08, 2015, 09:49:30 am
content: really nice hardwareas you posted herehttps://www.eevblog.com/forum/testgear/new-flir-products/msg752703/#msg752703it's possible to run the Flir Tools under Chrome with ARChonI succesfull tested it!!That's great, because the Flir Apps don't run under Android Studio because there is a precompiled library libflirsdk.so for armeabi-v7a.There is is same problem with the Flir One SDK.Unfortunately as yet I haven't a Flir One Android and can't test it: (I'm waiting for delivery).It is possible to greb the USB traffic between camera and app (under Chrome+ARChon) with a "normal" windows usb sniffer (like sysinternals etc)?ARChon doesn't support the USB PortPS:https://developer.chrome.com/apps/getstarted_arcQuote

author: Fraser
author_rank: Super Contributor
timestamp: October 08, 2015, 12:26:05 pm
content: I received my replacement F1G2 this week. From my conversations with Bill Terre, VP FLIR, it is apparent that demand has far outstripped supply of this little camera. FLIR were not expecting such initial demand for the unit. This is good news as it will hopefully lead to a healthy user base and community support.It is obvious from FLIRs invitation to developers to create new apps that they wish to encourage product development in many areas. It would be worth registering as a developer on the FLIR ONE web site as this gives access to the SDK, developer documentation and the community forum.I can foresee the development of applications that run on Windows, Linux, Android etc.If FLIR really want to 'own' this market segment they may be willing to provide developer information for cross platform use.Bill Terre is VP, GM and OEM market development so an email to him may gain a useful response. Bill is a gentleman and he has been very friendly and helpful to me in recent communications. Great chap.I have been looking at the cheap Android TV boxes this week to see if they would run the FLIR ONE app. They are really just an ARM based computer and many will run most Android apps with a keyboard and mouse. They have a suitable USB port so should work. The issue will be processor power. Most TV boxes use older ARMtechnology, such as ARM 5 or 7.not great for the FLIR ONE app.For those unaware, the FLIR ONE Android app was developed on a Samsung S5 and FLIR expect users to use similar powerful hardware. The S5 runs its modern processor at 2.5 GHz.IMHO, the F1G2 should be considered a very reasonably priced thermal imaging building block. I see no reason to limit its use to just phones and tablets running Android. With a ZnSe close up lens it would make a cheap PCB thermal profiling camera. It could be run on a micro USB cable from a desktop host.I am hopeful that the F1G2 will become a ground breaking camera that is embraced by the maker community. FLIR will likely release the LEPTON 3 as a part once the demand for the F1G2 can be met.In the mean time FLIR are looking at placing thermal camera technology into all manner of test products. I have seen the new clamp meter and expect to see a thermal camera equipped multimeter in the future. The LEPTON is so small that it may be incorporated into many devices. Thermal imaging for the masses is coming. The F1G2 could become the VW Beetle of thermal cameras.Fraser

author: Balaur
author_rank: Unknown
timestamp: October 08, 2015, 03:47:01 pm
content: Bummer, I've just received a mail from the eBay seller where I've ordered the Flir One. According to this message, FLIR announced that they had a huge (and unexpected?) success with this product and will not be able to meet the promised delivery times. (Apparently more than 2 million devices have been pre-ordered)Shipments originally expected on Sep 30 have now a delay of 6 to 8 weeks and will be rationed (fairly?).

author: Bud
author_rank: Super Contributor
timestamp: October 08, 2015, 04:19:36 pm
content: And because of Flir's creepy practice to phone home (will this nice feature be embedded into the SDK?), it is a good time fo Flir to get a better "home" server to handle the increased volume of data.

author: cynfab
author_rank: Regular Contributor
timestamp: October 08, 2015, 04:50:35 pm
content: Fraser,My F1G2 works well on the Hardkernel XU4,at < $US100, with an octa core processor, it's quite snappy with the F1 app. Runs Android or one of several flavours of Linux.I am a Flir Registered dev. and have their SDK. So far, only Android, and it is a bit fiddly to get working.I have been able to build the sample app, and although they say it will run on Android 4.x, my 4.4.2 tablet refuses to load it.My 5.1.1 tablet loads & runs it, but it crashes. I need to get adb over wifi working again so I can see what's going on.I think that there are some files missing from the built .apk file, but I need some time to play with it some more.

author: tomas123
author_rank: Frequent Contributor
timestamp: November 11, 2015, 05:01:54 pm
content: Quote from: cynfab on October 07, 2015, 01:53:06 pmHi cynfab,you dumped the usb traffic.I wrote here and in the following posts some nice details about the Flir One SDK app.https://www.eevblog.com/forum/testgear/actual-resolution-of-flir-one-v2/msg797214/#msg797214The SDK contain a compiled modul flironesdk.aar with a system library libjnidevicewrapper.so and a classes.jarWith classes.jar we get some interesting details about the USB protocol like the endpoint numbers.Code:package com.flir.flironesdk.usb;import android.hardware.usb.UsbDevice;import android.hardware.usb.UsbDeviceConnection;import android.hardware.usb.UsbEndpoint;import android.hardware.usb.UsbInterface;import android.hardware.usb.UsbRequest;import android.util.Log;import java.io.Closeable;import java.nio.ByteBuffer;import java.util.HashMap;import java.util.HashSet;import java.util.Map.Entry;public class UsbCommunicatorimplements Closeable{private boolean IS_SIMULATED;private Delegate mDelegate;private volatile UsbDeviceConnection connection;private static final String LOG_TAG = "UsbCommunicator";private static final int SET_INTERFACE = 11;private static final int CTRL_TRANSFER_TIMEOUT = 200;static final int FRAME_READ_ENDPOINT_ID = 5;static final int CONFIG_READ_ENDPOINT_ID = 1;static final int CONFIG_WRITE_ENDPOINT_ID = 2;static final int FILEIO_READ_ENDPOINT_ID = 3;static final int FILEIO_WRITE_ENDPOINT_ID = 4;static final int SUPPORTED_VENDOR_ID = 2507;static final int SUPPORTED_PRODUCT_ID = 6550;private UsbEndpoint configWriteEndpoint;public static abstract interface Delegate{public abstract void onDataReceived(byte[] paramArrayOfByte, UsbCommunicator.ProtocolType paramProtocolType);public abstract void onCommunicationAvailabilityChange(boolean paramBoolean);}public static enum ProtocolType{CONFIGURATION((byte)1), FILEIO((byte)2), FRAME((byte)4);private final byte value;private ProtocolType(byte value){this.value = value;}byte getValue(){return this.value;}}private UsbEndpoint fileioWriteEndpoint = null;final UsbRequest frameReadRequest = new UsbRequest();final UsbRequest fileioReadRequest = new UsbRequest();final UsbRequest configReadRequest = new UsbRequest();private UsbDevice mDevice;volatile boolean connected = false;volatile boolean expectFrameData = false;volatile boolean expectFileData = false;public static boolean deviceIsValid(UsbDevice device){try{validateDevice(device);return true;}catch (Exception e){Log.e("UsbCommunicator", "Invalid device: " + e.getMessage());}return false;}public static void validateDevice(UsbDevice device)throws Exception{if (device.getVendorId() != 2507) {throw new Exception("Unsupported USB Vendor ID of " + Integer.toHexString(device.getVendorId()));}if (device.getProductId() != 6550) {throw new Exception("Unsupported USB Product ID of " + Integer.toHexString(device.getProductId()));}int ifaceCount = device.getInterfaceCount();HashMap<Integer, Boolean> inEndpointsFound = new HashMap();HashMap<Integer, Boolean> outEndpointsFound = new HashMap();inEndpointsFound.put(Integer.valueOf(3), Boolean.valueOf(false));inEndpointsFound.put(Integer.valueOf(1), Boolean.valueOf(false));inEndpointsFound.put(Integer.valueOf(5), Boolean.valueOf(false));outEndpointsFound.put(Integer.valueOf(2), Boolean.valueOf(false));outEndpointsFound.put(Integer.valueOf(4), Boolean.valueOf(false));UsbInterface iface;for (int i = 0; i < ifaceCount; i++){iface = device.getInterface(i);int endpointCount = iface.getEndpointCount();for (int e = 0; e < endpointCount; e++){UsbEndpoint ep = iface.getEndpoint(e);if (ep.getDirection() == 128) {inEndpointsFound.put(Integer.valueOf(ep.getEndpointNumber()), Boolean.valueOf(true));} else {outEndpointsFound.put(Integer.valueOf(ep.getEndpointNumber()), Boolean.valueOf(true));}}}HashSet<Map.Entry<Integer, Boolean>> allEndpointsFound = new HashSet();allEndpointsFound.addAll(inEndpointsFound.entrySet());allEndpointsFound.addAll(outEndpointsFound.entrySet());for (Map.Entry<Integer, Boolean> endpoint : allEndpointsFound) {if (!((Boolean)endpoint.getValue()).booleanValue()) {throw new Exception("Unable to communicate with USB device, endpoint " + ((Integer)endpoint.getKey()).toString() + " not found");}}}public UsbCommunicator(UsbDevice device, UsbDeviceConnection usbConnection, Delegate delegate)throws Exception{validateDevice(device);this.mDelegate = delegate;this.connection = usbConnection;this.mDevice = device;int ifaceCount = device.getInterfaceCount();for (int i = 0; i < ifaceCount; i++){UsbInterface iface = device.getInterface(i);if (false == this.connection.claimInterface(iface, false)){Log.e("UsbCommunicator", "Unable to claim interface " + iface.getId() + ", close connection and try again.");delegate.onCommunicationAvailabilityChange(false);throw new Exception("Unable to claim USB interface");}int endpointCount = iface.getEndpointCount();for (int e = 0; e < endpointCount; e++){UsbEndpoint ep = iface.getEndpoint(e);if (ep.getDirection() == 128) {switch (ep.getEndpointNumber()){case 5:this.frameReadRequest.initialize(this.connection, ep);break;case 1:this.configReadRequest.initialize(this.connection, ep);break;case 3:this.fileioReadRequest.initialize(this.connection, ep);break;case 2:case 4:default:Log.w("UsbCommunicator", "Unknown USB_DIR_IN Endpoint on device!");break;}} else {switch (ep.getEndpointNumber()){case 2:this.configWriteEndpoint = ep;break;case 4:this.fileioWriteEndpoint = ep;break;default:Log.w("UsbCommunicator", "Unknown USB_DIR_OUT Endpoint on device!");}}}}if (this.fileioWriteEndpoint != null){stopCommunication(ProtocolType.FRAME);stopCommunication(ProtocolType.FILEIO);}else{delegate.onCommunicationAvailabilityChange(false);}}final int CONFIG_BUFFER_SIZE = 4096;final int FRAME_BUFFER_SIZE = 131072;final int FILE_BUFFER_SIZE = 1048576;final ByteBuffer configBuffer = ByteBuffer.allocate(4096);final ByteBuffer frameBuffer = ByteBuffer.allocate(131072);final ByteBuffer fileBuffer = ByteBuffer.allocate(1048576);private void pollEndpoints(){new Thread(new Runnable(){public void run(){Log.d("configReadRequest", "Starting configReadRequest poll loop...");UsbCommunicator.this.configReadRequest.queue(UsbCommunicator.this.configBuffer, 4096);while (UsbCommunicator.this.connected){UsbRequest requestResult = UsbCommunicator.this.connection.requestWait();synchronized (UsbCommunicator.this.configReadRequest){if (!UsbCommunicator.this.connected) {break;}if (requestResult == UsbCommunicator.this.configReadRequest){byte[] data = new byte[UsbCommunicator.this.configBuffer.position()];UsbCommunicator.this.configBuffer.flip();UsbCommunicator.this.configBuffer.get(data);if (data.length > 0) {UsbCommunicator.this.mDelegate.onDataReceived(data, UsbCommunicator.ProtocolType.CONFIGURATION);}UsbCommunicator.this.configBuffer.clear();UsbCommunicator.this.configReadRequest.queue(UsbCommunicator.this.configBuffer, 4096);}else if (requestResult == UsbCommunicator.this.frameReadRequest){byte[] data = new byte[UsbCommunicator.this.frameBuffer.position()];UsbCommunicator.this.frameBuffer.flip();UsbCommunicator.this.frameBuffer.get(data);if (data.length > 0) {UsbCommunicator.this.mDelegate.onDataReceived(data, UsbCommunicator.ProtocolType.FRAME);}if (UsbCommunicator.this.expectFrameData) {UsbCommunicator.this.frameReadRequest.queue(UsbCommunicator.this.frameBuffer, 131072);}UsbCommunicator.this.frameBuffer.clear();}else if (requestResult == UsbCommunicator.this.fileioReadRequest){byte[] data = new byte[UsbCommunicator.this.fileBuffer.position()];UsbCommunicator.this.fileBuffer.flip();UsbCommunicator.this.fileBuffer.get(data);UsbCommunicator.this.mDelegate.onDataReceived(data, UsbCommunicator.ProtocolType.FILEIO);UsbCommunicator.this.fileBuffer.clear();if (UsbCommunicator.this.expectFileData) {UsbCommunicator.this.fileioReadRequest.queue(UsbCommunicator.this.fileBuffer, 1048576);}}}}}}).start();}public UsbCommunicator(Delegate usbDelegate){Log.i("UsbCommunicator", "Simulated device constructor");this.mDelegate = usbDelegate;this.IS_SIMULATED = true;}private void sendData(UsbEndpoint ep, byte[] data, int length){Log.d("UsbCommunicator", "Sending " + length + " bytes on EP" + ep.getEndpointNumber());synchronized (this.connection){int offset = 0;while (offset < length){int result = this.connection.bulkTransfer(ep, data, offset, length - offset, 500);if (result > 0){Log.d("UsbCommunicator", "Bulk transfer sent " + result + " bytes on Endpoint " + ep.getEndpointNumber());offset += result;}else{Log.w("UsbCommunicator", "Bulk Transfer Failed on Endpoint " + ep.getEndpointNumber());}}}}native void sendConfigDataToSimulatedDevice(byte[] paramArrayOfByte);public void sendDataToDevice(byte[] data, ProtocolType protocolType){if (this.IS_SIMULATED){switch (protocolType){case CONFIGURATION:sendConfigDataToSimulatedDevice(data);break;}}else{UsbEndpoint destinationEndpoint;UsbEndpoint destinationEndpoint;switch (protocolType){case CONFIGURATION:destinationEndpoint = this.configWriteEndpoint;break;case FILEIO:destinationEndpoint = this.fileioWriteEndpoint;break;default:Log.w("UsbCommunicator", "Attempted to send data on knosupported protocol!"); return;}UsbEndpoint destinationEndpoint;sendData(destinationEndpoint, data, data.length);}}public void sendConfigData(byte[] data){sendDataToDevice(data, ProtocolType.CONFIGURATION);}public void sendFileioData(byte[] data){sendDataToDevice(data, ProtocolType.FILEIO);}public void close(){if (this.connected){pause();this.connection.close();this.mDelegate.onCommunicationAvailabilityChange(false);Log.d("UsbCommunicator", "Connection closed.");}}public void pause(){if (this.connected){synchronized (this.configReadRequest){stopFrames();stopCommunication(ProtocolType.FILEIO);this.connected = false;this.configReadRequest.cancel();this.configBuffer.clear();this.fileioReadRequest.cancel();this.frameReadRequest.cancel();}this.mDelegate.onCommunicationAvailabilityChange(false);}}private void startFrames(){startCommunication(ProtocolType.FRAME);}private void stopFrames(){stopCommunication(ProtocolType.FRAME);}private void startCommunication(ProtocolType protocolType){toggleCommunication(protocolType, true);}private void stopCommunication(ProtocolType protocolType){toggleCommunication(protocolType, false);}private void toggleCommunication(ProtocolType protocolType, boolean startCommunication){if (this.IS_SIMULATED == true) {return;}switch (protocolType){case FRAME:int interfaceNumber = 2;this.expectFrameData = startCommunication;this.frameBuffer.clear();if (this.expectFrameData) {this.frameReadRequest.queue(this.frameBuffer, 131072);}break;case FILEIO:int interfaceNumber = 1;this.expectFileData = startCommunication;this.fileBuffer.clear();if (this.expectFileData) {this.fileioReadRequest.queue(this.fileBuffer, 1048576);}break;case CONFIGURATION:Log.w("UsbCommunicator", "Configuration Protocol cannot be started or stopped.");default:return;}int interfaceNumber;int altSetting = startCommunication ? 1 : 0;synchronized (this.connection){int result = this.connection.controlTransfer(1, 11, altSetting, interfaceNumber, null, 0, 200);Log.d("UsbCommunicator", "Result from control transfer: " + result);}}public void connect(){if (!this.connected){this.connected = true;this.mDelegate.onCommunicationAvailabilityChange(true);startCommunication(ProtocolType.FILEIO);pollEndpoints();}}}

author: cynfab
author_rank: Regular Contributor
timestamp: November 11, 2015, 06:05:33 pm
content: Thanks for that,I've been tied up with other projects,I was able to recompile the example app from the sdk, but it just crashed on the 2 tablets I use for the Flir ONE, I was a bit disappointed, till you posted about the cropping issues. So I tried your recompilation, and found it did the same thing. I then tried it on my Odroid XU4, and it works just fine!. So I believe that there is a performance issue with the Example App and if your phone/tablet doesn't have the horsepower it just crashes.I'll take a look at what you just posted as soon as I cand find some time....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: November 12, 2015, 09:23:33 pm
content: Quote from: cynfab on November 11, 2015, 06:05:33 pmI compiled also against the old SDK 1.0.1 ( FLIROneSDK-Android-1_0_1.zip )there is newer versionQuoteThe file size of system library libjnidevicewrapper.so is shrinked from 33MB to 16MBtry it

author: tomas123
author_rank: Frequent Contributor
timestamp: November 13, 2015, 01:21:25 pm
content: Quote from: cynfab on November 11, 2015, 06:05:33 pmI think you are the only one, who testing the Flir SDK.Here you can download a working SDK sample with the extracted java.class (see my post above)see path FLIROneSDKBundle\FLIRONEExampleApplication\app\src\main\java\com\flir\flironesdk\usbhave funhttp://www.file-upload.net/download-11040066/FLIROneSDKBundle04-Basis.zip.html

author: tomas123
author_rank: Frequent Contributor
timestamp: November 18, 2015, 12:39:38 pm
content: Quote from: cynfab on October 07, 2015, 01:53:06 pmHi cynfab,with knowledge of "FLIROneSDKBundle\FLIRONEExampleApplication\app\src\main\java\com\flir\flironesdk\usb\UsbCommunicator.java" I'm played around with your nice usb dump file F6c.txt and found some interesting strings in your hex bytes:Code:>awk "{for(i=1; i <=NF; i=i+1) {tmp=sprintf (\"%s \",\"0x\"$(i)); printf \"%c\", strtonum(tmp) }}" F6c.txt > strings.txt>strings -n 7 strings.txtSysinternals - [url=http://www.sysinternals.com]www.sysinternals.comFLIR ONE CameraFLIR SystemsFLIRONEF0XXX200SBIBDP ConfigurationiAP Interfacecom.flir.rosebud.fileiocom.flir.rosebud.frame{"type":"sledInformation","data":{"serialNumberBoard":"F03XXX00571","partNumberBoard":"21200160201","versionBoard":"C","serialNumberLepton":"355692","versionLepton":"3.1.45","leptonQR":"A0355692","versionRosebudFactoryESW":"0.4.25","versionRosebudOperationalESW":"0.4.26","versionRosebudUpdaterESW":"0.4.26","versionRosebudAPI":"master.26498f5","gitRevision":"master.26498f5","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatinwpgMode":"operational"}}{"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}{"type":"readFile","data":{"streamIdentifier":10}}/CameraFiles/system/calib.rsc/CameraFiles/system/maps/ds_we_ap_fi_le_LCFMap.fff/CameraFiles/system/maps/ds_we_ap_fi_leExFOL2_LCFMap.fff/CameraFiles/system/calib.rscPK/CameraFiles/system/maps/ds_we_ap_fi_le_LCFMap.fffPK/CameraFiles/system/maps/ds_we_ap_fi_leExFOL2_LCFMap.fffPK{"type":"readFile","data":{"streamIdentifier":10}}{"type":"setOption","data":{"option":"autoFFC","value":true}}{"type":"setOptionStatus","data":{"option":"autoFFC","value":-1}}Unfortunately your dump stops from that moment where the interesting parts begins:The see some configurations of the F1 device(configWriteEndpoint) and the begin of the streaming of frames (frameReadRequest) it has not started yetCode:FLIROneSDKBundle\FLIRONEExampleApplication\app\src\main\java\com\flir\flironesdk\usb\UsbCommunicator.java...for ( int e = 0 ; e < endpointCount; e++){UsbEndpoint ep = iface.getEndpoint(e);if (ep.getDirection() == 128) { // readswitch (ep.getEndpointNumber()){case 5: // FRAME_READ_ENDPOINT_IDthis.frameReadRequest .initialize(this. connection, ep);break;case 1:this.configReadRequest .initialize(this. connection, ep);break;case 3:this.fileioReadRequest .initialize(this. connection, ep); // final UsbRequest fileioReadRequest = new UsbRequest();break;case 2:case 4:default:Log. w("UsbCommunicator", "Unknown USB_DIR_IN Endpoint on device!");break;}} else { // writeswitch (ep.getEndpointNumber()){case 2:this.configWriteEndpoint = ep;break;case 4:this.fileioWriteEndpoint = ep;break;default:Log. w("UsbCommunicator", "Unknown USB_DIR_OUT Endpoint on device!");}}Furthermore I have only bad USB programmer skills.I can't find this known Read/Write Endpoint Addresses in your dump:edit: found itCode:Call to address 78 endpoint 1:[ ] 3.233349 d= 0.000001 [191.7 + 12.633] [ 3] IN : 78.1list of Endpoint AddressesCode:# lsusb -v -d 09cb:1996 | grep bEndpointAddressiInterface 5 iAP InterfacebEndpointAddress 0x81 EP 1 INbEndpointAddress 0x02 EP 2 OUTiInterface 6 com.flir.rosebud.fileiobEndpointAddress 0x83 EP 3 INbEndpointAddress 0x04 EP 4 OUTiInterface 7 com.flir.rosebud.framebEndpointAddress 0x85 EP 5 INbEndpointAddress 0x06 EP 6 OUTcompared lsusb with UsbCommunicator.java I understand the relations between EndpointNumbers and InterfaceNumbers:Code:static final int CONFIG_READ_ENDPOINT_ID = 1 ;static final int CONFIG_WRITE_ENDPOINT_ID = 2 ;static final int FILEIO_READ_ENDPOINT_ID = 3 ;static final int FILEIO_WRITE_ENDPOINT_ID = 4 ;static final int FRAME_READ_ENDPOINT_ID = 5 ;Can you please give ussome more outputfrom your nice protocoll snifferto see the full handshake until the stream begin? FRAME_READ_ENDPOINT_ID = 5You debug snippet only grep EndPoint 1,2 (configuration) and 3 (file transfer of CameraFiles.zip, see magic bytes "PK"):Code:>grep ": 78\." F6c.txtIN : 78.0IN : 78.1OUT : 78.2IN : 78.3

author: cynfab
author_rank: Regular Contributor
timestamp: November 18, 2015, 03:19:18 pm
content: thomas123,Sorry I haven't kept you up to date on my disassembly of the usb stream. It is sort of on the back burner while I'm fiddling with the SDK.Reading the SDK decompiled code is very interesting too, and I hope to tie it and the usb dump together someday.But until then, here is a somewhat more annotated version of the dump....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: November 18, 2015, 10:17:41 pm
content: great, a complete handshake until transfer of first raw imageCode:$ gawk -bniord '{for(i=1; i <=NF; i=i+1) {tmp=sprintf ("%s ","0x"$(i)); printf "%c", strtonum(tmp)}}' F6d.txt | strings -n 7{"type":"sledInformation","data":{"serialNumberBoard":"F03xxx00571","partNumberBoard":"21200160201","versionBoard":"C","serialNumberLepton":"355692","versionLepton":"3.1.45","leptonQR":"A0355692","versionRosebudFactoryESW":"0.4.25","versionRosebudOperationalESW":"0.4.26","versionRosebudUpdaterESW":"0.4.26","versionRosebudAPI":"master.26498f5","gitRevision":"master.26498f5","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatinwpgMode":"operational"}}{"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}{"type":"readFile","data":{"streamIdentifier":10}}// comment: strings inside CameraFiles.zip:/CameraFiles/system/calib.rsc/CameraFiles/system/maps/ds_we_ap_fi_le_LCFMap.fff/CameraFiles/system/maps/ds_we_ap_fi_leExFOL2_LCFMap.fff/CameraFiles/system/calib.rscPK/CameraFiles/system/maps/ds_we_ap_fi_le_LCFMap.fffPK/CameraFiles/system/maps/ds_we_ap_fi_leExFOL2_LCFMap.fffPK{"type":"readFile","data":{"streamIdentifier":10}}{"type":"setOption","data":{"option":"autoFFC","value":true}}{"type":"setOptionStatus","data":{"option":"autoFFC","value":-1}}{"type":"setOption","data":{"option":"autoFFC","value":true}}{"type":"setOptionStatus","data":{"option":"autoFFC","value":true}}now comes the first raw frame on endpoint 5Code:[ ] 21.637696 d= 0.000001 [ 12.5 + 2.967] [ 3] IN : 89.5[ ] 21.637697 d= 0.000000 [ 12.5 + 3.467]  DATA0: ef be 00 00 01 00 00 00 19 25 02 00 ac 9b 00 00 c8 88 01 00 a5 00 00 00 16 bb 99 10 00 50 7e 7c 9f 09 98 09 b7 09 c8 09 c6 09 c5 09 d4 09 d6 09 de 09 ee 09 ee 09 ff 09 02 0a 09 0a 1b 0a 0a 0a 1f 0a 29 0a 22 0a 29 0a 29 0a 33 0a 2b 0a 39 0a 2f 0a 40 0a 37 0a 40 0a 53 0a 48 0a 47 0a 49 0a 57 0a 53 0a 55 0a 5c 0a 57 0a 5c 0a 5e 0a 6e 0a 6a 0a 6d 0a 67 0a 71 0a 73 0a 67 0a 6f 0a 6d 0a 76 0a 72 0a 6c 0a 77 0a 76 0a 7c 0a 77 0a 77 0a 7a 0a 76 0a 77 0a 7e 0a 82 0a 7e 0a 8d 0a 88 0a 8d 0a 8e 0a 85 0a 7c 0a 8f 0a 8f 0a 8b 0a 82 0a 85 0a 8c 0a 8d 0a 93 0a 8c 0a 7c 0a 8e 0a 91 0a 01 00 a6 66 94 0a 8b 0a 8e 0a 95 0a 8c 0a 93 0a 8b 0a 9a 0a 91 0a 8c 0a 89 0a 8f 0a 8b 0a 8e 0a 99 0a 8b 0a 8b 0a 8a 0a 84 0a 90 0a 82 0a 8b 0a 82 0a 83 0a 83 0a 81 0a 85 0a 75 0a 80 0a 76 0a 73 0a 83 0a 74 0a 81 0a 7d 0a 72 0a 6a 0a 65 0a 75 0a 6c 0a 63 0a 71 0a 67 0a 61 0a 65 0a 5f 0a 61 0a 60 0a 5d 0a 55 0a 55 0a 56 0a 48 0a 46 0a 3f 0a 36 0a 41 0a 42 0a 27 0a 2d 0a 22 0a 2c 0a 31 0a 25 0a 1c 0a 27 0a 18 0a 1c 0a 1a 0a 17 0a 14 0a 06 0a fc 09 f8 09 0b 0a f2 09 eb 09 e7 09 dc 09 d6 09 02 00 f8 6c b2 09 c1 09 cc 09 d0 09 cd 09 da 09 e3 09 f2 09 f1 09 03 0a 04 0a 0b 0a 09 0a 17 0a 23 0a 1a 0a 30 0a 38 0a 37 0a 38 0a 35 0a 43 0a 39 0a 43 0a 41 0a 4b 0a 4c 0a 46 0a 50 0a 4c 0a 56 0a 57 0a 59 0a 6c 0a 6f 0a 5d 0a 6b 0a 66 0a 6a 0a 71 0a 71 0a 77 0a 7d 0a 7f 0a 77 0a 7b 0a 7b 0a 79 0a 82 0a 86 0a 80 0a 7a 0a 7d 0a 88 0a 7e 0a 7f 0a 84 0a 86 0a 89 0a 84 0a 8c 0a 87 0a 87 0a 96 0a 96 0a 95 0a 8c 0a 99 0a 8a 0a 9b 0a 8f 0a 8c 0a 96 0a 92 0a 88 0a 9f 0a 8e a2515 Bytes are short, but it looks that the lines are 164 (160+4) Byte long, as described here (after a header ef be 00 00 01 00 00 00... ):Quote from: tomas123 on November 10, 2015, 12:44:04 pm

author: tomas123
author_rank: Frequent Contributor
timestamp: November 19, 2015, 10:10:34 am
content: a note about the crop factorthe start process of "regular" Flir One App (from play store):(1) copy the simulator config fileCameraFiles.zipto folder \Android\data\com.flir.flirone\files\(2) decompress it to folder \Android\data\com.flir.flirone\files\CameraFiles(3) try to open the USB Flir One(4) copy from Flir One Device his CameraFiles.zip to \Android\data\com.flir.flirone\files\(5) decompress it to folder \Android\data\com.flir.flirone\files\CameraFilesWith step (5) the simulator config file.\CameraFiles\system\calib.rscwith "uncropped full resolution" is changed with calib.rsc from Flir One withmagnQuote>1.The crop factor switch in calib.rsc of simulator device:Code:.calib.visual.fusion.leExFOL2.magnQuote double 0.calib.visual.fusion.leExFOL2.magnQuoteComp double 0The crop factor switch in calib.rsc of real Flir One device:Code:.calib.visual.fusion.leExFOL2.magnQuote double 1.2312108.calib.visual.fusion.leExFOL2.magnQuoteComp double 0160/1.2312108=130,0

author: tomas123
author_rank: Frequent Contributor
timestamp: November 19, 2015, 08:29:31 pm
content: Quote from: cynfab on November 18, 2015, 03:19:18 pmthe simplest way to defeat the crop factor is comment out the line 213 inflironesdk/Device.javaCode://FrameProcessor.updateCameraFiles(zis, cachedContext.getFilesDir().getAbsolutePath() + File.separator);now the sdk used the CameraFiles (extracted default_camera_files.zip) from simulator withmagnQuote=0The next step is to edit the calib.rsc in the CameraFiles.zip from your real FlirOne and replace it in the SDK file system with default_camera_files.zip.Code:./app/src/main/res/raw/default_camera_files.zipDon't forget to edit the crc32 (see E4 thread)As I wrote herehttps://www.eevblog.com/forum/testgear/question-about-flir-one-for-android/msg803459/#msg803459the Flir One App from play store stored your CameraFiles.zip in the public path Environment.getDataDirectory()Code:\Android\data\com.flir.flirone\files\CameraFilesHere you can grep the fileUnfortunately the SDK stores the file to getFilesDir()Code:/data/data/com.flir.flironeexampleapplication/files/CameraFilesYou need a rootet device to read this pathseehttp://stackoverflow.com/questions/21230629/getfilesdir-vs-environment-getdatadirectoryQuote

author: cynfab
author_rank: Regular Contributor
timestamp: November 19, 2015, 09:57:02 pm
content: But you could also change the storage path code in FrameProcessor.javaCode:private FrameProcessor(Context context){this.emissivity = EMISSIVITY_SKIN; // was DEFAULT ie.0.95F kmString storagePath = context.getFilesDir().getAbsolutePath() + File.separator;cameraFilesPath = storagePath + "CameraFiles";Boolean cameraFilesExists = Boolean.valueOf(new File(cameraFilesPath).exists());InputStream defaultCameraFilesInput = context.getApplicationContext().getResources().openRawResource(R.raw.default_camera_files);ZipInputStream zis = new ZipInputStream(new BufferedInputStream(defaultCameraFilesInput));updateCameraFiles(zis, storagePath);setupAppCore(cameraFilesPath);}So that it wasn't stored in a root protected path.

author: tomas123
author_rank: Frequent Contributor
timestamp: November 20, 2015, 12:42:36 am
content: of coursea note:the crop factor inside calib.rsc is not the suspected ".calib.visual.fusion.leExFOL2.magnQuote double 1.2312108"you find it in calib.rsc around the maps files entriesCode:.calib.lensCorr entry.calib.lensCorr.ds_we_ap_fi_le index.calib.lensCorr.ds_we_ap_fi_le.enabled bool true.calib.lensCorr.ds_we_ap_fi_le.fileName text "ds_we_ap_fi_le_LCFMap.fff".calib.lensCorr.ds_we_ap_fi_le.rotation double 0.32686445.calib.lensCorr.ds_we_ap_fi_le.type int32 100.calib.lensCorr.ds_we_ap_fi_le.zoom double 7.7799269.calib.lensCorr.ds_we_ap_fi_leExFOL2 index.calib.lensCorr.ds_we_ap_fi_leExFOL2.enabled bool true.calib.lensCorr.ds_we_ap_fi_leExFOL2.fileName text "ds_we_ap_fi_leExFOL2_LCFMap.fff".calib.lensCorr.ds_we_ap_fi_leExFOL2.rotation double 0.32686445.calib.lensCorr.ds_we_ap_fi_leExFOL2.type int32 100.calib.lensCorr.ds_we_ap_fi_leExFOL2.zoom double 7.7799269if I remove this block, then I have uncropped Lepton images with calibrated temperature measurements.This is not the best solution. I'm unsure about the content of the both mapping files *.fffAfter editing the calib.rsc youmustcalculate a new crc32.I use this fast method:Code:// count (n) lines$ wc -l calib.rsc646 calib.rsc//print last line$ tail -n1 calib.rsc# CRC32 4683a151//calc a new crc32 for (n-1) lines$ crc32 <(head -n 645 calib.rsc)4683a151// edit last linefirst test it on a unpatched sample and compare last line with output of crc32After editing the calib.rsc insideCode:./app/src/main/res/raw/default_camera_files.zipwith my patched calib.rsc from my Flir One the SDK.app works fine.Now I'm looking for an switch to suppress the magic pattern noise.

author: tomas123
author_rank: Frequent Contributor
timestamp: November 20, 2015, 01:03:37 am
content: another idea hasen't work:you can multiple ImageTypes request in same timesample:Code:frameProcessor.setImageTypes(EnumSet.of(RenderedImage.ImageType.BlendedMSXRGBA8888Image, RenderedImage.ImageType.ThermalLinearFlux14BitImage));from helpQuoteI thought, if this.pixeldata from format ThermalLinearFlux14BitImage, then it's simple to copy it to this.rawFrame before I take a photo.FLIROneSDKBundle/FLIRONEExampleApplication/app/src/main/java/com/flir/flironesdk/RenderedImage.javaCode:private RenderedImage(int width, int height, byte[] pixelData, byte frameTypeValue, float emissivity, int paletteOrdinal, Frame originalFrame){this.width = width;this.height = height;this.pixelData = pixelData;this.imageType = ImageType.get(frameTypeValue);this.emissivity = emissivity;if ((paletteOrdinal >= 0) && (paletteOrdinal < Palette.values().length)) {this.palette = Palette.values();} else {this.palette = null;}this.rawFrame = originalFrame;}But I haven't found a way to write to "private" array this.rawFrame.

author: tomas123
author_rank: Frequent Contributor
timestamp: November 20, 2015, 01:05:33 am
content: Another quick n' dirty solution works fine:Save the ThermalLinearFlux14BitImage RAW image:FLIRONEExampleApplication/app/src/main/java/com/flir/flironeexampleapplication/PreviewActivity.javaCode:// for raw imagesimport java.io.FileOutputStream;public void onFrameProcessed(final RenderedImage renderedImage){thermalBitmap = renderedImage.getBitmap();updateThermalImageView(thermalBitmap);/*Capture this image if requested.*/if (this.imageCaptureRequested) {imageCaptureRequested = false;final Context context = this;new Thread(new Runnable() {public void run() {String path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString();SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ssZ", Locale.getDefault());String formatedDate = sdf.format(new Date());String fileName = "FLIROne-" + formatedDate + ".jpg";try{lastSavedPath = path+ "/" + fileName;renderedImage.getFrame().save(new File(lastSavedPath), RenderedImage.Palette.Iron, RenderedImage.ImageType.BlendedMSXRGBA8888Image);MediaScannerConnection.scanFile(context,new String[]{path + "/" + fileName}, null,new MediaScannerConnection.OnScanCompletedListener() {@Overridepublic void onScanCompleted(String path, Uri uri) {Log.i("ExternalStorage", "Scanned " + path + ":");Log.i("ExternalStorage", "-> uri=" + uri);}});if (renderedImage.imageType() == RenderedImage.ImageType.ThermalLinearFlux14BitImage){// save the Lepton RAW fileString rawName = "FLIROne-" + formatedDate + ".raw";lastSavedPath = path+ "/" + rawName;File file = new File(lastSavedPath);FileOutputStream fop = null;fop = new FileOutputStream(file);if (!file.exists()) {file.createNewFile();}//int rawLength = renderedImage.pixelData().length;byte[] LeptonRAWBytes = renderedImage.pixelData();fop.write(LeptonRAWBytes);fop.flush();fop.close();}}catch (Exception e){e.printStackTrace();}runOnUiThread(new Runnable() {@Overridepublic void run() {thermalImageView.animate().setDuration(50).scaleY(0).withEndAction((new Runnable() {public void run() {thermalImageView.animate().setDuration(50).scaleY(1);}}));}});}}).start();}...If the image type is set to "ThermalLinearFlux14BitImage" then it save also the raw frame 160x120 to disk.So I got the nice gallery photo from F1G2:Quote from: tomas123 on November 17, 2015, 02:50:47 pm

author: cynfab
author_rank: Regular Contributor
timestamp: November 20, 2015, 01:21:52 am
content: I've been able to use the multiple image format FrameProcess request and indeed the onFrameProcessed delegate is call for each type, BUT there is no way for the delegate to determine what type of image it is UNLESS you modify Renderimage.java to make ImageType publicpublic ImageType imageType;I have an app that displays the 14bit thermal greyscale image and the visual image simultaneously in separate ImageViews side by side.It is very fast since there is no paletteizationCode:// Frame Processor Delegate method, will be called each time a rendered frame is producedpublic void onFrameProcessed(final RenderedImage renderedImage){if (renderedImage.imageType == RenderedImage.ImageType.VisualJPEGImage) {visualBitmap = renderedImage.getBitmap();updateVisualImageView(visualBitmap);Log.i("app", "Visual Image");}if (renderedImage.imageType == RenderedImage.ImageType.ThermalLinearFlux14BitImage) { // seems ot come here for thermal image as wellthermalBitmap = renderedImage.getBitmap();updateThermalImageView(thermalBitmap);Log.i("app","Thermal Image");}}

author: tomas123
author_rank: Frequent Contributor
timestamp: November 20, 2015, 04:44:21 pm
content: Quote from: cynfab on November 20, 2015, 01:21:52 amsee my sample code above for saving the ThermalLinearFlux14BitImage to diskin flironesdk\RenderedImage.java you find:Code:public ImageType imageType(){return this.imageType;}public byte[] pixelData(){return this.pixelData;}so you must use brackets:Code:if (renderedImage.imageType() == RenderedImage.ImageType.ThermalLinearFlux14BitImage){...fop = new FileOutputStream(file);byte[] LeptonRAWBytes = renderedImage.pixelData();fop.write(LeptonRAWBytes);

author: cynfab
author_rank: Regular Contributor
timestamp: November 20, 2015, 05:53:53 pm
content: Of course...This just shows again my lack of programming skillsThanks for the tip, the app runs just fine.

author: tomas123
author_rank: Frequent Contributor
timestamp: November 20, 2015, 06:31:36 pm
content: My programming skills are scary(this are my first steps with java).I haven't found yet a good code template (for linux shell) to grab the frames over usb.the usb protocol of F1 is similar to the seeksample 1Quote from: marshallh on October 21, 2014, 12:48:37 ambut the sample code from user sgstair is for windowsQuote from: sgstair on October 22, 2014, 07:33:08 amsample 2another seek source is here (my hit for linux):https://github.com/zougloub/libseekcompare the lsusb with the FlirOne (also a iAP Interface and one additional endpoint for frame transfer)Code:iManufacturer 1 Seek ThermaliProduct 2 PIR206 Thermal CameraiInterface 3 iAP InterfaceEndpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x01 EP 1 OUTbmAttributes 2Transfer Type BulkSynch Type NoneUsage Type DatawMaxPacketSize 0x0200 1x 512 bytesbInterval 0Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x81 EP 1 INbmAttributes 2Transfer Type BulkSynch Type NoneUsage Type DatawMaxPacketSize 0x0200 1x 512 bytesbInterval 0iInterface 4 com.thermal.pir206.1Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x02 EP 2 OUTbmAttributes 2Transfer Type BulkSynch Type NoneUsage Type DatawMaxPacketSize 0x0200 1x 512 bytesbInterval 0Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x82 EP 2 INbmAttributes 2Transfer Type BulkSynch Type NoneUsage Type DatawMaxPacketSize 0x0200 1x 512 bytesbInterval 0you dual screen is a nice ideaplease post your code for testing

author: tomas123
author_rank: Frequent Contributor
timestamp: November 22, 2015, 10:02:46 pm
content: Hi cynfab,with your usb debug file I was able to set a basic configuration and get some telegrams with Ubuntu (modified code fromhttps://github.com/zougloub/libseek)Code:{"type":"sledInformation","data":{"serialNumberBoard":"xxxxxxxxx","partNumberBoard":"xxxxxxxxx","versionBoard":"D","serialNumberLepton":"xxxxxxx","versionLepton":"3.1.46","leptonQR":"xxxxxx","versionRosebudFactoryESW":"0.4.27","versionRosebudOperationalESW":"0.4.27","versionRosebudUpdaterESW":"0.4.27","versionRosebudAPI":"master.015ede4","gitRevision":"master.015ede4","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatingMode":"operational"}}{"type":"batteryVoltageUpdate","data":{"voltage":3.95000004768372,"percentage":76}}// after power cable plugin{"type":"batteryChargingCurrentUpdate","data":{"chargingCurrent":500}}{"type":"batteryChargingStateUpdate","data":{"chargingState":"stateManagedBatteryCharging"}}but I can't get a frame with an image.I'm not sure, if we are missing a command on libusb_control_transfer() to start the frame transfer on endpoint 5.There is a gab of 17 seconds in your log.Code:[ ] 3.233354 d= 0.000000 [191.7 + 17.317] [ 1] NAKHere is another capture that starts with the above command & data (different) see below[ ] 20.832611 d= 0.000001 [231.4 +107.300] [ 3] IN : 89.3Next, I will debug the usb traffic with Android Studio.

author: cynfab
author_rank: Regular Contributor
timestamp: November 23, 2015, 01:12:44 am
content: In general the gaps in my log are due to the large number of nak's in between the two ends.I may have screwed one up.There is a lot going on in the Flir portocol, I think it is more complex than the Seek, as I was able to get the Seek streaming fairly easily.I'm still fiddling with my dual view app, but will post the source as soon as I get it looking good enough for my intended use

author: tomas123
author_rank: Frequent Contributor
timestamp: November 23, 2015, 09:16:18 am
content: Quote from: cynfab on November 23, 2015, 01:12:44 amDo you have a lightwave source code in c for usb communication?I use the code fromhttps://github.com/zougloub/libseek, but the c++ code it's more complex as I need for this purpose.

author: frenky
author_rank: Unknown
timestamp: November 23, 2015, 11:21:27 am
content: Many of the custom apps for Seek also have support for linux:https://github.com/lod/seek-thermal-documentation/wiki/ClientsIt might help someone on making a Flir One linux app.

author: tomas123
author_rank: Frequent Contributor
timestamp: November 23, 2015, 12:13:41 pm
content: great link, thank youand there is the requested code "Seek by Cynfab"@cynfabafter hours by reading your usb recording ...and 15 minutes with android studio and debugging over WiFi I got all necessary informations// complete handshake of packets which sends the SDK App to FlirOne (write)Code:controlTransferprotocolType = {UsbCommunicator$ProtocolType@20946} "FRAME"startCommunication = falsecontrolTransferprotocolType = {UsbCommunicator$ProtocolType@20970} "FILEIO"startCommunication = falsecontrolTransferprotocolType = {UsbCommunicator$ProtocolType@20970} "FILEIO"startCommunication = truebulkTransferprotocolType = {UsbCommunicator$ProtocolType@20993} "CONFIGURATION"data = {byte@20992}0 = -52 (0xCC)1 = 1 (0x1)2 = 0 (0x0)3 = 0 (0x0)4 = 1 (0x1)5 = 0 (0x0)6 = 0 (0x0)7 = 0 (0x0)8 = 65 (0x41)9 = 0 (0x0)10 = 0 (0x0)11 = 0 (0x0)12 = -8 (0xF8)13 = -77 (0xB3)14 = -9 (0xF7)15 = 0 (0x0)bulkTransferprotocolType = {UsbCommunicator$ProtocolType@20992} "CONFIGURATION"data = {byte@21002}{"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}bulkTransferprotocolType = {UsbCommunicator$ProtocolType@20993} "CONFIGURATION"data = {byte@21044}0 = -52 (0xCC)1 = 1 (0x1)2 = 0 (0x0)3 = 0 (0x0)4 = 1 (0x1)5 = 0 (0x0)6 = 0 (0x0)7 = 0 (0x0)8 = 51 (0x33)9 = 0 (0x0)10 = 0 (0x0)11 = 0 (0x0)12 = -17 (0xEF)13 = -37 (0xDB)14 = -63 (0xC1)15 = -63 (0xC1)bulkTransferprotocolType = {UsbCommunicator$ProtocolType@20993} "CONFIGURATION"data = {byte@21053}{"type":"readFile","data":{"streamIdentifier":10}}controlTransferprotocolType = {UsbCommunicator$ProtocolType@20946} "FRAME"startCommunication = trueafter this control transfer we get the frames over EP 5-------Control Transfersource code:private static final int SET_INTERFACE = 11;static final int CONFIG_READ_ENDPOINT_ID = 1;static final int CONFIG_WRITE_ENDPOINT_ID = 2; // CONFIGURATIONstatic final int FILEIO_READ_ENDPOINT_ID = 3;static final int FILEIO_WRITE_ENDPOINT_ID = 4;// only for firmware updatestatic final int FRAME_READ_ENDPOINT_ID = 5;controlTransfer EP0:int altSetting = startCommunication ? 1 : 0;FILEIO: interfaceNumber = 1;FRAME: interfaceNumber = 2;int result = this.connection.controlTransfer(1, 0x0B,altSetting,interfaceNumber, null, 0, 200);youF6d.txt[ ] 3.221377 d= 0.000000 [179.7 + 40.967] [ 11] DATA0: 01 0b01 000200 00 00 c4 91Call to address 78 endpoint 0 Set InterfaceOffset Field Value0 bmRequestType = 011 bRequest = 0b2 wValue0001type (H) index (L)4 wIndex025 wLength 006 Data 0000

author: tomas123
author_rank: Frequent Contributor
timestamp: November 24, 2015, 11:30:39 pm
content: Hi cynfab,to push this thread I used your python code for seekhttps://www.eevblog.com/forum/testgear/yet-another-cheap-thermal-imager-incoming/msg544080/#msg544080and implemented my knowledge about FlirOne as described above.Until yet I cannot make a correct bulk write.But with this code from attachment I get some nice status messages:Code:$ sudo python flir.pysend bytes:16send bytes:65array('B', [204, 1, 0, 0, 1, 0, 0, 0, 93, 0, 0, 0, 223, 91, 56, 26])?]?[80x83 usb.core.USBError: [Errno 110] Operation timed outarray('B', [123, 34, 116, 121, 112, 101, 34, 58, 34, 111, 112, 101, 110, 70, 105, 108, 101, 83, 116, 97, 116, 117, 115, 34, 44, 34, 100, 97, 116, 97, 34, 58, 123, 34, 112, 97, 116, 104, 34, 58, 34, 67, 97, 109, 101, 114, 97, 70, 105, 108, 101, 115, 46, 122, 105, 112, 34, 44, 34, 115, 116, 114, 101, 97, 109, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 34, 58, 49, 49, 44, 34, 109, 111, 100, 101, 34, 58, 34, 114, 34, 125, 125, 0]){"type":"openFileStatus","data":{"path":"CameraFiles.zip","streamIdentifier":11,"mode":"r"}}0x83 usb.core.USBError: [Errno 110] Operation timed outarray('B', [204, 1, 0, 0, 1, 0, 0,....1, 110, 97, 108, 34, 125, 125, 0])?w`?{"type":"sledInformation","data":{"serialNumberBoard":FFFFFFFFFF","partNumberBoard":"21xxxxxx01","versionBoard":"D","serialNumberLepton":"37xxxx1","versionLepton":"3.1.46","leptonQR":"A0xxxx1","versionRosebudFactoryESW":"0.4.27","versionRosebudOperationalESW":"0.4.27","versionRosebudUpdaterESW":"0.4.27","versionRosebudAPI":"master.015ede4","gitRevision":"master.015ede4","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatingMode":"operational"}}0x83 usb.core.USBError: [Errno 110] Operation timed out0x81 usb.core.USBError: [Errno 110] Operation timed out0x83 usb.core.USBError: [Errno 110] Operation timed outarray('B', [204, 1, 0, 0, 1, 0, 0, 0, 84, 0, 0, 0, 85, 20, 48, 103, 123, 34, 116, 121, 112, 101, 34, 58, 34, 98, 97, 116, 116, 101, 114, 121, 86, 111, 108, 116, 97, 103, 101, 85, 112, 100, 97, 116, 101, 34, 44, 34, 100, 97, 116, 97, 34, 58, 123, 34, 118, 111, 108, 116, 97, 103, 101, 34, 58, 51, 46, 56, 48, 57, 57, 57, 57, 57, 52, 50, 55, 55, 57, 53, 52, 44, 34, 112, 101, 114, 99, 101, 110, 116, 97, 103, 101, 34, 58, 53, 51, 125, 125, 0])?TU0g{"type":"batteryVoltageUpdate","data":{"voltage":3.80999994277954,"percentage":53}}0x83 usb.core.USBError: [Errno 110] Operation timed outarray('B', [204, 1, 0, 0, 1, 0, 0, 0, 69, 0, 0, 0, 175, 36, 149, 143, 123, 34, 116, 121, 112, 101, 34, 58, 34, 98, 97, 116, 116, 101, 114, 121, 67, 104, 97, 114, 103, 105, 110, 103, 67, 117, 114, 114, 101, 110, 116, 85, 112, 100, 97, 116, 101, 34, 44, 34, 100, 97, 116, 97, 34, 58, 123, 34, 99, 104, 97, 114, 103, 105, 110, 103, 67, 117, 114, 114, 101, 110, 116, 34, 58, 48, 125, 125, 0, 204, 1, 0, 0, 1, 0, 0, 0, 81, 0, 0, 0, 103, 228, 238, 80, 123, 34, 116, 121, 112, 101, 34, 58, 34, 98, 97, 116, 116, 101, 114, 121, 67, 104, 97, 114, 103, 105, 110, 103, 83, 116, 97, 116, 101, 85, 112, 100, 97, 116, 101, 34, 44, 34, 100, 97, 116, 97, 34, 58, 123, 34, 99, 104, 97, 114, 103, 105, 110, 103, 83, 116, 97, 116, 101, 34, 58, 34, 115, 116, 97, 116, 101, 78, 111, 67, 104, 97, 114, 103, 105, 110, 103, 34, 125, 125, 0])?E?$??{"type":"batteryChargingCurrentUpdate","data":{"chargingCurrent":0}}?Qg??P{"type":"batteryChargingStateUpdate","data":{"chargingState":"stateNoCharging"}}0x83 usb.core.USBError: [Errno 110] Operation timed out

author: cynfab
author_rank: Regular Contributor
timestamp: November 25, 2015, 01:37:18 am
content: thomas123,That's great progress, I'm still dealing with other things and can't fiddle with FlirOne for linux/otherOS stuff for a while.I'm making progress on my dual view app for android and am almost done enough to post the code. maybe by the week end....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 08, 2015, 10:13:40 pm
content: Hi cynfab,After two weeks hacking the Flir One G2 Android I need your help:I rechecked all bytes in your dump files F6c.txt and F7c.txt and wrote a C code to exact replay all your sniffed USB packets with libusb.But I get no datas over EP 0x83 (CameraFiles.zip )and EP 0x85 (frames)Please, can you make with yourOpenVizsla a fresh uncut dump of a SDK.apk start process and also a dump of the USB packets of my code?Then can I see the difference.I have a conjecture, that there is a knocking key to open the frame endpoint of Flir One.See the mystic order of getting the strings descriptors and a libusb_set_configuration(devh, 3) in the middle:Code:libusb_get_string_descriptor langid=0x409String descriptor 2: "FLIR ONE Camera"String descriptor 1: "FLIR Systems"String descriptor 3: "FLIRONEF03FXXXXAFFF"Successfully set usb configuration 3String descriptor 4: "SBIBDP Configuration"The c code is simple with many comments and prints. You can compile it on Linux and OSX (after installing libusb 1.0).I goes from python code to c code, because I want direct access to libusb to avoid extra USB traffic.compile on Mac OSXCode:$ gcc -L/opt/local/lib/ -I/opt/local/include/libusb-1.0/ -o flir flir7d.c -lusb-1.0after installing libusb 1.0 with mac portCode:$ sudo port install libusb$ sudo port install libusb-legacyor compile on UbuntuCode:$ lsb_release -rRelease:14.04$ /usr/bin/gcc -std=c99 '-I/usr/include/libusb-1.0' -o flir flir7d.c -lusb-1.0and start with$sudo./flirthe current output of the code (EP 0x81 works fine):Code:./flirSuccessfully find the Flir One G2 devicelibusb_control_transfer(devh, DATA0: 80 | 06 | 00 01 | 00 00 | 12 00DATA1: 12 01 00 02 00 00 00 40 cb 09 96 19 08 01 01 02 03 01libusb_control_transfer(devh, DATA0: 80 06 00 02 00 00 09 00DATA1: 09 02 60 00 03 03 04 c0 00libusb_control_transfer(devh, DATA0: 80 06 00 02 00 00 60 00DATA1: 09 02 60 00 03 03 04 c0 00 09 04 00 00 02 ff f0 00 05 07 05 81 02 00 02 00 07 05 02 02 00 02 01 09 04 01 01 00 ff f0 01 06 09 04 01 00 02 ff f0 01 06 07 05 83 02 00 02 00 07 05 04 02 00 02 01 09 04 02 01 00 ff f0 01 07 09 04 02 00 02 ff f0 01 07 07 05 85 02 00 02 00 07 05 06 02 00 02 01libusb_get_string_descriptor langid=0x409String descriptor 2: "FLIR ONE Camera"String descriptor 1: "FLIR Systems"String descriptor 3: "FLIRONEF03FXXXXXFFF"Successfully set usb configuration 3String descriptor 4: "SBIBDP Configuration"String descriptor 5: "iAP Interface"String descriptor 6: "com.flir.rosebud.fileio"String descriptor 7: "com.flir.rosebud.frame"Successfully claimed interface 0,1,2stop interface 2 FRAMEstop interface 1 FILEIOstart interface 1 FILEIO: Tue Dec 8 22:41:23 2015: Tue Dec 8 22:41:23 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x81: LIBUSB_ERROR_TIMEOUT: Tue Dec 8 22:41:24 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x83: LIBUSB_ERROR_OTHER: Tue Dec 8 22:41:25 2015bulk read EP 0x81, actual length 535HEX:cc 01 00 00 01 00 00 00 07 02 00 00 77 60 0c bd 7b 22 74 79 70 65 22 3a 22 73 6c 65 64 49 6e 66 6f 72 6d 61 74 69 6f 6e 22 2c 22 64 61 74 61 22 3a 7b 22 73 65 72 69 61 6c 4e 75 6d 62 65 72 42 6f 61 72 64 22 3a 22 46 30 33 46 38 4f 30 30 41 46 46 22 2c 22 70 61 72 74 4e 75 6d 62 65 72 42 6f 61 72 64 22 3a 22 32 31 32 30 30 31 36 30 32 30 31 22 2c 22 76 65 72 73 69 6f 6e 42 6f 61 72 64 22 3a 22 44 22 2c 22 73 65 72 69 61 6c 4e 75 6d 62 65 72 4c 65 70 74 6f 6e 22 3a 22 33 37 31 38 37 31 22 2c 22 76 65 72 73 69 6f 6e 4c 65 70 74 6f 6e 22 3a 22 33 2e 31 2e 34 36 22 2c 22 6c 65 70 74 6f 6e 51 52 22 3a 22 41 30 33 37 31 38 37 31 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 46 61 63 74 6f 72 79 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 4f 70 65 72 61 74 69 6f 6e 61 6c 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 55 70 64 61 74 65 72 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 41 50 49 22 3a 22 6d 61 73 74 65 72 2e 30 31 35 65 64 65 34 22 2c 22 67 69 74 52 65 76 69 73 69 6f 6e 22 3a 22 6d 61 73 74 65 72 2e 30 31 35 65 64 65 34 22 2c 22 61 75 74 6f 6d 61 74 69 63 53 68 75 74 74 65 72 22 3a 22 59 22 2c 22 66 6f 72 6d 46 61 63 74 6f 72 22 3a 22 64 6f 6e 67 6c 65 22 2c 22 74 68 65 72 6d 61 6c 48 65 69 67 68 74 22 3a 22 31 32 30 22 2c 22 74 68 65 72 6d 61 6c 57 69 64 74 68 22 3a 22 31 36 30 22 2c 22 62 69 67 45 6e 64 69 61 6e 54 68 65 72 6d 61 6c 22 3a 22 30 22 2c 22 6f 70 65 72 61 74 69 6e 67 4d 6f 64 65 22 3a 22 6f 70 65 72 61 74 69 6f 6e 61 6c 22 7d 7d 00STRING:?w`?{"type":"sledInformation","data":{"serialNumberBoard":"F03XXXXXXX","partNumberBoard":"21222222201","versionBoard":"D","serialNumberLepton":"32333331","versionLepton":"3.1.46","leptonQR":"A0777781","versionRosebudFactoryESW":"0.4.27","versionRosebudOperationalESW":"0.4.27","versionRosebudUpdaterESW":"0.4.27","versionRosebudAPI":"master.015ede4","gitRevision":"master.015ede4","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatingMode":"operational"}}: Tue Dec 8 22:41:25 2015bulk read EP 0x81, actual length 100HEX:cc 01 00 00 01 00 00 00 54 00 00 00 55 14 30 67 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 56 6f 6c 74 61 67 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 76 6f 6c 74 61 67 65 22 3a 34 2e 30 31 39 39 39 39 39 38 30 39 32 36 35 31 2c 22 70 65 72 63 65 6e 74 61 67 65 22 3a 39 35 7d 7d 00STRING:?TU0g{"type":"batteryVoltageUpdate","data":{"voltage":4.01999998092651,"percentage":95}}: Tue Dec 8 22:41:25 2015bulk read EP 0x81, actual length 182HEX:cc 01 00 00 01 00 00 00 45 00 00 00 af 24 95 8f 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 43 68 61 72 67 69 6e 67 43 75 72 72 65 6e 74 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 63 68 61 72 67 69 6e 67 43 75 72 72 65 6e 74 22 3a 30 7d 7d 00 cc 01 00 00 01 00 00 00 51 00 00 00 67 e4 ee 50 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 43 68 61 72 67 69 6e 67 53 74 61 74 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 63 68 61 72 67 69 6e 67 53 74 61 74 65 22 3a 22 73 74 61 74 65 4e 6f 43 68 61 72 67 69 6e 67 22 7d 7d 00STRING:?E?$??{"type":"batteryChargingCurrentUpdate","data":{"chargingCurrent":0}}?Qg??P{"type":"batteryChargingStateUpdate","data":{"chargingState":"stateNoCharging"}}ask for CameraFiles.zip on EP 0x83:: Tue Dec 8 22:41:26 2015EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 41 00 00 00 f8 b3 f7 00 ]Write successful!EP 0x02 to be sent: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}Write successful!Sent 65 bytes with string: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 33 00 00 00 ef db c1 c1 ]Write successful!EP 0x02 to be sent 51 Bytes: {"type":"readFile","data":{"streamIdentifier":10}}Write successful!Sent 51 bytes with string: {"type":"readFile","data":{"streamIdentifier":10}}: Tue Dec 8 22:41:26 2015: Tue Dec 8 22:41:26 2015bulk read EP 0x81, actual length 109HEX:cc 01 00 00 01 00 00 00 5d 00 00 00 df 5b 38 1a 7b 22 74 79 70 65 22 3a 22 6f 70 65 6e 46 69 6c 65 53 74 61 74 75 73 22 2c 22 64 61 74 61 22 3a 7b 22 70 61 74 68 22 3a 22 43 61 6d 65 72 61 46 69 6c 65 73 2e 7a 69 70 22 2c 22 73 74 72 65 61 6d 49 64 65 6e 74 69 66 69 65 72 22 3a 31 30 2c 22 6d 6f 64 65 22 3a 22 72 22 7d 7d 00STRING:?]?[8{"type":"openFileStatus","data":{"path":"CameraFiles.zip","streamIdentifier":10,"mode":"r"}}: Tue Dec 8 22:41:28 2015Ask for video stream, start EP 0x85:: Tue Dec 8 22:41:28 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x85: LIBUSB_ERROR_OTHER

author: cynfab
author_rank: Regular Contributor
timestamp: December 09, 2015, 05:46:50 pm
content: Sorry I missed your post yesterday, I'll see if I can do some dumps using my OV.Give me a few days as things are real busy right now....ken...

author: cynfab
author_rank: Regular Contributor
timestamp: December 09, 2015, 05:56:35 pm
content: Here is what my linux box shows for the output of your code:Code:$ sudo ./flir password for kenm:Successfully find the Flir One G2 devicelibusb_control_transfer(devh, DATA0: 80 | 06 | 00 01 | 00 00 | 12 00DATA1: 12 01 00 02 00 00 00 40 cb 09 96 19 08 01 01 02 03 01libusb_control_transfer(devh, DATA0: 80 06 00 02 00 00 09 00DATA1: 09 02 60 00 03 03 04 c0 00libusb_control_transfer(devh, DATA0: 80 06 00 02 00 00 60 00DATA1: 09 02 60 00 03 03 04 c0 00 09 04 00 00 02 ff f0 00 05 07 05 81 02 00 02 00 07 05 02 02 00 02 01 09 04 01 01 00 ff f0 01 06 09 04 01 00 02 ff f0 01 06 07 05 83 02 00 02 00 07 05 04 02 00 02 01 09 04 02 01 00 ff f0 01 07 09 04 02 00 02 ff f0 01 07 07 05 85 02 00 02 00 07 05 06 02 00 02 01libusb_get_string_descriptor langid=0x409String descriptor 2: "FLIR ONE Camera"String descriptor 1: "FLIR Systems"String descriptor 3: "FLIRONEF03F62xxxxxxxF"Successfully set usb configuration 3String descriptor 4: "SBIBDP Configuration"String descriptor 5: "iAP Interface"String descriptor 6: "com.flir.rosebud.fileio"String descriptor 7: "com.flir.rosebud.frame"Successfully claimed interface 0,1,2stop interface 2 FRAMEstop interface 1 FILEIOstart interface 1 FILEIO: Wed Dec 9 10:50:57 2015: Wed Dec 9 10:50:57 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x81: LIBUSB_ERROR_IO: Wed Dec 9 10:50:58 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x83: LIBUSB_ERROR_NO_DEVICE: Wed Dec 9 10:50:59 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x81: LIBUSB_ERROR_NO_DEVICEask for CameraFiles.zip on EP 0x83:: Wed Dec 9 10:51:00 2015EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 41 00 00 00 f8 b3 f7 00 ]Error in write! res = -4 and transferred = 0EP 0x02 to be sent: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}Error in write! res = -4 and transferred = 0EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 33 00 00 00 ef db c1 c1 ]Error in write! res = -4 and transferred = 0EP 0x02 to be sent 51 Bytes: {"type":"readFile","data":{"streamIdentifier":10}}Error in write! res = -4 and transferred = 0: Wed Dec 9 10:51:00 2015: Wed Dec 9 10:51:00 2015Ask for video stream, start EP 0x85:Control Out error -4Looks to be different from what you get.I'm using the latest Linux Mint 17.3:$ lsb_release -rRelease: 17.3I have not poked at any of this yet so I may have something messed up....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 09, 2015, 09:24:46 pm
content: Thanks for your attempt!Your Linux Mint successful claimed the interfaces 0,1,2 but got on Endpoints 0x02, 0x83 and 0x85 a LIBUSB_ERROR_NO_DEVICE = -4.Do you unplugged the Flir1 before running "sudo ./flir" ?I will self install Linux Mint 17.3 and see inside the code...

author: cynfab
author_rank: Regular Contributor
timestamp: December 09, 2015, 11:09:54 pm
content: I've been trying to figure this out all afternoon and haven't so far. No I didn't unplug the device. I get the same basic response when I try my seek python code moded for the flir one....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 09, 2015, 11:31:10 pm
content: After installing a fresh Linux Mint I can write on EP 0x02install necessary packages (libusb.h, errno.h):Code:$ lsb_release -rRelease:17.3$ sudo apt-get install libusb-1.0-0-dev$ sudo apt-get install g++compileCode:$ /usr/bin/gcc -std=c99 '-I/usr/include/libusb-1.0' -I/usr/include/ -o flir flir7d.c -lusb-1.0runCode:$ sudo ./flirSuccessfully find the Flir One G2 devicelibusb_control_transfer(devh, DATA0: 80 | 06 | 00 01 | 00 00 | 12 00DATA1: 12 01 00 02 00 00 00 40 cb 09 96 19 08 01 01 02 03 01libusb_control_transfer(devh, DATA0: 80 06 00 02 00 00 09 00DATA1: 09 02 60 00 03 03 04 c0 00libusb_control_transfer(devh, DATA0: 80 06 00 02 00 00 60 00DATA1: 09 02 60 00 03 03 04 c0 00 09 04 00 00 02 ff f0 00 05 07 05 81 02 00 02 00 07 05 02 02 00 02 01 09 04 01 01 00 ff f0 01 06 09 04 01 00 02 ff f0 01 06 07 05 83 02 00 02 00 07 05 04 02 00 02 01 09 04 02 01 00 ff f0 01 07 09 04 02 00 02 ff f0 01 07 07 05 85 02 00 02 00 07 05 06 02 00 02 01libusb_get_string_descriptor langid=0x409String descriptor 2: "FLIR ONE Camera"String descriptor 1: "FLIR Systems"String descriptor 3: "FLIRONEF03FXXXXXXFFF"Successfully set usb configuration 3String descriptor 4: "SBIBDP Configuration"String descriptor 5: "iAP Interface"String descriptor 6: "com.flir.rosebud.fileio"String descriptor 7: "com.flir.rosebud.frame"Successfully claimed interface 0,1,2stop interface 2 FRAMEstop interface 1 FILEIOstart interface 1 FILEIO: Thu Dec 10 00:41:50 2015: Thu Dec 10 00:41:50 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x81: LIBUSB_ERROR_TIMEOUT: Thu Dec 10 00:41:51 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x83: LIBUSB_ERROR_TIMEOUT: Thu Dec 10 00:41:54 2015bulk read EP 0x81, actual length 97HEX:cc 01 00 00 01 00 00 00 51 00 00 00 67 e4 ee 50 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 43 68 61 72 67 69 6e 67 53 74 61 74 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 63 68 61 72 67 69 6e 67 53 74 61 74 65 22 3a 22 73 74 61 74 65 4e 6f 43 68 61 72 67 69 6e 67 22 7d 7d 00STRING:?Qg??P{"type":"batteryChargingStateUpdate","data":{"chargingState":"stateNoCharging"}}ask for CameraFiles.zip on EP 0x83:: Thu Dec 10 00:41:57 2015EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 41 00 00 00 f8 b3 f7 00 ]Write successful!EP 0x02 to be sent: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}Write successful!Sent 65 bytes with string: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 33 00 00 00 ef db c1 c1 ]Write successful!EP 0x02 to be sent 51 Bytes: {"type":"readFile","data":{"streamIdentifier":10}}Write successful!Sent 51 bytes with string: {"type":"readFile","data":{"streamIdentifier":10}}: Thu Dec 10 00:41:57 2015: Thu Dec 10 00:41:57 2015bulk read EP 0x81, actual length 109HEX:cc 01 00 00 01 00 00 00 5d 00 00 00 df 5b 38 1a 7b 22 74 79 70 65 22 3a 22 6f 70 65 6e 46 69 6c 65 53 74 61 74 75 73 22 2c 22 64 61 74 61 22 3a 7b 22 70 61 74 68 22 3a 22 43 61 6d 65 72 61 46 69 6c 65 73 2e 7a 69 70 22 2c 22 73 74 72 65 61 6d 49 64 65 6e 74 69 66 69 65 72 22 3a 31 30 2c 22 6d 6f 64 65 22 3a 22 72 22 7d 7d 00STRING:?]?[8{"type":"openFileStatus","data":{"path":"CameraFiles.zip","streamIdentifier":10,"mode":"r"}}: Thu Dec 10 00:42:01 2015Ask for video stream, start EP 0x85:: Thu Dec 10 00:42:01 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x85: LIBUSB_ERROR_TIMEOUTsame result: no packages from EP 83 and 85interesting:on OSX and ubuntu I get after starting the interface 1 with libusb_control_transfer(devh,1,0x0b,1,1,data,0,100) this long status message (like in your log F6c.txt)Code:start interface 1 FILEIO: Tue Dec 8 22:41:25 2015bulk read EP 0x81, actual length 535HEX:cc 01 00 00 01 00 00 00 07 02 00 00 77 60 0c bd 7b 22 74 79 70 65 22 3a 22 73 6c 65 64 49 6e 66 6f 72 6d 61 74 69 6f 6e 22 2c 22 64 61 74 61 22 3a 7b 22 73 65 72 69 61 6c 4e 75 6d 62 65 72 42 6f 61 72 64 22 3a 22 46 30 33 46 38 4f 30 30 41 46 46 22 2c 22 70 61 72 74 4e 75 6d 62 65 72 42 6f 61 72 64 22 3a 22 32 31 32 30 30 31 36 30 32 30 31 22 2c 22 76 65 72 73 69 6f 6e 42 6f 61 72 64 22 3a 22 44 22 2c 22 73 65 72 69 61 6c 4e 75 6d 62 65 72 4c 65 70 74 6f 6e 22 3a 22 33 37 31 38 37 31 22 2c 22 76 65 72 73 69 6f 6e 4c 65 70 74 6f 6e 22 3a 22 33 2e 31 2e 34 36 22 2c 22 6c 65 70 74 6f 6e 51 52 22 3a 22 41 30 33 37 31 38 37 31 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 46 61 63 74 6f 72 79 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 4f 70 65 72 61 74 69 6f 6e 61 6c 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 55 70 64 61 74 65 72 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 41 50 49 22 3a 22 6d 61 73 74 65 72 2e 30 31 35 65 64 65 34 22 2c 22 67 69 74 52 65 76 69 73 69 6f 6e 22 3a 22 6d 61 73 74 65 72 2e 30 31 35 65 64 65 34 22 2c 22 61 75 74 6f 6d 61 74 69 63 53 68 75 74 74 65 72 22 3a 22 59 22 2c 22 66 6f 72 6d 46 61 63 74 6f 72 22 3a 22 64 6f 6e 67 6c 65 22 2c 22 74 68 65 72 6d 61 6c 48 65 69 67 68 74 22 3a 22 31 32 30 22 2c 22 74 68 65 72 6d 61 6c 57 69 64 74 68 22 3a 22 31 36 30 22 2c 22 62 69 67 45 6e 64 69 61 6e 54 68 65 72 6d 61 6c 22 3a 22 30 22 2c 22 6f 70 65 72 61 74 69 6e 67 4d 6f 64 65 22 3a 22 6f 70 65 72 61 74 69 6f 6e 61 6c 22 7d 7d 00STRING:?w`?{"type":"sledInformation","data":{"serialNumberBoard":"F03XXXXXXX","partNumberBoard":"21222222201","versionBoard":"D","serialNumberLepton":"32333331","versionLepton":"3.1.46","leptonQR":"A0777781","versionRosebudFactoryESW":"0.4.27","versionRosebudOperationalESW":"0.4.27","versionRosebudUpdaterESW":"0.4.27","versionRosebudAPI":"master.015ede4","gitRevision":"master.015ede4","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatingMode":"operational"}}.. but not with Mintedit: randomly I get a full message with Mint:maybe trouble with virtual machine (linux mint runs under vmware fusion)Code:$ sudo ./flirSuccessfully find the Flir One G2 devicelibusb_control_transfer(devh, DATA0: 80 | 06 | 00 01 | 00 00 | 12 00DATA1: 12 01 00 02 00 00 00 40 cb 09 96 19 08 01 01 02 03 01libusb_control_transfer(devh, DATA0: 80 06 00 02 00 00 09 00DATA1: 09 02 60 00 03 03 04 c0 00libusb_control_transfer(devh, DATA0: 80 06 00 02 00 00 60 00DATA1: 09 02 60 00 03 03 04 c0 00 09 04 00 00 02 ff f0 00 05 07 05 81 02 00 02 00 07 05 02 02 00 02 01 09 04 01 01 00 ff f0 01 06 09 04 01 00 02 ff f0 01 06 07 05 83 02 00 02 00 07 05 04 02 00 02 01 09 04 02 01 00 ff f0 01 07 09 04 02 00 02 ff f0 01 07 07 05 85 02 00 02 00 07 05 06 02 00 02 01libusb_get_string_descriptor langid=0x409String descriptor 2: "FLIR ONE Camera"String descriptor 1: "FLIR Systems"String descriptor 3: "FLIRONEF03F8O00AFFF"Successfully set usb configuration 3String descriptor 4: "SBIBDP Configuration"String descriptor 5: "iAP Interface"String descriptor 6: "com.flir.rosebud.fileio"String descriptor 7: "com.flir.rosebud.frame"Successfully claimed interface 0,1,2stop interface 2 FRAMEstop interface 1 FILEIOstart interface 1 FILEIO: Thu Dec 10 00:50:29 2015: Thu Dec 10 00:50:29 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x81: LIBUSB_ERROR_TIMEOUT: Thu Dec 10 00:50:30 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x83: LIBUSB_ERROR_TIMEOUT: Thu Dec 10 00:50:32 2015bulk read EP 0x81, actual length 519HEX:7b 22 74 79 70 65 22 3a 22 73 6c 65 64 49 6e 66 6f 72 6d 61 74 69 6f 6e 22 2c 22 64 61 74 61 22 3a 7b 22 73 65 72 69 61 6c 4e 75 6d 62 65 72 42 6f 61 72 64 22 3a 22 46 30 33 46 38 4f 30 30 41 46 46 22 2c 22 70 61 72 74 4e 75 6d 62 65 72 42 6f 61 72 64 22 3a 22 32 31 32 30 30 31 36 30 32 30 31 22 2c 22 76 65 72 73 69 6f 6e 42 6f 61 72 64 22 3a 22 44 22 2c 22 73 65 72 69 61 6c 4e 75 6d 62 65 72 4c 65 70 74 6f 6e 22 3a 22 33 37 31 38 37 31 22 2c 22 76 65 72 73 69 6f 6e 4c 65 70 74 6f 6e 22 3a 22 33 2e 31 2e 34 36 22 2c 22 6c 65 70 74 6f 6e 51 52 22 3a 22 41 30 33 37 31 38 37 31 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 46 61 63 74 6f 72 79 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 4f 70 65 72 61 74 69 6f 6e 61 6c 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 55 70 64 61 74 65 72 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 41 50 49 22 3a 22 6d 61 73 74 65 72 2e 30 31 35 65 64 65 34 22 2c 22 67 69 74 52 65 76 69 73 69 6f 6e 22 3a 22 6d 61 73 74 65 72 2e 30 31 35 65 64 65 34 22 2c 22 61 75 74 6f 6d 61 74 69 63 53 68 75 74 74 65 72 22 3a 22 59 22 2c 22 66 6f 72 6d 46 61 63 74 6f 72 22 3a 22 64 6f 6e 67 6c 65 22 2c 22 74 68 65 72 6d 61 6c 48 65 69 67 68 74 22 3a 22 31 32 30 22 2c 22 74 68 65 72 6d 61 6c 57 69 64 74 68 22 3a 22 31 36 30 22 2c 22 62 69 67 45 6e 64 69 61 6e 54 68 65 72 6d 61 6c 22 3a 22 30 22 2c 22 6f 70 65 72 61 74 69 6e 67 4d 6f 64 65 22 3a 22 6f 70 65 72 61 74 69 6f 6e 61 6c 22 7d 7d 00STRING:{"type":"sledInformation","data":{"serialNumberBoard":"F03FXXXXXXFF","partNumberBoard":"211111111","versionBoard":"D","serialNumberLepton":"3222221","versionLepton":"3.1.46","leptonQR":"A3444441","versionRosebudFactoryESW":"0.4.27","versionRosebudOperationalESW":"0.4.27","versionRosebudUpdaterESW":"0.4.27","versionRosebudAPI":"master.015ede4","gitRevision":"master.015ede4","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatingMode":"operational"}}ask for CameraFiles.zip on EP 0x83:: Thu Dec 10 00:50:36 2015EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 41 00 00 00 f8 b3 f7 00 ]Write successful!EP 0x02 to be sent: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}Write successful!Sent 65 bytes with string: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 33 00 00 00 ef db c1 c1 ]Write successful!EP 0x02 to be sent 51 Bytes: {"type":"readFile","data":{"streamIdentifier":10}}Write successful!Sent 51 bytes with string: {"type":"readFile","data":{"streamIdentifier":10}}: Thu Dec 10 00:50:36 2015: Thu Dec 10 00:50:36 2015bulk read EP 0x81, actual length 16HEX:cc 01 00 00 01 00 00 00 5d 00 00 00 df 5b 38 1aSTRING:?]?[8

author: cynfab
author_rank: Regular Contributor
timestamp: December 10, 2015, 12:03:56 am
content: Very interesting, I just tried on a laptop and got the same results as I got before, this was a 32bit laptop and before I was using my 64bit desktop.I find it interesting that I get different error messages.Maybe my Flir One has different fiirmware.THe FlirOne app says I have vers 0.4.26and vers 1.4.1 fro the app.Hardware version C...ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 10, 2015, 12:06:57 am
content: my F1: "versionBoard":"D"your F1: "versionBoard":"C"As I wrote above I changed from phyton to c because c has a native access to libusb without overhead.I tried to write the same bytes to usb as I read in your log file.I hope your OpenVizsla can show the difference.PS: I installed 64 Bit Linux Mint

author: cynfab
author_rank: Regular Contributor
timestamp: December 10, 2015, 12:21:04 am
content: What version of libusb-1.0 are you using, mine is what comes with Linux Mint 17.3 which is:2:1.0.17-1ubuntu2

author: cynfab
author_rank: Regular Contributor
timestamp: December 10, 2015, 12:46:44 am
content: Here is an OV dump of my laptop talking to the FlirOne using your code.

author: tomas123
author_rank: Frequent Contributor
timestamp: December 10, 2015, 09:42:23 am
content: GreatThe good news: Our USB packets from c-code are byte identical (include checksum) with the Flir One AppThe bad news: You can't start with your Linux Mint the EP 0x81 (CONFIG_READ_ENDPOINT) on interface 0 of the Flir1. Therefore you got an error and the transfer stops.Lets compare our configuration:I downloaded the linuxmint-17.3-cinnamon-64bit.iso fromhttp://www.linuxmint.com/download.phpand after installing in vmwareI only make the following steps for running the code:Code:$ sudo apt-get install libusb-1.0-0-dev$ sudo apt-get install g++$ /usr/bin/gcc -std=c99 '-I/usr/include/libusb-1.0' -I/usr/include/ -o flir flir7d.c -lusb-1.0then I can open the EP 0x81 as you see in my log files aboveCode:bulk read EP 0x81, actual length 519...STRING:{"type":"sledInformation","data":{"serialNumberBoard":"F03FXXXXXXFF","partNumberBoard":"211111111","versionBoard":"D","serialNumberLepton":"3222221","versionLepton":"3.1.46","leptonQR":"A3444441","versionRosebudFactoryESW":"0.4.27","versionRosebudOperationalESW":"0.4.27","versionRosebudUpdaterESW":"0.4.27","versionRosebudAPI":"master.015ede4","gitRevision":"master.015ede4","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatingMode":"operational"}}my libusb version is the same as yours (2:1.0.17-1ubuntu2):Code:$ dpkg -l | grep -i usb...ii libusb-0.1-4:amd64 2:0.1.12-23.3ubuntu1 amd64 userspace USB programming libraryii libusb-1.0-0:amd64 2:1.0.17-1ubuntu2 amd64 userspace USB programming libraryii libusb-1.0-0:i386 2:1.0.17-1ubuntu2 i386 userspace USB programming libraryii libusb-1.0-0-dev:amd64 2:1.0.17-1ubuntu2 amd64 userspace USB programming library development filesit's possible, that you included a bad lib path with your gccplease compare you command line with my line:Code:$ /usr/bin/gcc -std=c99 '-I/usr/include/libusb-1.0' -I/usr/include/ -o flir flir7d.c -lusb-1.0Maybe that a claim interface with "force" make sense, but I got an ok!http://developer.android.com/reference/android/hardware/usb/UsbDeviceConnection.html#claimInterface(android.hardware.usb.UsbInterface,%20boolean)

author: cynfab
author_rank: Regular Contributor
timestamp: December 10, 2015, 05:05:47 pm
content: I use Linux mint as my main desktop, so no vmware involved. I am using Mint 17.3 MATEI have lots of stuff installed so it is possible that there is some sort of usb conflict.I already had libusb-1.0-0-dev and build essentials installed so after executing your 2 apt-get commands apt reported nothing further installed.I cut and pasted your compile command.dpkg -l | grep -i usbii libgusb2:amd64 0.1.6-5 amd64 GLib wrapper around libusb1ii libusb-0.1-4:amd64 2:0.1.12-23.3ubuntu1 amd64 userspace USB programming libraryii libusb-1.0-0:amd64 2:1.0.17-1ubuntu2 amd64 userspace USB programming libraryii libusb-1.0-0:i386 2:1.0.17-1ubuntu2 i386 userspace USB programming libraryii libusb-1.0-0-dev:amd64 2:1.0.17-1ubuntu2 amd64 userspace USB programming library development filesii libusbmuxd2 1.0.8-2ubuntu1 amd64 USB multiplexor daemon for iPhone and iPod Touch devices - libraryii mintstick 1.2.6 all write .img and .iso files to USB sticksii python-usb 0.4.3-1 amd64 USB interface for Pythonii usb-modeswitch 2.1.1+repack0-1ubuntu1 amd64 mode switching tool for controlling "flip flop" USB devicesii usb-modeswitch-data 20140327-1 all mode switching data for usb-modeswitchii usbmuxd 1.0.8-2ubuntu1 amd64 USB multiplexor daemon for iPhone and iPod Touch devicesii usbutils 1:007-2ubuntu1 amd64 Linux USB utilitiesii xserver-xorg-video-sisusb 1:0.9.6-2build1 amd64 X.Org X server -- SiS USB display driverI think my lib path is ok as ldd seems to find the libusb-1.0 libldd flirlinux-vdso.so.1 => (0x00007ffcdd786000)libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f6e74610000)libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6e7424b000)libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f6e74039000)libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6e73e1b000)/lib64/ld-linux-x86-64.so.2 (0x00007f6e74852000)libcgmanager.so.0 => /lib/x86_64-linux-gnu/libcgmanager.so.0 (0x00007f6e73c00000)libnih.so.1 => /lib/x86_64-linux-gnu/libnih.so.1 (0x00007f6e739e7000)libnih-dbus.so.1 => /lib/x86_64-linux-gnu/libnih-dbus.so.1 (0x00007f6e737dd000)libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f6e73598000)librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f6e7338f000)I'll tried to use the FORCE boolean and it makes no difference. oops, that's only for android, my bad...;>Pcould you send me your flir binary.

author: cynfab
author_rank: Regular Contributor
timestamp: December 10, 2015, 07:39:54 pm
content: It's working on my system now,I removed the lsusb_reset_device from main, and added a few prints to see what was going on and it's now reading data from EP 85!!I think the reset device was screwing things up (differently) on our respective systems.Now we can move on to do some real Thermal Imaging....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 10, 2015, 10:58:34 pm
content: Quote from: cynfab on December 10, 2015, 07:39:54 pmwowReally from EP 0x85 ? Please send me a terminal log from your F1I used your changed code on Mint and OSX ... and nothing happens on EP 0x83 and 0x85 ...Code:>>>>>>>>>>>>>>>>>bulk transfer (in) 0x83: LIBUSB_ERROR_OTHER>>>>>>>>>>>>>>>>>bulk transfer (in) 0x85: LIBUSB_ERROR_OTHERAs I said, I rechecked every USB byte twice and I have the suspicion that there is a special sequence for opening the endpoint 0x85 like port knockinghttps://en.wikipedia.org/wiki/Port_knocking.

author: cynfab
author_rank: Regular Contributor
timestamp: December 11, 2015, 01:16:52 am
content: took out some of the prints so the dump of the data from EP 85 wouldn't overwhelm my terminal.Here is the terminal log and the code that generated it.I would still like to try your binary....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 11, 2015, 11:20:14 am
content: as attachment my binary and terminal logI'm interested in your binaryCode:$ ldd flirlinux-vdso.so.1 => (0x00007ffd3e51a000)libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007fd5a8e9a000)libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd5a8ad5000)libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007fd5a88c4000)libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd5a86a6000)/lib64/ld-linux-x86-64.so.2 (0x00007fd5a90b1000)libcgmanager.so.0 => /lib/x86_64-linux-gnu/libcgmanager.so.0 (0x00007fd5a848b000)libnih.so.1 => /lib/x86_64-linux-gnu/libnih.so.1 (0x00007fd5a8273000)libnih-dbus.so.1 => /lib/x86_64-linux-gnu/libnih-dbus.so.1 (0x00007fd5a8069000)libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fd5a7e24000)librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd5a7c1c000)... no differences to your "ldd flir"

author: tomas123
author_rank: Frequent Contributor
timestamp: December 11, 2015, 11:31:04 am
content: Hi cynfab,please check, if your code is also working fine after changing the order of the string descriptorsa = { 2,1,3,4,5,6,7};andif (a==3){r = libusb_set_configuration(devh, 3);this part give as result:Code:libusb_get_string_descriptor langid=0x409String descriptor 2: "FLIR ONE Camera"String descriptor 1: "FLIR Systems"String descriptor 3: "FLIRONEFXXXXXXXFFF"Successfully set usb configuration 3String descriptor 4: "SBIBDP Configuration"String descriptor 5: "iAP Interface"String descriptor 6: "com.flir.rosebud.fileio"String descriptor 7: "com.flir.rosebud.frame"Code:int a = { 2,1,3,4,5,6,7};// Get all string descriptors.for (i = 0; i <= 6; i++){r = libusb_get_string_descriptor(devh, a, langid, tbuf, 0xFF);if (r >= 0){//printf("String descriptor %u: \"%s\"\n", a, string_buffer);int si, di;for (di = 0, si = 2; si < tbuf; si += 2) {if ((tbuf & 0x80) || (tbuf[si + 1])) /* non-ASCII */string_buffer[di++] = '?';elsestring_buffer[di++] = tbuf;}string_buffer = 0;printf("String descriptor %u: \"%s\"\n", a, string_buffer);} else {fprintf(stderr, "libusb_get_string_descriptor wValue=%i error %d\n", a, r);goto out;}// after string_descriptor 0303 comes SET_CONFIGURATION = 03if (a==3){r = libusb_set_configuration(devh, 3);if (r < 0) {fprintf(stderr, "libusb_set_configuration error %d\n", r);goto out;}printf("Successfully set usb configuration 3\n");}}

author: cynfab
author_rank: Regular Contributor
timestamp: December 11, 2015, 03:11:49 pm
content: Hi tomas123,Your binary runs ok on my system. i.e. it reads from EP 83 & 85.log attached.Of interest is that I ran the code twice and the first time it got Camerafiles.zip from the device, the second time it did not. The camera was powered on continuously and the runs were less than a minuet apart.Do you want me to change the order of descriptors? the code you posted is identical to what I have now.I'll change it if you like, please say to what.I don't think the order is the same as what I observed with my OV....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 11, 2015, 04:24:13 pm
content: this is exact the mystic order, which you have logged in F6c.txt:Code:libusb_get_string_descriptor langid=0x409String descriptor 2: "FLIR ONE Camera"String descriptor 1: "FLIR Systems"String descriptor 3: "FLIRONEFXXXXXXXFFF"Successfully set usb configuration 3String descriptor 4: "SBIBDP Configuration"String descriptor 5: "iAP Interface"String descriptor 6: "com.flir.rosebud.fileio"String descriptor 7: "com.flir.rosebud.frame"from your log F6c.txt:Code:0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0300 type (H) index (L) type: String Descriptor (0x03) // http://www.beyondlogic.org/usbnutshell/usb5.shtml#StringDescriptors4 wIndex 005 wLength 00DATA0: 80 06 00 03 00 00 ff 00 d4 64-> String Descriptor resultOffset Field Value0 bLength = 041 bDescriptorType = 032 bString 0409--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0302 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 02 03 09 04 ff 00 97 db-> String Descriptor result (FLIR ONE Camera)--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0301 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 01 03 09 04 ff 00 97 e8-> String Descriptor result (FLIR SYSTEMS)--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0303 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 03 03 09 04 ff 00 96 0a-> String Descriptor result (FLIRONEF03F6200xxxx)--0 bmRequestType = 001 bRequest = 09 SET_CONFIGURATION 032 wValue 0003 type (H) index (L)4 wIndex 005 wLength 00DATA0: 00 09 03 00 00 00 00 00 26 c7--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0304 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 04 03 09 04 ff 00 97 bd-> String Descriptor result (SBI BDP Configuration)--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0305 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 05 03 09 04 ff 00 96 6c-> String Descriptor result (iAP Interface)--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0306 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 06 03 09 04 ff 00 96 5f-> String Descriptor result (com.flir.rosebud.fileio)--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0307 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 07 03 09 04 ff 00 97 8e-> String Descriptor result (com.flir.rosebud.frame)Please change the order, so I know whether it is a key.Otherwise I have the trouble, the the first different bytes on USB between our cameras is the serial number with "String descriptor 3: "FLIRONEFXXXXXXXFFF"Is there a key, then it can be only placedafterthe string descriptor 3.my suggest for a attempt is:a = {1,2,3,4,5,6,7};andif (a==7){r = libusb_set_configuration(devh, 3);I also can't find anything magic keys in the Flir One SDK java files. It looks like the magic seqeunce is arranged from the Android operating system (USB handshake).But in your logfile F6c.txt nobody ask for "bConfigurationValue = 3" but gives the command "libusb_set_configuration(dev,0x03)" ...

author: cynfab
author_rank: Regular Contributor
timestamp: December 11, 2015, 04:57:48 pm
content: Here is the log, and code

author: tomas123
author_rank: Frequent Contributor
timestamp: December 11, 2015, 05:29:55 pm
content: GreatIt's sure, that this changed order is not working??Do you for test purposes unplugged the F1 from USB?Please poke a little around this code piece.I'm very interested in!!

author: cynfab
author_rank: Regular Contributor
timestamp: December 11, 2015, 05:54:11 pm
content: Maybe not so great...I moved the set config 3 around a bit and it still worked, then set it back to where it was when I last posted, and it worked.....So I'm not sure what's going on, I'll keep poking at it.Now that I'm getting frames, it would be nice to be able to see what they look like....ken...After running that version several times, sometimes it works, sometimes not.It seems like you can charge the battery at the same time the camera is running too. This will be good for unattended operation.

author: tomas123
author_rank: Frequent Contributor
timestamp: December 11, 2015, 06:16:01 pm
content: Hi cynfab,you are the greatest!!!I searched for an old notebook and installed a clean Linux Mint 17 native to disc (no virtual machine).And now it works fine.The next step is to search the different between "your" Linux Mint and my systems (Ubuntu, OSX).Thanks for your help.

author: cynfab
author_rank: Regular Contributor
timestamp: December 11, 2015, 06:29:43 pm
content: I found that when it doesn't work:libusb_get_string_descriptor langid=0x409String descriptor 1: "FLIR Systems"String descriptor 2: "FLIR ONE Camera"String descriptor 3: "FLIRONEF03F6200571F"String descriptor 4: "SBIBDP Configuration"String descriptor 5: "iAP Interface"String descriptor 6: "com.flir.rosebud.fileio"String descriptor 7: "com.flir.rosebud.frame"Successfully set usb configuration 3Successfully claimed interface 0,1,2stop interface 1 FILEIOstop interface 2 FRAMEstart interface 1 FILEIOControl Out error -1If I try to start the interface again r=0, so maybe the start interface section needs to retry if it gets r=-1.

author: Fraser
author_rank: Super Contributor
timestamp: December 11, 2015, 07:21:38 pm
content: Fascinating reading guys. I do not pretend to understand most of it, but I like seeing your team work to solve problems. I hope your efforts are appreciated by others as well. Please keep posting updates as and when you have the time.Fraser

author: cynfab
author_rank: Regular Contributor
timestamp: December 11, 2015, 07:55:02 pm
content: The FlirONE is capable of better imaging than the FlirONE app shows.The SDK is one way to that end, the other will be via the community developing applications that run on something other than Android devices with Flir's closed library.I'm happy to be able to participate in this effort, as I did in the Seek RE effort....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 11, 2015, 10:42:53 pm
content: happy our, on my Raspberry Pi the code also runs fineI worked the last two weeks at wrong computersCode:$ uname -aLinux raspberryLCD 3.18.13-v7+ #784 SMP PREEMPT Sat May 9 15:57:36 BST 2015 armv7l GNU/Linux$ /usr/bin/gcc -std=c99 '-I/usr/include/libusb-1.0' -o flir flir7f.c -lusb-1.0$ sudo ./flir...: Fri Dec 11 23:40:00 2015bulk read EP 0x85, actual length 166HEX:7b 22 73 68 75 74 74 65 72 53 74 61 74 65 22 3a 22 4f 4e 22 2c 22 73 68 75 74 74 65 72 54 65 6d 70 65 72 61 74 75 72 65 22 3a 33 31 32 2e 32 33 39 39 39 30 32 33 34 33 37 35 2c 22 75 73 62 4e 6f 74 69 66 69 65 64 54 69 6d 65 73 74 61 6d 70 22 3a 31 31 37 34 36 37 32 30 31 30 2e 35 38 37 34 2c 22 75 73 62 45 6e 71 75 65 75 65 64 54 69 6d 65 73 74 61 6d 70 22 3a 31 31 37 34 36 37 32 30 31 30 2e 35 39 33 35 31 2c 22 66 66 63 53 74 61 74 65 22 3a 22 46 46 43 5f 56 41 4c 49 44 5f 52 41 44 22 7d 00STRING:{"shutterState":"ON","shutterTemperature":312.239990234375,"usbNotifiedTimestamp":1174672010.5874,"usbEnqueuedTimestamp":1174672010.59351,"ffcState":"FFC_VALID_RAD"}: Fri Dec 11 23:40:01 2015bulk read EP 0x85, actual length 128208HEX:cf 0b da 0b d2 0b cb 0b c6 0b cd 0b d0 0b cf 0b d2 0b d1 0b d0 0b ca 0b d0 0b cb 0b cb 0b cf 0b cb 0b c6 0b d2 0b cf 0b cd 0b db 0b d5 0b c8 0b cb 0b ce 0b ce 0b cb 0b cd 0b ca 0b d1 0b d1 0b d4 0b ca 0b d9 0b c6 0b ce 0b d6 0b d5 0b cc 0b ca 0b d9 0b c9 0b d5 0b d4 0b d7 0b d3 0b d3 0b cf 0b cf 0b d5 0b d6 0b d1 0b db 0b d7 0b da 0b d2 0b e5 0b e4 0b d3 0b e0 0b d8 0b d6 0b dd 0b e1 0b e8 0b d5 0b dc 0b d9 0b dc 0b de 0b d4 0b d6 0b d9 0b de 0b dc 0b 07 00 b5 7a e2 0b df 0b d8 0b e4 0b d4 0b df 0b d9 0b d8 0b d8 0b d7 0b d7 0b d9 0b e4 0b de 0b e0 0b d7 0b de 0b e3 0b d8 0b e7 0b dc 0b e5 0b e2 0b e6 0b f0 0b ea 0b e0 0b dc 0b de 0b e0 0b d3 0b de 0b d4 0b db 0b da 0b dd 0b e0 0b e2 0b e9 0b e0 0b e5 0b e2 0b ea 0b e2 0b e7 0b e6 0b e2 0b e7 0b e7 0b db 0b e5 0b eb 0b e5 0b e9 0b e8 0b e4 0b ec 0b ee 0b e6 0b e2 0b e5 0b e5 0b e5 0b e4 0b ed 0b de 0b e6 0b e2 0b ee 0b e4 0b f2 0b e8 0b

author: cynfab
author_rank: Regular Contributor
timestamp: December 12, 2015, 01:20:24 am
content: As it turns out you can remove the get string descriptors as well as a lot of other stuff and it still "works".BUT I think there are some timing issues as this code doesn't always work, and sometimes the EP 85 reads come a lot faster than other times....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 12, 2015, 09:22:06 am
content: I think, the best way for stable code is to shorten the code exact to the USB initialization sequence of Flir SDK:- flironesdk/usb/UsbCommunicator.java- flironesdk/Device.java.see my attachment flir7h.cI moved the start/stop interface to state 1Therefore we get while first loop a non ciritical errorbulk transfer (in) 0x81/0x83: LIBUSB_ERROR_TIMEOUTFlir One with Raspberry PiCode:$ /usr/bin/gcc -std=c99 '-I/usr/include/libusb-1.0' -o flir flir7i.c -lusb-1.0analyses of endpoint 0x85 framesuse flir7i.c for saving the frames to disc, code needs 2/3 frames to sync (simple use only frames > 80Kb):(1) first image inside the 0x85 frame is theRAWimage:32 Byte Headerthen164x120 2 Byte Little Endianread with ImageJhttp://imagej.nih.gov/ij/download.htmlFile/Import/RAWor PS:https://www.eevblog.com/forum/testgear/actual-resolution-of-flir-one-v2/msg797330/#msg797330(2) second image is thevisible image JPG640x480starts at byte 39880 with magic byte sequence of jpeg "FF 08 FF C0"Code:$ dd if=EP0x85#00005.bin of=1.jpg bs=1 skip=39880$ identify 1.jpg1.jpg JPEG 640x480 640x480+0+0 8-bit sRGB 69.3KB 0.000u 0:00.000(3) at the end a string with somestatus infomationsCode:0001a8b0 ff d9 00 00 00 00 00 00 7b 22 73 68 75 74 74 65 |........{"shutte|0001a8c0 72 53 74 61 74 65 22 3a 22 4f 4e 22 2c 22 73 68 |rState":"ON","sh|0001a8d0 75 74 74 65 72 54 65 6d 70 65 72 61 74 75 72 65 |utterTemperature|0001a8e0 22 3a 33 31 33 2e 35 31 39 39 38 39 30 31 33 36 |":313.5199890136|0001a8f0 37 32 2c 22 75 73 62 4e 6f 74 69 66 69 65 64 54 |72,"usbNotifiedT|0001a900 69 6d 65 73 74 61 6d 70 22 3a 31 31 37 34 37 31 |imestamp":117471|0001a910 36 31 33 35 2e 37 34 35 37 33 2c 22 75 73 62 45 |6135.74573,"usbE|0001a920 6e 71 75 65 75 65 64 54 69 6d 65 73 74 61 6d 70 |nqueuedTimestamp|0001a930 22 3a 31 31 37 34 37 31 36 31 33 35 2e 37 34 37 |":1174716135.747|0001a940 33 36 2c 22 66 66 63 53 74 61 74 65 22 3a 22 46 |36,"ffcState":"F|0001a950 46 43 5f 56 41 4c 49 44 5f 52 41 44 22 7d 00 |FC_VALID_RAD"}.|at usbEnqueuedTimestamp you see, that the frame rate is only 5 fpsCode:$ strings -n 60 EP0x85*.bin{"shutterState":"ON","shutterTemperature":313.450012207031,"usbNotifiedTimestamp":1174716129.83373,"usbEnqueuedTimestamp":1174716129.83571,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.459991455078,"usbNotifiedTimestamp":1174716130.15704,"usbEnqueuedTimestamp":1174716130.15865,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.459991455078,"usbNotifiedTimestamp":1174716130.36589,"usbEnqueuedTimestamp":1174716130.36731,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.459991455078,"usbNotifiedTimestamp":1174716130.58713,"usbEnqueuedTimestamp":1174716130.5937,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.470001220703,"usbNotifiedTimestamp":1174716130.80297,"usbEnqueuedTimestamp":1174716130.80479,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.470001220703,"usbNotifiedTimestamp":1174716131.01766,"usbEnqueuedTimestamp":1174716131.0193,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.489990234375,"usbNotifiedTimestamp":1174716131.23305,"usbEnqueuedTimestamp":1174716131.2348,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.489990234375,"usbNotifiedTimestamp":1174716131.44797,"usbEnqueuedTimestamp":1174716131.44984,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.480010986328,"usbNotifiedTimestamp":1174716131.66307,"usbEnqueuedTimestamp":1174716131.6651,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.489990234375,"usbNotifiedTimestamp":1174716131.8858,"usbEnqueuedTimestamp":1174716131.88725,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.5,"usbNotifiedTimestamp":1174716132.1132,"usbEnqueuedTimestamp":1174716132.11485,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.489990234375,"usbNotifiedTimestamp":1174716132.34005,"usbEnqueuedTimestamp":1174716132.34374,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.489990234375,"usbNotifiedTimestamp":1174716132.5623,"usbEnqueuedTimestamp":1174716132.56389,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.5,"usbNotifiedTimestamp":1174716132.79527,"usbEnqueuedTimestamp":1174716132.79729,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.5,"usbNotifiedTimestamp":1174716133.01296,"usbEnqueuedTimestamp":1174716133.01477,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.5,"usbNotifiedTimestamp":1174716133.23994,"usbEnqueuedTimestamp":1174716133.24187,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.510009765625,"usbNotifiedTimestamp":1174716133.4633,"usbEnqueuedTimestamp":1174716133.46513,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.519989013672,"usbNotifiedTimestamp":1174716133.67718,"usbEnqueuedTimestamp":1174716133.6789,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.519989013672,"usbNotifiedTimestamp":1174716133.89206,"usbEnqueuedTimestamp":1174716133.89397,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.510009765625,"usbNotifiedTimestamp":1174716134.00615,"usbEnqueuedTimestamp":1174716134.00789,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.519989013672,"usbNotifiedTimestamp":1174716134.21907,"usbEnqueuedTimestamp":1174716134.22141,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.519989013672,"usbNotifiedTimestamp":1174716134.43391,"usbEnqueuedTimestamp":1174716134.43569,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.519989013672,"usbNotifiedTimestamp":1174716134.65212,"usbEnqueuedTimestamp":1174716134.65416,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.529998779297,"usbNotifiedTimestamp":1174716134.86733,"usbEnqueuedTimestamp":1174716134.86918,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.540008544922,"usbNotifiedTimestamp":1174716135.08135,"usbEnqueuedTimestamp":1174716135.08307,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.540008544922,"usbNotifiedTimestamp":1174716135.29754,"usbEnqueuedTimestamp":1174716135.29895,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.529998779297,"usbNotifiedTimestamp":1174716135.52014,"usbEnqueuedTimestamp":1174716135.52226,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.519989013672,"usbNotifiedTimestamp":1174716135.74573,"usbEnqueuedTimestamp":1174716135.74736,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.529998779297,"usbNotifiedTimestamp":1174716135.97042,"usbEnqueuedTimestamp":1174716135.97194,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.529998779297,"usbNotifiedTimestamp":1174716136.08966,"usbEnqueuedTimestamp":1174716136.09131,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.540008544922,"usbNotifiedTimestamp":1174716136.3133,"usbEnqueuedTimestamp":1174716136.31491,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":313.529998779297,"usbNotifiedTimestamp":1174716136.52721,"usbEnqueuedTimestamp":1174716136.53921,"ffcState":"FFC_VALID_RAD"}

author: cynfab
author_rank: Regular Contributor
timestamp: December 12, 2015, 04:57:56 pm
content: tomas123,Very nice.I ran flir7i and it dumped many files before I realized it. Looking at the EP85 ones, I see ones that are pure jpg, some are pure thermal, some are combined, some are shuter state and some are 28 bytes of who knows what.Code:-rw-r--r-- 1 kenm kenm 107921 Dec 12 09:11 EP0x85#00023.bin-rw-r--r-- 1 kenm kenm 26896 Dec 12 09:11 EP0x85#00024.bin-rw-r--r-- 1 kenm kenm 168 Dec 12 09:11 EP0x85#00025.bin-rw-r--r-- 1 kenm kenm 28 Dec 12 09:11 EP0x85#00026.bin-rw-r--r-- 1 kenm kenm 39852 Dec 12 09:11 EP0x85#00027.bin-rw-r--r-- 1 kenm kenm 63289 Dec 12 09:11 EP0x85#00028.bin-rw-r--r-- 1 kenm kenm 28 Dec 12 09:11 EP0x85#00029.bin-rw-r--r-- 1 kenm kenm 39852 Dec 12 09:11 EP0x85#00030.bin-rw-r--r-- 1 kenm kenm 93785 Dec 12 09:11 EP0x85#00031.bin-rw-r--r-- 1 kenm kenm 28 Dec 12 09:11 EP0x85#00032.bin-rw-r--r-- 1 kenm kenm 39852 Dec 12 09:11 EP0x85#00033.bin-rw-r--r-- 1 kenm kenm 93385 Dec 12 09:11 EP0x85#00034.bin-rw-r--r-- 1 kenm kenm 28 Dec 12 09:11 EP0x85#00035.bin-rw-r--r-- 1 kenm kenm 39852 Dec 12 09:11 EP0x85#00036.bin-rw-r--r-- 1 kenm kenm 93201 Dec 12 09:11 EP0x85#00037.bin-rw-r--r-- 1 kenm kenm 77944 Dec 12 09:11 EP0x85#00038.bin-rw-r--r-- 1 kenm kenm 169 Dec 12 09:11 EP0x85#00039.bin-rw-r--r-- 1 kenm kenm 28 Dec 12 09:11 EP0x85#00040.bin-rw-r--r-- 1 kenm kenm 39852 Dec 12 09:11 EP0x85#00041.bin-rw-r--r-- 1 kenm kenm 103896 Dec 12 09:11 EP0x85#00042.bin-rw-r--r-- 1 kenm kenm 124008 Dec 12 09:11 EP0x85#00043.bin-rw-r--r-- 1 kenm kenm 169 Dec 12 09:11 EP0x85#00044.bin-rw-r--r-- 1 kenm kenm 132952 Dec 12 09:11 EP0x85#00045.bin-rw-r--r-- 1 kenm kenm 169 Dec 12 09:11 EP0x85#00046.bin-rw-r--r-- 1 kenm kenm 116440 Dec 12 09:11 EP0x85#00047.bin-rw-r--r-- 1 kenm kenm 169 Dec 12 09:11 EP0x85#00048.bin-rw-r--r-- 1 kenm kenm 28 Dec 12 09:11 EP0x85#00049.binEP0x85#00036 thermalEP0x85#00037 jpgEP0x85#00038EP0x85#00039 shutterEP0x85#00040 28 byteEP0x85#00043 combinedOr maybe I'm missing something

author: sonic
author_rank: Regular Contributor
timestamp: December 12, 2015, 05:36:27 pm
content: Quote from: Ben321 on October 04, 2015, 03:12:39 amI did this with the help of SmartCam. I modified the Android SDK example to send a MJPEG stream to it via WiFi. Details onmy website.

author: tomas123
author_rank: Frequent Contributor
timestamp: December 13, 2015, 08:43:53 am
content: Hi sonic,good workDo you know my posts about the SDK?You can edit the sdk java files and also switch from cropped to full lepton resolution. Read this thread for more informations...Quote from: tomas123 on November 13, 2015, 01:21:25 pmbackground:http://stackoverflow.com/questions/21417419/how-to-convert-aar-to-jarQuotenext step:Android Studio / File / Project StructurModules "app" / Dependencies / + "Module Dependency" and select FlirSDKSDK without cropped images (full resolution 160x120):change SDK path for CameraFiles from intern/data/data/com.flir.flironeexampleapplication/files/CameraFilesto extern/sdcard/Android/data/com.flir.flironeexampleapplication/files/CameraFilesby editing two code linesCode:\FLIROneSDKBundle\FLIRONEExampleApplication\app\src\main\java\com\flir>grep -r -n -A1 getFilesDir *flironesdk/Device.java:213: //FrameProcessor.updateCameraFiles(zis, cachedContext.getFilesDir().getAbsolutePath() + File.separator);flironesdk/Device.java-214- FrameProcessor.updateCameraFiles(zis, cachedContext.getExternalFilesDir(null).getAbsolutePath() + File.separator);--flironesdk/FrameProcessor.java:101: // String storagePath = context.getFilesDir().getAbsolutePath() + File.separator;flironesdk/FrameProcessor.java-102- String storagePath = context.getExternalFilesDir(null).getAbsolutePath() + File.separator;next step is avoid overwriting your filecalib.rscafter starting the apkedit the function updateCameraFiles() in file FrameProcessor.javaCode:static void updateCameraFiles(ZipInputStream zis, String storagePath){try{ZipEntry ze;while ((ze = zis.getNextEntry()) != null) {File f = new File(storagePath + ze.getName());if ((!f.exists())||(!ze.getName().endsWith( "calib.rsc"))){if (ze.isDirectory()) {//File f = new File(storagePath + ze.getName());if (!f.isDirectory()) {f.mkdirs();}} else {File parentDir = new File(storagePath + ze.getName()).getParentFile();if (( null != parentDir) &&(!parentDir.isDirectory())) {parentDir.mkdirs();}BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(storagePath + ze.getName()));byte[] bytesIn = new byte['?' ];int read;while ((read = zis.read(bytesIn)) != - 1) {bos.write(bytesIn, 0, read);}zis.closeEntry();bos.flush();bos.close();}}}zis.close();}catch (IOException e){e.printStackTrace();}}simple delete/sdcard/Android/data/com.flir.flironeexampleapplication/files/CameraFiles/system/calib.rscfor getting a fresh version of the file from the FlirOne Flashnow you can edit your calib.rsc (without always overwriting with original file from your F1)edit your calib.rsc to remove the crop factor by removing the.calib.lensCorrpartthe crop factor is inside *.fff files, this files are not bad pixel map files (like Ex):Code:.calib.lensCorr entry.calib.lensCorr.ds_we_ap_fi_le index.calib.lensCorr.ds_we_ap_fi_le.enabled bool true.calib.lensCorr.ds_we_ap_fi_le.fileName text "ds_we_ap_fi_le_LCFMap.fff".calib.lensCorr.ds_we_ap_fi_le.rotation double 0.345.calib.lensCorr.ds_we_ap_fi_le.type int32 100.calib.lensCorr.ds_we_ap_fi_le.zoom double 7.69.calib.lensCorr.ds_we_ap_fi_leExFOL2 index.calib.lensCorr.ds_we_ap_fi_leExFOL2.enabled bool true.calib.lensCorr.ds_we_ap_fi_leExFOL2.fileName text "ds_we_ap_fi_leExFOL2_LCFMap.fff".calib.lensCorr.ds_we_ap_fi_leExFOL2.rotation double 0.345.calib.lensCorr.ds_we_ap_fi_leExFOL2.type int32 100.calib.lensCorr.ds_we_ap_fi_leExFOL2.zoom double 7.69calc a new checksum crcCode:// crc32 sample on bash command line// count lines$ wc -l calib.rsc646 calib.rsc//print last line$ tail -n1 calib.rsc# CRC32 4683a151//calc a new crc32 for (n-1) lines$ crc32 <(head -n 645 calib.rsc)4683a151first try this steps with an original fileinside the large E4 thread in this forum you find some more methods for calculating the Flir CRCa hint: the FlirOne App from Play Store save the original CameraFiles also to the visible path:/sdcard/Android/data/com.flir.flirone/files/CameraFiles.zipCameraFilesSimu.zipHere you can always get an original (unpatched) CameraFiles.zip.view my thermal galleryhttps://www.eevblog.com/forum/testgear/flir-e4-thermal-imaging-camera-teardown/msg802245/#msg802245Quote from: tomas123 on November 17, 2015, 02:50:47 pm

author: tomas123
author_rank: Frequent Contributor
timestamp: December 13, 2015, 11:37:37 am
content: Hi sonic,I saw in your code, that you modified the function onFrameProcessed().Here is my code modification for onFrameProcessed() for saving full size raw images to *.rawQuote from: tomas123 on November 20, 2015, 01:05:33 am

author: tomas123
author_rank: Frequent Contributor
timestamp: December 13, 2015, 12:02:57 pm
content: Hi cynfab,you are right.On my Raspberry Pi this glitches rarely happens, but they appear.See my log from the first 300 frames.Code:-rw-r--r-- 1 root root 28 2015-12-13 12:47:47.628956961 +0100 EP0x85#00221.bin-rw-r--r-- 1 root root 38828 2015-12-13 12:47:47.838952429 +0100 EP0x85#00222.bin-rw-r--r-- 1 root root 63830 2015-12-13 12:47:48.048947898 +0100 EP0x85#00223.binthere are also jumbo framesCode:-rw-r--r-- 1 root root 206830 2015-12-13 12:47:44.959014674 +0100 EP0x85#00207.binWe know, that the USB Buffer size is limited to 512 Bytes (see lsusb -v and USB specification) .The libusb driver glues the packets together to a "frame".QuoteI think, its simple to handle this different frame size in software.One possibly is to stitch the packets self to a full frame (thermal+jpg+status)Please look also at the full time stamp. Do you have another frame rate??Quote from: cynfab on December 12, 2015, 01:20:24 amanother minor information:Now we know, that the header is not 32, but 28 Bytes and the raw image begins with the two status lines (2 Pixel * 16 Bit = 4 Byte).With a 32 Byte header the status lines are in the middle and on the right side of the image.Code:-rw-r--r-- 1 kenm kenm 28 Dec 12 09:11 EP0x85#00029.bin-rw-r--r-- 1 kenm kenm 39852 Dec 12 09:11 EP0x85#00030.binUntil yet I not thought deeper about this 4 columns.Encryptededdy linked this, but I think our columns (120px) are not telemetry datas (lines with 160 px) :Quote from: encryptededdy on November 10, 2015, 07:58:53 pm

author: tomas123
author_rank: Frequent Contributor
timestamp: December 13, 2015, 01:07:31 pm
content: Hi cynfab,Code:-rw-r--r-- 1 root root 167 2015-12-13 12:47:54.798802942 +0100 EP0x85#00254.bin-rw-r--r-- 1 root root 39340 2015-12-13 12:47:55.008798450 +0100 EP0x85#00255.bin-rw-r--r-- 1 root root 70983 2015-12-13 12:47:55.228793750 +0100 EP0x85#00256.binafter looking inside the glitch frames I get this result:1. All packets with size about 60k are correct jpeg images without errors (begins with magic byte sequence of jpeg "FF 08 FF C0").2. All packets with size about 40k are broken raw images, which misses the first/second line3. All packets with size of 168 Bytes are correct status strings4. All packets with size of 28 Bytes are the header bytes of a regular full frame (thermal+jpg+status)my interpretation:The FlirOne has an internal (timing/sync) problem with the i2c bus to lepton sensor.This results sometimes in loosing the first lines of thermal sensor and as a result of this we get the usb glitches.-> litter this frames (my waste quote is 10/314 frames = 3%)my jumbo frames (200k) are two regular frames (thermal+jpg+status) without the second status, which follows behind with 169 ByteCode:-rw-r--r-- 1 root root 103719 2015-12-13 12:47:46.988970775 +0100 EP0x85#00218.bin-rw-r--r-- 1 root root 206879 2015-12-13 12:47:47.218965810 +0100 EP0x85#00219.bin-rw-r--r-- 1 root root 167 2015-12-13 12:47:47.418961494 +0100 EP0x85#00220.binfor another readers:currently Flir doesn't public infos about the Leptons radiometric feature:http://www.flir.com/cvs/cores/knowledgebase/index.cfm?CFTREEITEMKEY=914&view=67485the FlirOne is currently the only chance to get radiometric datas from Lepton 3 sensor (with black body calibration, thanks to Flir!!)

author: cynfab
author_rank: Regular Contributor
timestamp: December 14, 2015, 05:06:36 pm
content: Hi tomas123,All interesting stuff.I think we need to look carefully at how the FlirOne SDK example and the decompiled SDK files work. As well as considering the use of libusb's Async API.I should have some time this week to dig into things.

author: cynfab
author_rank: Regular Contributor
timestamp: December 14, 2015, 10:53:06 pm
content: I've figured out most of what the 28byte header is about:A typical 28 byte header:ef be 00 00 01 00 00 00 b3 02 02 00 ac 9b 00 00 <<< oops typo in orig post60 66 01 00 a7 00 00 00 cf 4f 12 3c 00 30 ef 9eFrom EPx85#00035.bin which is the combined thermal & jpeg.ls -la-rw-r--r-- 1 kenm kenm 91911 Dec 14 14:25 1.jpg-rw-r--r-- 1 kenm kenm 131791 Dec 14 12:32 EP0x85#00035.bindd if=EP0x85#00035.bin of=1.jpg bs=1 skip=3988091911+0 records in91911+0 records out91911 bytes (92 kB) copied, 0.140179 s, 656 kB/sidentify 1.jpg1.jpg JPEG 640x480 640x480+0+0 8-bit DirectClass 91.9KB 0.000u 0:00.000This jpeg has no EXIF data.location of status start28 + thermal image length + length of jpeg:28 + 39852 + 91744 = 131624dd if=EP0x85#00035.bin of=1.txt bs=1 skip=131624167+0 records in167+0 records out167 bytes (167 B) copied, 0.000448197 s, 373 kB/scat 1.txt{"shutterState":"FFC","shutterTemperature":307.850006103516,"usbNotifiedTimestamp":1176851589.8668,"usbEnqueuedTimestamp":1176851589.86892,"ffcState":"FFC_VALID_RAD"}shutter states are FFC | ONffc states are Valid | Desired(maybe more)Byte Fields:0 ef1 be2 003 004 015 006 007 008-b file (less 28 byte header) length: 02 02 b3 = 131763 + 28 = 131791c-f length of thermal image: 9b ac = 39852 + 28 byte header = 3988010-14 length of jpeg image: 01 66 60 = 91744 -> 91911 - 91744 = 16714-17 length of status: a7 = 16718-1b ?? still need to figure out what this is1c-1d 00|10|20|30|40|50|60|70|80 ?? still need this1e-1f checksum ?? this too....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 15, 2015, 07:27:45 am
content: Wow!!I also looked inside the header but overlooked thermal/jpg image sizeQuotefor comparing as attachment 300 headers from my logI filtered my glitches with "-size +90k", but sometimes (after a glitch) slips the status string to the header of the next "full frame"The combination of image size >90k and magic bytes "ef be" is the best marker.Code:$ for i in $(find . -type f -name "EP0x85*" -size +90k); do ls -al $i; hexdump -C -n 32 $i;done-rw-r--r--@ 1 tom staff 101476 13 Dez 12:47 ./EP0x85#00006.bin00000000 ef be 00 00 01 00 00 00 48 8c 01 00 ac 9b 00 00 |........H.......|00000010 00 f0 00 00 9c 00 00 00 32 b8 42 8a 00 40 6e 6f |........2.B..@no|00000020-rw-r--r--@ 1 tom staff 101516 13 Dez 12:47 ./EP0x85#00007.bin00000000 ef be 00 00 01 00 00 00 70 8c 01 00 ac 9b 00 00 |........p.......|00000010 28 f0 00 00 9c 00 00 00 7d 1b da 22 00 50 a3 d0 |(.......}..".P..|00000020-rw-r--r--@ 1 tom staff 101430 13 Dez 12:47 ./EP0x85#00008.bin00000000 ef be 00 00 01 00 00 00 1a 8c 01 00 ac 9b 00 00 |................|00000010 d0 ef 00 00 9e 00 00 00 85 07 39 f8 00 50 3e 6b |..........9..P>k|00000020-rw-r--r--@ 1 tom staff 101336 13 Dez 12:47 ./EP0x85#00009.bin00000000 ef be 00 00 01 00 00 00 64 8c 01 00 ac 9b 00 00 |........d.......|00000010 10 f0 00 00 a8 00 00 00 5a 4e ad 39 00 50 b4 c5 |........ZN.9.P..|00000020-rw-r--r--@ 1 tom staff 101488 13 Dez 12:47 ./EP0x85#00011.bin00000000 ef be 00 00 01 00 00 00 fc 8c 01 00 ac 9b 00 00 |................|00000010 a8 f0 00 00 a8 00 00 00 6d cf 77 f5 00 70 d5 1e |........m.w..p..|00000020-rw-r--r--@ 1 tom staff 101719 13 Dez 12:47 ./EP0x85#00012.bin00000000 7b 22 73 68 75 74 74 65 72 53 74 61 74 65 22 3a |{"shutterState":|00000010 22 46 46 43 22 2c 22 73 68 75 74 74 65 72 54 65 |"FFC","shutterTe|00000020-rw-r--r--@ 1 tom staff 101647 13 Dez 12:47 ./EP0x85#00013.bin00000000 ef be 00 00 01 00 00 00 f3 8c 01 00 ac 9b 00 00 |................|00000010 a0 f0 00 00 a7 00 00 00 b4 a3 1b f0 00 30 20 d3 |.............0 .|00000020-rw-r--r--@ 1 tom staff 141638 13 Dez 12:47 ./EP0x85#00014.bin00000000 ef be 00 00 01 00 00 00 62 8d 01 00 ac 9b 00 00 |........b.......|00000010 10 f1 00 00 a6 00 00 00 d1 80 6f 95 00 60 b7 0b |..........o..`..|00000020-rw-r--r--@ 1 tom staff 101847 13 Dez 12:47 ./EP0x85#00016.bin00000000 ef be 00 00 01 00 00 00 bb 8d 01 00 ac 9b 00 00 |................|00000010 68 f1 00 00 a7 00 00 00 df 46 b9 1b 00 50 dc 5b |h........F...P.[|00000020-rw-r--r--@ 1 tom staff 101861 13 Dez 12:47 ./EP0x85#00017.bin00000000 ef be 00 00 01 00 00 00 c9 8d 01 00 ac 9b 00 00 |................|00000010 78 f1 00 00 a5 00 00 00 05 29 cd 95 00 30 33 4c |x........)...03L|00000020-rw-r--r--@ 1 tom staff 101783 13 Dez 12:47 ./EP0x85#00018.bin00000000 ef be 00 00 01 00 00 00 7b 8d 01 00 ac 9b 00 00 |........{.......|00000010 28 f1 00 00 a7 00 00 00 3c 9f a7 40 00 40 cc ad |(.......<..@.@..|00000020-rw-r--r--@ 1 tom staff 101631 13 Dez 12:47 ./EP0x85#00019.bin00000000 ef be 00 00 01 00 00 00 e3 8c 01 00 ac 9b 00 00 |................|00000010 90 f0 00 00 a7 00 00 00 57 ce f1 93 00 50 8b 4c |........W....P.L|00000020-rw-r--r--@ 1 tom staff 101839 13 Dez 12:47 ./EP0x85#00020.bin00000000 ef be 00 00 01 00 00 00 b3 8d 01 00 ac 9b 00 00 |................|00000010 60 f1 00 00 a7 00 00 00 25 c2 4f bb 00 60 59 53 |`.......%.O..`YS|00000020-rw-r--r--@ 1 tom staff 101871 13 Dez 12:47 ./EP0x85#00021.bin00000000 ef be 00 00 01 00 00 00 d3 8d 01 00 ac 9b 00 00 |................|00000010 80 f1 00 00 a7 00 00 00 c3 6a de 01 00 20 59 89 |.........j... Y.|00000020-rw-r--r--@ 1 tom staff 100807 13 Dez 12:47 ./EP0x85#00022.bin00000000 ef be 00 00 01 00 00 00 ab 89 01 00 ac 9b 00 00 |................|00000010 58 ed 00 00 a7 00 00 00 e5 b8 51 52 00 40 66 41 |X.........QR.@fA|00000020-rw-r--r--@ 1 tom staff 100775 13 Dez 12:47 ./EP0x85#00023.bin00000000 ef be 00 00 01 00 00 00 8b 89 01 00 ac 9b 00 00 |................|00000010 38 ed 00 00 a7 00 00 00 23 63 85 95 00 50 56 d3 |8.......#c...PV.|00000020

author: tomas123
author_rank: Frequent Contributor
timestamp: December 15, 2015, 03:51:47 pm
content: Hi cynfab,your infos forendpoint 0x85in formatted notation:dump header$ hexdump -C -n 32 ./EP0x85#00019.bin-rw-r--r--@ 1 tom staff10163113 Dez 12:47 ./EP0x85#00019.bin00000000 ef be 00 00 01 00 00 00 e3 8c 01 00 ac 9b 00 00 |................|00000010 90 f0 00 00 a7 00 00 00 57 ce f1 93 00 50 8b 4c |........W....P.L|-> file size 101.631 Byteheader -28 Byte---------------------frame size101.603 Byte--------------------------------------headeraddress00000000 ef be 00 00 magic bytes 0xEF 0xBE00000004 01 00 00 00 0x0000000100000008 e3 8c 01 00 0x00018CE3 = 101.603 byteframe size0000000C ac 9b 00 00 0x00009BAC = 39.852 bytethermal image size00000010 90 f0 00 00 0x0000F090 = 61.584 bytejpg image size00000014 a7 00 00 00 0x000000A7 = 167 bytestatus string size------------total: 101.603 byte frame size00000018 57 ce f1 93 unknown0000001C 00 50 8b 4c unknown--------------------------------------------start adressessize adress (in dezimal)0000000 magic bytes 0xEF 0xBE+ 28 0000028thermal imagewith size of 39.852 byte+ 39.852 0039880jpg imagewith size of 61.584 byte+ 61.584 0101464status stringwith size of 167 byte+ 167---------101.631 total file sizeQuote from: cynfab on December 14, 2015, 10:53:06 pm

author: tomas123
author_rank: Frequent Contributor
timestamp: December 15, 2015, 04:11:09 pm
content: Hi cynfab,some infos:my next step (on weekend) is to write a code for a V4L2 loopback devices (/dev/video0)Then we can simple connect the FlirOne with Linux video world3 month ago I supplemented the great code from user tmbincwith a loopback "driver" for the Flir E4, therefore I can recycle most of the the code.see:https://www.eevblog.com/forum/testgear/flir-ex-realtime-raw-radiometric-data-streaming-via-uvc/msg756530/#msg756530another thermal video concept with OpenCV comes from user Bud:see my linklist:https://www.eevblog.com/forum/testgear/flir-ex-realtime-raw-radiometric-data-streaming-via-uvc/msg729604/#msg729604

author: cynfab
author_rank: Regular Contributor
timestamp: December 15, 2015, 05:05:02 pm
content: Hi tomas123,I was going to do a better job of documenting the EP 81 & EP 83 headers, but here are my raw notes:Header for EP 81 data16 bytescc 01 00 00 01 00 00 00 55 00 00 00 30 73 8c df00-03 Header ID cc 01 00 0004 0105 0006 0006 0008-0b 00 00 00 55 length of message0c ??0d ??0e-0f checksum ??10-end-1 status messageend 00++++++++++++++++++++++++header for the EP83 --> camerafiles.zip24 bytes10 55 00 00 01 00 00 00 b7 1a 00 00 0a 00 00 0000 99 9d 5d 2c 91 a3 df00-03 header ID 10 55 00 0004 0105 0006 0007 0008-0b 00 00 1a b7 = 6839 length of CameraFiles.zip0c0d0e0f10111213141516-17 checksum ??18-end CameraFiles.zipI'd like to see a v4l2 driver too, but I haven't the skills to create one from scratch.I'd also like to replicate my dual view android app, maybe as an offshoot of your v4l2 work....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 17, 2015, 12:17:23 am
content: Hi cynfab,I copied the framebuffer and v4l2 code parts from herehttps://www.eevblog.com/forum/testgear/flir-ex-realtime-raw-radiometric-data-streaming-via-uvc/msg756530/#msg756530to our code.This code is only a first buggy study!!hardware:raspberry pi$ uname -aLinux raspberryLCD 3.18.13-v7+ #784 SMP PREEMPT Sat May 9 15:57:36 BST 2015 armv7l GNU/Linuxflir8a.cwrites the thermal video stream only to the linux framebuffer.You must switch from your x session to a virtual console (native shell) to see the framebuffer.I wrote the code for my raspberry display 800x480 in 16 bit.See comments in code for another resolution and bit depth.compile withCode:$ /usr/bin/gcc -std=c99 '-I/usr/include/libusb-1.0' -o flir flir8a.c -lusb-1.0 -lmCode:$ sudo ./flirThe framebuffer device opened.Successfully find the Flir One G2 deviceSuccessfully set usb configuration 3Successfully claimed interface 0,1,2stop interface 2 FRAMEstop interface 1 FILEIOstart interface 1 FILEIO:xx Thu Dec 17 01:08:24 2015: Thu Dec 17 01:08:24 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x81: LIBUSB_ERROR_TIMEOUT: Thu Dec 17 01:08:25 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x83: LIBUSB_ERROR_TIMEOUTask for CameraFiles.zip on EP 0x83:: Thu Dec 17 01:08:26 2015EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 41 00 00 00 f8 b3 f7 00 ]Write successful!EP 0x02 to be sent: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}Write successful!Sent 65 bytes with string: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 33 00 00 00 ef db c1 c1 ]Write successful!EP 0x02 to be sent 51 Bytes: {"type":"readFile","data":{"streamIdentifier":10}}Write successful!Sent 51 bytes with string: {"type":"readFile","data":{"streamIdentifier":10}}: Thu Dec 17 01:08:26 2015flir8b.cwrites the thermal video stream to the linux framebufferand/dev/video0read my notes to install v4l2loopback on a raspberry pihttps://www.eevblog.com/forum/testgear/flir-ex-realtime-raw-radiometric-data-streaming-via-uvc/msg756530/#msg756530and for a V4L2 loopback device under Ubuntuhttps://www.eevblog.com/forum/testgear/flir-ex-realtime-raw-radiometric-data-streaming-via-uvc/msg756831/#msg756831don't forget to load the kernel driver:Code:$ sudo depmod -a `uname -r`$ sudo modprobe v4l2loopback$ lsmodModule Size Used byv4l2loopback 23348 0videodev 122487 1 v4l2loopbackFor v4l2 I removed the switch "std=c99" (avoid "/usr/include/linux/videodev2.h:2090:20: error: field ‘timestamp’ has incomplete type").Compile withCode:$ /usr/bin/gcc '-I/usr/include/libusb-1.0' -o flir flir8b.c -lusb-1.0 -lmstart withCode:$ sudo ./flirThe framebuffer device opened.Successfully find the Flir One G2 deviceSuccessfully set usb configuration 3Successfully claimed interface 0,1,2using output device: /dev/video0vid_format->type =2vid_format->fmt.pix.width =160vid_format->fmt.pix.height =120vid_format->fmt.pix.pixelformat =1497715271vid_format->fmt.pix.sizeimage =20480vid_format->fmt.pix.field =1vid_format->fmt.pix.bytesperline=160vid_format->fmt.pix.colorspace =8stop interface 2 FRAMEstop interface 1 FILEIOstart interface 1 FILEIO:xx Thu Dec 17 00:52:26 2015: Thu Dec 17 00:52:26 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x81: LIBUSB_ERROR_TIMEOUT: Thu Dec 17 00:52:27 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x83: LIBUSB_ERROR_TIMEOUTask for CameraFiles.zip on EP 0x83:: Thu Dec 17 00:52:28 2015EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 41 00 00 00 f8 b3 f7 00 ]Write successful!EP 0x02 to be sent: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}Write successful!Sent 65 bytes with string: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 33 00 00 00 ef db c1 c1 ]Write successful!EP 0x02 to be sent 51 Bytes: {"type":"readFile","data":{"streamIdentifier":10}}Write successful!Sent 51 bytes with string: {"type":"readFile","data":{"streamIdentifier":10}}: Thu Dec 17 00:52:28 2015: Thu Dec 17 00:52:28 2015bulk read EP 0x81, actual length 23HEX:STRING:gMode":"operational"}}Ask for video stream, start EP 0x85:: Thu Dec 17 00:52:28 2015bulk read EP 0x81, actual length 108HEX:STRING:?\?<??{"type":"openFileStatus","data":{"path":"CameraFiles.zip","streamIdentifier":9,"mode":"r"}}use mplayer to get the streamCode:$ sudo mplayer tv:// -tv driver=v4l2:device=/dev/video0MPlayer svn r34540 (Raspbian), built with gcc-4.6 (C) 2000-2012 MPlayer Teammplayer: could not connect to socketmplayer: No such file or directoryFailed to open LIRC support. You will not be able to use your remote control.Playing tv://.TV file format detected.Selected driver: v4l2name: Video 4 Linux 2 inputauthor: Martin Olschewski <olschewski@zpr.uni-koeln.de>comment: first try, more to come ;-)v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.Selected device: Dummy video device (0x0000)Capabilities: video capture read/write streamingsupported norms:inputs: 0 = loopback;Current input: 0Current format: GREY...==========================================================================Opening video decoder:  RAW Uncompressed VideoCould not find matching colorspace - retrying with -vf scale...Opening video filter: Movie-Aspect is undefined - no prescaling applied.[swscaler @ 0x562380] using unscaled gray -> yuv420p special converterVO:  160x120 => 160x120 Planar YV12PS: I have the suspicion that thedelayof flir8a.c (frame buffer) is a little bit greater as in the Flir App in modeThermalLinearFlux14BitImage

author: cynfab
author_rank: Regular Contributor
timestamp: December 17, 2015, 12:40:30 am
content: Hi tomas123,wow that was fast, looks very interesting, I'll be playing with that code over the next few days.Nice job!!...ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 17, 2015, 12:43:27 am
content: only cut and pasteframe buffer works fine, but v4l2 needs some tuning...the original frame buffer code comes from user tmbincwatch his video:https://www.eevblog.com/forum/testgear/flir-ex-realtime-raw-radiometric-data-streaming-via-uvc/msg626608/#msg626608and get the code (another resolution):https://www.eevblog.com/forum/testgear/flir-ex-realtime-raw-radiometric-data-streaming-via-uvc/msg736344/#msg736344please note the great font.h

author: tomas123
author_rank: Frequent Contributor
timestamp: December 17, 2015, 11:06:29 pm
content: flir8b.c writes the thermal video stream to /dev/video0 and works better than expected.Runs since hours rock stable!here my experiences with alive stream from raspberry pi to my notebook:start Flir One video grabber on raspberry piCode:$ sudo modprobe v4l2loopback$ /usr/bin/gcc '-I/usr/include/libusb-1.0' -o flir flir8b.c -lusb-1.0 -lm$ sudo ./flirstart a video server on raspberry pi withavconv and stream /dev/video0to my notebook with address 192.168.1.42(parameters yet not adjusted)Code:$ avconv -f video4linux2 -i /dev/video0 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.1.42:1234avconv version 9.14-6:9.14-1rpi1rpi1, Copyright (c) 2000-2014 the Libav developersbuilt on Jul 22 2014 15:08:12 with gcc 4.6 (Debian 4.6.3-14+rpi1)[video4linux2 @ 0x1ffc740] Estimating duration from bitrate, this may be inaccurateInput #0, video4linux2, from '/dev/video0':Duration: N/A, start: 1450392797.097902, bitrate: 4608 kb/sStream #0.0: Video: rawvideo, gray, 160x120, 4608 kb/s, 1000k tbn, 30 tbcOutput #0, rtp, to 'rtp://192.168.1.42:1234':Metadata:encoder : Lavf54.20.4Stream #0.0: Video: mpeg2video, yuv420p, 160x120, q=2-31, 2600 kb/s, 90k tbn, 25 tbcStream mapping:Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)...Press ctrl-c to stop encodingframe=23557 fps= 25 q=2.0 size= 14522kB time=942.20 bitrate= 126.3kbits/son my notebook:startVLCand open the stream withvlc / open networkCode:rtp://@:1234and we get a live streammy first test withmotionhttp://www.lavrsen.dk/foswiki/bin/view/Motion/WebHomeour flir device:Code:$ v4l2-ctl --list-formats-extioctl: VIDIOC_ENUM_FMTIndex : 0Type : Video CapturePixel Format: 'GREY'Name : Size: Discrete 160x120Interval: Discrete 0.033s (30.000 fps)install motionCode:$ sudo apt-get install motionedit config fileCode:$ sudo nano /etc/motion/motion.conf# Maximum framerate for webcam streams (default: 1)webcam_maxrate 10# Restrict webcam connections to localhost only (default: on)webcam_localhost offbut we cant select our frame format V4L2_PIX_FMT_GREY in motion.confCode:# v4l2_palette allows to choose preferable palette to be use by motion# V4L2_PIX_FMT_SN9C10X : 0 'S910'# V4L2_PIX_FMT_SBGGR8 : 1 'BA81'# V4L2_PIX_FMT_MJPEG : 2 'MJPEG'# V4L2_PIX_FMT_JPEG : 3 'JPEG'# V4L2_PIX_FMT_RGB24 : 4 'RGB3'# V4L2_PIX_FMT_UYVY : 5 'UYVY'# V4L2_PIX_FMT_YUYV : 6 'YUYV'# V4L2_PIX_FMT_YUV422P : 7 '422P'# V4L2_PIX_FMT_YUV420 : 8 'YU12'v4l2_palette 8It's possible to convert /dev/video0 with ffmpeg to a compatible frame format and write to next device /dev/video1.But I think it's better to make the converts in our code (like the current convert for frame buffer to RGB565 16 Bit)

author: cynfab
author_rank: Regular Contributor
timestamp: December 18, 2015, 01:09:52 am
content: tomas123,I've run this with mplayer and it works as described, every so often I get a noise frame, but it seems to correct itself quickly.Nice work. this will be the beginning of FlirOne for Linux (maybe MacOSX and Windoze too)...ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 18, 2015, 08:56:09 am
content: Quote from: cynfab on December 18, 2015, 01:09:52 amI believe not.Since last two years I wrote here hundreds of posts abouthacking Flir RAW formats (exiftool)Plancks Lawcalculate temperature from flir radiometric sensor values with Flir calibration valuesstitch thermal panoramasraw videos and streaming of Flir Ex, Flir Exx and Flir One 2. genconvert thermal images and videos from another manufacturers (Seek, Opgal) in Flir radiometric jpg / video and open it with Flir Tools for evaluation... but only half a dozen users are interested inQuote from: cynfab on December 18, 2015, 01:09:52 amDo you mean a FFC frame, a regular 160x120 frame with a closed shutter ?Otherwise flir8b.c is until missing a validation of frame size (make only a magic byte check), therefore we have sometimes noise glitches.But I haven't seen v4l2 sync problems...please post my a"ls -al" of 1 or 2 minutes EP0x85#00xxx.bin, so I can see how often your system got broken frames

author: tomas123
author_rank: Frequent Contributor
timestamp: December 19, 2015, 01:03:27 pm
content: Hi cynfab,I found this nice short source samples on github with lepton drivers on the basis ofhttps://github.com/umlaeute/v4l2loopback:https://github.com/andrewhodel/flirpi-mjpegQuotea fork ofhttps://github.com/groupgets/LeptonModule/tree/master/software/flirpiforum:https://groups.google.com/forum/#!topic/flir-lepton/VcdpMY_vchothe code is for Lepton G1 80x60 connected over SPIQuoteand we fill our image buffer over usbQuote from: tomas123 on December 18, 2015, 08:56:09 am

author: cynfab
author_rank: Regular Contributor
timestamp: December 19, 2015, 02:01:46 pm
content: Hi tomas123,Looks interesting, I'm tied up all weekend and into next week, so I probably won't get to do anything with the FlirOne till Xmas....ken...

author: cynfab
author_rank: Regular Contributor
timestamp: December 20, 2015, 07:31:11 pm
content: Hi tomas123,I got some some time to fiddle with the flir code and here is a "simplified" version that works pretty well.With Guvcview it gets almost to 9fps on my i7 linux Mint 17.3 desktop....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 20, 2015, 10:29:41 pm
content: Quote from: cynfab on December 20, 2015, 07:31:11 pmsorry, my mistake...Code:r = libusb_bulk_transfer(devh, 0x83, buf, sizeof(buf), &actual_length, 100);...because the "old" code polls permanently the empty EP 0x81 and 0x83 with a timeout of 100ms, therefore we got only a max frame rate of 1000/(2*100)=5 fpsif we set in the old code flir7i.c (write frames to file) the timeout of EP 0x85 to10mswe get to 9 fpsthis isone secondand I count9 thermal frames$ /usr/bin/gcc -std=c99 '-I/usr/include/libusb-1.0' -o flir flir7i.c -lusb-1.0 -lm$ sudo ./flir...$ ls -al --time-style=full-iso *0x85*-rw-r--r-- 1 root root 28 2015-12-20 23:20:34.054600840 +0100 #00551-EP0x85.bin-rw-r--r-- 1 root root388282015-12-20 23:20:34.084600631 +0100 #00552-EP0x85.bin-rw-r--r-- 1 root root 73008 2015-12-20 23:20:34.114600423 +0100 #00553-EP0x85.bin-rw-r--r-- 1 root root 167 2015-12-20 23:20:34.144600214 +0100 #00554-EP0x85.bin-rw-r--r-- 1 root root 28 2015-12-20 23:20:34.164600075 +0100 #00555-EP0x85.bin-rw-r--r-- 1 root root388282015-12-20 23:20:34.194599866 +0100 #00556-EP0x85.bin-rw-r--r-- 1 root root 73079 2015-12-20 23:20:34.224599657 +0100 #00557-EP0x85.bin-rw-r--r-- 1 root root398802015-12-20 23:20:34.294599171 +0100 #00558-EP0x85.bin-rw-r--r-- 1 root root 73415 2015-12-20 23:20:34.324598962 +0100 #00559-EP0x85.bin-rw-r--r-- 1 root root 28 2015-12-20 23:20:34.384598544 +0100 #00560-EP0x85.bin-rw-r--r-- 1 root root388282015-12-20 23:20:34.414598336 +0100 #00561-EP0x85.bin-rw-r--r-- 1 root root 73175 2015-12-20 23:20:34.444598127 +0100 #00562-EP0x85.bin-rw-r--r-- 1 root root 28 2015-12-20 23:20:34.514597640 +0100 #00563-EP0x85.bin-rw-r--r-- 1 root root388282015-12-20 23:20:34.544597432 +0100 #00564-EP0x85.bin-rw-r--r-- 1 root root 73647 2015-12-20 23:20:34.574597223 +0100 #00565-EP0x85.bin-rw-r--r-- 1 root root1127682015-12-20 23:20:34.644596736 +0100 #00566-EP0x85.bin-rw-r--r-- 1 root root 167 2015-12-20 23:20:34.664596597 +0100 #00567-EP0x85.bin-rw-r--r-- 1 root root 28 2015-12-20 23:20:34.734596110 +0100 #00568-EP0x85.bin-rw-r--r-- 1 root root398522015-12-20 23:20:34.764595901 +0100 #00569-EP0x85.bin-rw-r--r-- 1 root root 73048 2015-12-20 23:20:34.794595693 +0100 #00570-EP0x85.bin-rw-r--r-- 1 root root 167 2015-12-20 23:20:34.814595553 +0100 #00571-EP0x85.bin-rw-r--r-- 1 root root 28 2015-12-20 23:20:34.844595345 +0100 #00572-EP0x85.bin-rw-r--r-- 1 root root398522015-12-20 23:20:34.874595136 +0100 #00573-EP0x85.bin-rw-r--r-- 1 root root 73575 2015-12-20 23:20:34.904594927 +0100 #00574-EP0x85.bin-rw-r--r-- 1 root root 28 2015-12-20 23:20:34.964594510 +0100 #00575-EP0x85.bin-rw-r--r-- 1 root root388282015-12-20 23:20:34.994594301 +0100 #00576-EP0x85.binit's interesting , with 10ms timeout we get no jumbo frames (header+thermal+visible+status) but rather splittet framesMy next step is to write a pipe and stitch the splittet frames together to a full frame...

author: Lord of nothing
author_rank: Super Contributor
timestamp: December 22, 2015, 12:03:09 am
content: Its possible to search for Animals in the Woods with the Cam?I know the resolution is very low.

author: tomas123
author_rank: Frequent Contributor
timestamp: December 22, 2015, 11:19:07 pm
content: @Lord of nothingI think, this thread is better qualified for your question:https://www.eevblog.com/forum/testgear/actual-resolution-of-flir-one-v2/@cynfabI saw, that you removed the frame buffer part.As attachment my last "Flir to v4l2loopback" version without a framebuffer.compile:Code:$ /usr/bin/gcc '-I/usr/include/libusb-1.0' -o flir flir8f.c -lusb-1.0 -lm$ sudo ./flirSuccessfully find the Flir One G2 deviceSuccessfully set usb configuration 3Successfully claimed interface 0,1,2using output device: /dev/video0vid_format->type =2vid_format->fmt.pix.width =160vid_format->fmt.pix.height =120vid_format->fmt.pix.pixelformat =1497715271vid_format->fmt.pix.sizeimage =19200vid_format->fmt.pix.field =1vid_format->fmt.pix.bytesperline=160vid_format->fmt.pix.colorspace =8using output device: /dev/video1vid_format->type =2vid_format->fmt.pix.width =640vid_format->fmt.pix.height =480vid_format->fmt.pix.pixelformat =1196444237vid_format->fmt.pix.sizeimage =1228800vid_format->fmt.pix.field =1vid_format->fmt.pix.bytesperline=0vid_format->fmt.pix.colorspace =8stop interface 2 FRAMEstop interface 1 FILEIOstart interface 1 FILEIO...new feature:- add chunks from EP0x85 to a full frame (thermal+jpg+status)- calc addresses inside "full frame" with infos from your reversed engineered header- writethermal images to /dev/video0as grayscale video 160x120- writevisible images to /dev/video1as mjpeg video 640x480please note, you must load v4l2loopback with /dev/video0and/dev/video1Code:// unload v4l2loopback$ sudo modprobe -r v4l2loopback$ ls /dev/video*ls: cannot access /dev/video*: No such file or directory$ sudo modprobe v4l2loopback video_nr=0,1$ ls /dev/video*/dev/video0 /dev/video1now you can view thermal and visible video simultaneously (i.e. with your guvcview in two windows)I haven't changed the initialization sequence for the end points, because it's the same like in the SDK. I think, it's the safest way for future firmwares etc.Your advice on the correlation between "sum of time outs" and "frame rate" was greatI played around with some time outs and found this as the best solution for my raspberry pi:Code:r = libusb_bulk_transfer(devh, 0x85, buf, sizeof(buf), &actual_length, 100);...r = libusb_bulk_transfer(devh, 0x81, buf, sizeof(buf), &actual_length, 10);r = libusb_bulk_transfer(devh, 0x83, buf, sizeof(buf), &actual_length, 10);EP 0x81 and 0x83 are almost empty (time out of 10ms works fine) and EP 0x85 lose regularly some bytes between chunks, if the time out is shorter as 100ms.For debugging the code prints the status messages from EPx85.On the basis of usbNotifiedTimestamp we get the frame rate of 9fps.As sample a part of the terminal log with a FCC (shutter movement).Code:{"shutterState":"ON","shutterTemperature":312.040008544922,"usbNotifiedTimestamp":1175531262.02701,"usbEnqueuedTimestamp":1175531262.02879,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":312.040008544922,"usbNotifiedTimestamp":1175531262.14032,"usbEnqueuedTimestamp":1175531262.14213,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":312.040008544922,"usbNotifiedTimestamp":1175531262.25351,"usbEnqueuedTimestamp":1175531262.25556,"ffcState":"FFC_VALID_IMG"}{"shutterState":"ON","shutterTemperature":312.040008544922,"usbNotifiedTimestamp":1175531262.36882,"usbEnqueuedTimestamp":1175531262.37076,"ffcState":"FFC_VALID_IMG"}{"shutterState":"ON","shutterTemperature":312.040008544922,"usbNotifiedTimestamp":1175531262.48126,"usbEnqueuedTimestamp":1175531262.48321,"ffcState":"FFC_VALID_IMG"}{"shutterState":"ON","shutterTemperature":312.040008544922,"usbNotifiedTimestamp":1175531262.70933,"usbEnqueuedTimestamp":1175531262.7114,"ffcState":"FFC_DESIRED"}{"shutterState":"ON","shutterTemperature":311.970001220703,"usbNotifiedTimestamp":1175531262.82371,"usbEnqueuedTimestamp":1175531262.8254,"ffcState":"FFC_PROGRESS"}{"shutterState":"ON","shutterTemperature":311.970001220703,"usbNotifiedTimestamp":1175531262.93882,"usbEnqueuedTimestamp":1175531262.94059,"ffcState":"FFC_PROGRESS"}{"shutterState":"ON","shutterTemperature":311.970001220703,"usbNotifiedTimestamp":1175531263.05156,"usbEnqueuedTimestamp":1175531263.0532,"ffcState":"FFC_PROGRESS"}{"shutterState":"FFC","shutterTemperature":311.970001220703,"usbNotifiedTimestamp":1175531263.16526,"usbEnqueuedTimestamp":1175531263.16728,"ffcState":"FFC_VALID_RAD"}{"shutterState":"FFC","shutterTemperature":311.970001220703,"usbNotifiedTimestamp":1175531263.2799,"usbEnqueuedTimestamp":1175531263.28168,"ffcState":"FFC_VALID_RAD"}{"shutterState":"FFC","shutterTemperature":311.959991455078,"usbNotifiedTimestamp":1175531263.39377,"usbEnqueuedTimestamp":1175531263.39579,"ffcState":"FFC_VALID_RAD"}{"shutterState":"FFC","shutterTemperature":311.959991455078,"usbNotifiedTimestamp":1175531263.96461,"usbEnqueuedTimestamp":1175531263.96619,"ffcState":"FFC_VALID_RAD"}{"shutterState":"FFC","shutterTemperature":311.959991455078,"usbNotifiedTimestamp":1175531264.07757,"usbEnqueuedTimestamp":1175531264.07966,"ffcState":"FFC_VALID_RAD"}{"shutterState":"FFC","shutterTemperature":311.959991455078,"usbNotifiedTimestamp":1175531264.19097,"usbEnqueuedTimestamp":1175531264.19271,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":311.959991455078,"usbNotifiedTimestamp":1175531264.30465,"usbEnqueuedTimestamp":1175531264.30635,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":311.959991455078,"usbNotifiedTimestamp":1175531264.41937,"usbEnqueuedTimestamp":1175531264.42115,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":311.959991455078,"usbNotifiedTimestamp":1175531264.5326,"usbEnqueuedTimestamp":1175531264.53417,"ffcState":"FFC_VALID_RAD"}{"shutterState":"ON","shutterTemperature":311.959991455078,"usbNotifiedTimestamp":1175531264.64702,"usbEnqueuedTimestamp":1175531264.64891,"ffcState":"FFC_VALID_RAD"}Note the difference between shutterState and ffcStat!

author: cynfab
author_rank: Regular Contributor
timestamp: December 23, 2015, 01:58:17 am
content: Hi tomas123,Yep, I removed the framebuffer code. That's because my current target is to stream the thermal and visible images from a headless embedded processor.Here is a video I captured with Guvcview. Encoding is MPEG 1 so the pixels are a bit fuzzy.Just remove the .txt and play it with totem on Linux.I'll try our your new code asap.....Maybe tomorrow... lots of snow here, need to plow the driveway again... and again... and again...........ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 26, 2015, 07:55:15 pm
content: I saw, there is a typo in line 245 of file flir8f.c.changedCode:write(fdwr1, &buf[28+ThermalSize], JpgSize);toCode:write(fdwr1, &buf85[28+ThermalSize], JpgSize);edit... and a memory leakCode:// write video to v4l2loopbackwrite(fdwr0, fb_proc, framesize0);write(fdwr1, &buf85[28+ThermalSize], JpgSize);free(fb_proc);

author: cynfab
author_rank: Regular Contributor
timestamp: December 29, 2015, 01:41:37 am
content: Hi tomas123,This looks really good, better than my last effort that just hoped to get a full frame.Have you had any luck getting video1 to stream the visual jpg data?I've poked at it and still have no clue as to what it should do. The v4l2 api is very dense reading.and I am struggling with trying to understand what I need to do.But, it looks like things are progressing....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 29, 2015, 04:43:54 pm
content: Quote from: cynfab on December 29, 2015, 01:41:37 amYes, my last code (found typo buff85 and the memory leak) runs since two days without errors on /dev/video0 and /dev/video1 on myraspberry pi.after 1.309.405 frames with 8,2 fps:(1.309.405/8,2/3600=44 hours)Code:#1309405 82/10 fps:{"shutterState":"ON","shutterTemperature":311.869995117188,"usbNotifiedTimestamp":1176080489.24421,"usbEnqueuedTimestamp":1176080489.24568,"ffcState":"FFC_VALID_RAD"}#1309406 83/10 fps:{"shutterState":"ON","shutterTemperature":311.869995117188,"usbNotifiedTimestamp":1176080489.35792,"usbEnqueuedTimestamp":1176080489.35936,"ffcState":"FFC_VALID_RAD"}#1309407 82/10 fps:{"shutterState":"ON","shutterTemperature":311.880004882812,"usbNotifiedTimestamp":1176080489.4717,"usbEnqueuedTimestamp":1176080489.47328,"ffcState":"FFC_VALID_RAD"}#1309408 82/10 fps:{"shutterState":"ON","shutterTemperature":311.880004882812,"usbNotifiedTimestamp":1176080489.5864,"usbEnqueuedTimestamp":1176080489.58808,"ffcState":"FFC_VALID_RAD"}#1309409 82/10 fps:{"shutterState":"ON","shutterTemperature":311.880004882812,"usbNotifiedTimestamp":1176080489.70209,"usbEnqueuedTimestamp":1176080489.70338,"ffcState":"FFC_VALID_RAD"}With Guvcview I can view both videos simultaneously with perfect quality (no drops and artefacts etc).Can you exact describe your problems with /dev/video1 ?My next step is to send both video (thermal/real) with RTSP streaming (ffmpeg) to a Synology surveillance station ...edit:Do you remember, how many time I wasted on the wrong system (Linux VM, OS X)?Apparently the FlirOne G2 USB connection is tricky...Quote from: tomas123 on December 22, 2015, 11:19:07 pmif you see in the terminal this correct status string, then you know, that all chunks are correct stitched to a full frame without loosing bytes(the status string is the end of a full frame)Code:#1309405 82/10 fps:{"shutterState":"ON","shutterTemperature":311.869995117188,"usbNotifiedTimestamp":1176080489.24421,"usbEnqueuedTimestamp":1176080489.24568,"ffcState":"FFC_VALID_RAD"}

author: cynfab
author_rank: Regular Contributor
timestamp: December 29, 2015, 05:35:10 pm
content: Hi tomas123,I start the videoloopback module like this:sudo modprobe v4l2loopback exclusive_caps=0,0 video_nr=0,1then run flir8g, then guvcview.THis then displays the thermal image.I then go to video controls and select device 1.Guvcview then gives an error that it can't start a video stream on that device... see attached screenshot.I can certainly believe that the F1G2 USB is odd as I have continuous problems on Android with various apps not being able to claim the usb interface.I believe all the chunks are being stiched as the screenshot shows the terminal output....ken...

author: cynfab
author_rank: Regular Contributor
timestamp: December 29, 2015, 06:13:21 pm
content: And, this is what I get with mplayer...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 30, 2015, 12:06:15 am
content: hm, my mplayer also works fineafter first 400 frames (ignore the warnings):Code:$ mplayer tv:// -tv driver=v4l2:device=/dev/video1MPlayer svn r34540 (Raspbian), built with gcc-4.6 (C) 2000-2012 MPlayer Teammplayer: could not connect to socketmplayer: No such file or directoryFailed to open LIRC support. You will not be able to use your remote control.Playing tv://.TV file format detected.Selected driver: v4l2name: Video 4 Linux 2 inputauthor: Martin Olschewski <olschewski@zpr.uni-koeln.de>comment: first try, more to come ;-)v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.Selected device: Dummy video device (0x0001)Capabilities: video capture read/write streamingsupported norms:inputs: 0 = loopback;Current input: 0Current format: MJPEGv4l2: ioctl set format failed: Invalid argumentv4l2: ioctl set format failed: Invalid argumentv4l2: ioctl set format failed: Invalid argumentv4l2: ioctl set format failed: Invalid argumentv4l2: ioctl set format failed: Invalid argumentv4l2: ioctl set format failed: Invalid argumentv4l2: ioctl set format failed: Invalid argumentv4l2: ioctl set format failed: Invalid argumenttv.c: norm_from_string(pal): Bogus norm parameter, setting default.v4l2: ioctl enum norm failed: Inappropriate ioctl for deviceError: Cannot set norm!Selected input hasn't got a tuner!v4l2: ioctl set mute failed: Invalid argumentv4l2: ioctl query control failed: Invalid argumentv4l2: ioctl query control failed: Invalid argumentv4l2: ioctl query control failed: Invalid argumentv4l2: ioctl query control failed: Invalid argumentXlib: extension "XFree86-VidModeExtension" missing on display "localhost:10.0". It seems there is no Xvideo support for your video card available. Run 'xvinfo' to verify its Xv support and read DOCS/HTML/en/video.html#xv! See 'mplayer -vo help' for other (non-xv) video out drivers. Try -vo x11. using extended formats. Use -vo gl:nomanyfmts if playback fails.==========================================================================Opening video decoder:  FFmpeg's libavcodec codec familylibavcodec version 53.35.0 (external)Mismatching header version 53.32.2Selected video codec:  vfm: ffmpeg (FFmpeg MJPEG)==========================================================================Audio: no soundStarting playback...Movie-Aspect is undefined - no prescaling applied.VO:  640x480 => 640x480 Planar 422PV: 0.0 399/399 ??% ??% ??,?% 0 0Your screenshot shows bugless "full frames", therefore our code works fine.It's possible, that you have trouble with your v4l2 drivers.Please post your output from this commands:Code:$ ls -al /dev/video*$ v4l2-ctl --list-devices$ v4l2-ctl --all -d /dev/video0$ v4l2-ctl --all -d /dev/video1compare with my resultCode:pi@raspberryLCD ~ $ ls -al /dev/video*crw-rw---T+ 1 root video 81, 0 Dec 27 13:12 /dev/video0crw-rw---T+ 1 root video 81, 1 Dec 27 13:12 /dev/video1pi@raspberryLCD ~ $ v4l2-ctl --list-devicesDummy video device (0x0000) (platform:v4l2loopback-000):/dev/video0Dummy video device (0x0001) (platform:v4l2loopback-001):/dev/video1pi@raspberryLCD ~ $ v4l2-ctl --all -d /dev/video0Driver Info (not using libv4l2):Driver name : v4l2 loopbackCard type : Dummy video device (0x0000)Bus info : platform:v4l2loopback-000Driver version: 3.18.13Capabilities : 0x85208001Video CaptureVideo Memory-to-MemoryRead/WriteStreamingDevice CapabilitiesDevice Caps : 0x05208001Video CaptureVideo Memory-to-MemoryRead/WriteStreamingVideo input : 0 (loopback: ok)Format Video Capture:Width/Height : 160/120Pixel Format : 'GREY'Field : NoneBytes per Line: 160Size Image : 19200Colorspace : SRGBCustom Info : feedcafeFormat Video Output:Width/Height : 160/120Pixel Format : 'GREY'Field : NoneBytes per Line: 160Size Image : 19200Colorspace : SRGBCustom Info : feedcafeStreaming Parameters Video Capture:Frames per second: 30.000 (30/1)Read buffers : 8Streaming Parameters Video Output:Frames per second: 30.000 (30/1)Write buffers : 8User Controlskeep_format (bool) : default=0 value=0sustain_framerate (bool) : default=0 value=0timeout (int) : min=0 max=100000 step=1 default=0 value=0timeout_image_io (bool) : default=0 value=0pi@raspberryLCD ~ $ v4l2-ctl --all -d /dev/video1Driver Info (not using libv4l2):Driver name : v4l2 loopbackCard type : Dummy video device (0x0001)Bus info : platform:v4l2loopback-001Driver version: 3.18.13Capabilities : 0x85208001Video CaptureVideo Memory-to-MemoryRead/WriteStreamingDevice CapabilitiesDevice Caps : 0x05208001Video CaptureVideo Memory-to-MemoryRead/WriteStreamingVideo input : 0 (loopback: ok)Format Video Capture:Width/Height : 640/480Pixel Format : 'MJPG'Field : NoneBytes per Line: 0Size Image : 1228800Colorspace : SRGBCustom Info : feedcafeFormat Video Output:Width/Height : 640/480Pixel Format : 'MJPG'Field : NoneBytes per Line: 0Size Image : 1228800Colorspace : SRGBCustom Info : feedcafeStreaming Parameters Video Capture:Frames per second: 30.000 (30/1)Read buffers : 8Streaming Parameters Video Output:Frames per second: 30.000 (30/1)Write buffers : 8User Controlskeep_format (bool) : default=0 value=0sustain_framerate (bool) : default=0 value=0timeout (int) : min=0 max=100000 step=1 default=0 value=0timeout_image_io (bool) : default=0 value=0

author: tomas123
author_rank: Frequent Contributor
timestamp: December 30, 2015, 12:31:48 am
content: there are some interesting differences between our mplayer output linesmy mplayer:Code:Current format: MJPEGOpening video decoder:  FFmpeg's libavcodec codec family...VO:  640x480 => 640x480 Planar 422Pyour mplayer shows another video formatCode:Current format: BGR32Opening video decoder:  RAW uncompressed video...VO:  640x480 => 640x480 Planar YV12maybe, there is a another video driver on your systemreboot, check it and try to write to another port (like video2) or change in our code video0<->video1PS: another difference:Quote from: tomas123 on December 22, 2015, 11:19:07 pmWhy do you needs the switch "exclusive_caps"?Quote from: cynfab on December 29, 2015, 05:35:10 pmhttps://github.com/umlaeute/v4l2loopback/blob/master/NEWSQuotesee alsohttps://github.com/umlaeute/v4l2loopback/issues/78

author: cynfab
author_rank: Regular Contributor
timestamp: December 30, 2015, 01:29:12 am
content: Hi tomas123,Well, there are quite a few differences between our v4l2loopback stuff.Code:kenm@kenm-Studio-XPS-8000 ~/FLIR_ONE/thomas123/New_test/v4l $ ls -al /dev/video*crw-rw----+ 1 root video 81, 0 Dec 29 10:44 /dev/video0crw-rw----+ 1 root video 81, 1 Dec 29 10:44 /dev/video1kenm@kenm-Studio-XPS-8000 ~/FLIR_ONE/thomas123/New_test/v4l $ v4l2-ctl --list-devicesDummy video device (0x0000) (v4l2loopback:0):/dev/video0Dummy video device (0x0001) (v4l2loopback:1):/dev/video1kenm@kenm-Studio-XPS-8000 ~/FLIR_ONE/thomas123/New_test/v4l $ v4l2-ctl --all -d /dev/video0Driver Info (not using libv4l2):Driver name : v4l2 loopbackCard type : Dummy video device (0x0000)Bus info : v4l2loopback:0Driver version: 0.8.0Capabilities : 0x05000002Video OutputRead/WriteStreamingVideo output: 0 (loopback in)Format Video Output:Width/Height : 160/120Pixel Format : 'GREY'Field : NoneBytes per Line: 160Size Image : 19200Colorspace : SRGBStreaming Parameters Video Capture:Frames per second: 30.000 (30/1)Read buffers : 8Streaming Parameters Video Output:Frames per second: 30.000 (30/1)Write buffers : 8keep_format (bool) : default=0 value=0sustain_framerate (bool) : default=0 value=0timeout (int) : min=0 max=100000000 step=1 default=0 value=0timeout_image_io (bool) : default=0 value=0kenm@kenm-Studio-XPS-8000 ~/FLIR_ONE/thomas123/New_test/v4l $ v4l2-ctl --all -d /dev/video1Driver Info (not using libv4l2):Driver name : v4l2 loopbackCard type : Dummy video device (0x0001)Bus info : v4l2loopback:1Driver version: 0.8.0Capabilities : 0x05000003Video CaptureVideo OutputRead/WriteStreamingVideo input : 0 (loopback: ok)Video output: 0 (loopback in)Format Video Capture:Width/Height : 640/480Pixel Format : 'BGR4'Field : NoneBytes per Line: 2560Size Image : 1228800Colorspace : SRGBFormat Video Output:Width/Height : 640/480Pixel Format : 'BGR4'Field : NoneBytes per Line: 2560Size Image : 1228800Colorspace : SRGBStreaming Parameters Video Capture:Frames per second: 30.000 (30/1)Read buffers : 8Streaming Parameters Video Output:Frames per second: 30.000 (30/1)Write buffers : 8keep_format (bool) : default=0 value=0sustain_framerate (bool) : default=0 value=0timeout (int) : min=0 max=100000000 step=1 default=0 value=0timeout_image_io (bool) : default=0 value=0So it looks like maybe this is a versioning problem, because I am using what comes with Linux Mint17.3 and you are maybe using something compiled from source or at least a more recent version.I think I'll try getting v4l2loopback from github and replace what comes with Mint17.3.I've tried using /dev/video2 and it makes no difference.I've tried with and without "exclusive_caps", and it makes no difference."Driver version: 3.18.13"vs my:"Driver version: 0.8.0"worries me.As does my:Current format: BGR32...ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 30, 2015, 02:10:10 am
content: my suggest:try to write the real video to /dev/video0 and thermal to /dev/video1 and see what happensCode:#define VIDEO_DEVICE0 "/dev/video1"#define FRAME_WIDTH0 160#define FRAME_HEIGHT0 120#define VIDEO_DEVICE1 "/dev/video0"#define FRAME_WIDTH1 640#define FRAME_HEIGHT1 480because we writeCode:#define FRAME_FORMAT1 V4L2_PIX_FMT_MJPEGand you getCode:Pixel Format : 'BGR4'insteadCode:Pixel Format : 'MJPG'BGR4 = V4L2_PIX_FMT_BGR32version 3.18.13 looks like my kernel version on raspberryCode:$ v4l2-ctl --infoDriver Info (not using libv4l2):Driver name : v4l2 loopbackCard type : Dummy video device (0x0000)Bus info : platform:v4l2loopback-000Driver version: 3.18.13Capabilities : 0x85208001Video CaptureVideo Memory-to-MemoryRead/WriteStreamingDevice CapabilitiesDevice Caps : 0x05208001Video CaptureVideo Memory-to-MemoryRead/WriteStreamingCode:$ uname -aLinux raspberryLCD 3.18.13-v7+ #784 SMP PREEMPT Sat May 9 15:57:36 BST 2015 armv7l GNU/LinuxI posted my installations steps here:Quote from: tomas123 on September 16, 2015, 10:20:47 pm

author: cynfab
author_rank: Regular Contributor
timestamp: December 30, 2015, 02:34:19 am
content: Just changingCode:#define VIDEO_DEVICE0 "/dev/video1"#define FRAME_WIDTH0 160#define FRAME_HEIGHT0 120#define VIDEO_DEVICE1 "/dev/video0"#define FRAME_WIDTH1 640#define FRAME_HEIGHT1 480video1 is recognized by Guvcview and mplayer displays the thermal image, video0 is garbage...disregard the below screenshot...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 30, 2015, 02:50:14 pm
content: Hi cynfab,2 hours work:I installed a Linux Mint Image on a clean notebook and note all steps(for another readers: Linux Mint as a Ubuntu fork)$ uname -aLinux mint-Lenovo-B50-70 3.19.0-32-generic #37~14.04.1-UbuntuSMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux$ inxi -SSystem: Host: mint-Lenovo-B50-70 Kernel: 3.19.0-32-generic x86_64 (64 bit) Desktop: N/ADistro:Linux Mint 17.3 Rosa$ sudo apt-get install g++// check pre-installed libusb versions$ dpkg --get-selections | grep libusblibusb-0.1-4:amd64installlibusb-1.0-0:amd64installlibusb-1.0-0:i386installlibusbmuxd2install// we need the header file libusb.h$ sudo apt-get install libusb-1.0-0-dev// check the path of libusb.h for gcc command line below$ find / -name libusb.h 2>/dev/zero/usr/include/libusb-1.0/libusb.h// I see my notebook webcam as device video0$ ls /dev/video*/dev/video0// there is no v4l2loopback driver installed on clean Linux Mint$ lsmod | grep v4l2v4l2_common 16384 1 videobuf2_corevideodev 159744 3 uvcvideo,v4l2_common,videobuf2_core$ sudo modprobe v4l2loopbackmodprobe: FATAL: Module v4l2loopback not found.// therefore me must compile the driver for our kernel// first load kernel sources (try to skip this step)$ sudo apt-get install linux-generic// 271 MB later: I think this was to much.// Better load only the kernel headers (as part of the packet linux-generic)$ sudo apt-get install linux-headers-generic// try to compile v4l2loopback with packet manager (skip this step)$ sudo apt-get install v4l2loopback-dkms...Building initial module for 3.19.0-32-genericError! Bad return status for module build on kernel: 3.19.0-32-generic (x86_64)Consult /var/lib/dkms/v4l2loopback/0.8.0/build/make.log for more information.// Argh! We got an Error!!$ cat /var/lib/dkms/v4l2loopback/0.8.0/build/make.log../var/lib/dkms/v4l2loopback/0.8.0/build/v4l2loopback.c:486:2: error: implicit declaration of function ‘strict_strtoul’ [-Werror=implicit-function-declaration]if (strict_strtoul(buf, 0, &curr))^...make: *** [v4l2loopback.ko] Error 2// first remove the broken packet v4l2loopback-dkms...$ sudo apt-get remove v4l2loopback-dkms...Entfernen von v4l2loopback-dkms (0.8.0-1) ...------------------------------Deleting module version: 0.8.0completely from the DKMS tree.------------------------------// ... then do it yourself$ sudo apt-get install git$ git clonehttps://github.com/umlaeute/v4l2loopback$ cd v4l2loopback/$ makeBuilding v4l2-loopback driver...make -C /lib/modules/`uname -r`/build M=/home/mint/Desktop/flir/v4l2loopback modulesmake: Verzeichnis »/usr/src/linux-headers-3.19.0-32-generic« wird betretenCC  /home/mint/Desktop/flir/v4l2loopback/v4l2loopback.oBuilding modules, stage 2.MODPOST 1 modulesCC /home/mint/Desktop/flir/v4l2loopback/v4l2loopback.mod.oLD  /home/mint/Desktop/flir/v4l2loopback/v4l2loopback.ko$ sudo make installmake -C /lib/modules/`uname -r`/build M=/home/mint/Desktop/flir/v4l2loopback modules_installINSTALL /home/mint/Desktop/flir/v4l2loopback/v4l2loopback.ko// now load video1 and video2 (because my notebook cam is video0)$ sudo modprobe v4l2loopback video_nr=1,2// check it - all works fine$ ls /dev/video*/dev/video0 /dev/video1 /dev/video2// edit /dev/video?in flir8g-mint.c#define VIDEO_DEVICE0 "/dev/video1"#define FRAME_WIDTH0 160#define FRAME_HEIGHT0 120#define VIDEO_DEVICE1 "/dev/video2"#define FRAME_WIDTH1 640#define FRAME_HEIGHT1 480// compile flir8g-mint.c from attachment$ /usr/bin/gcc '-I/usr/include/libusb-1.0' -o flir1 flir8g-mint.c -lusb-1.0 -lm// and run the code$ sudo ./flir...#000037 68/10 fps:{"shutterState":"ON","shutterTemperature":294.489990234375,"usbNotifiedTimestamp":1176135054.68748,"usbEnqueuedTimestamp":1176135054.68923,"ffcState":"FFC_RAD_APPROX"}#000038 71/10 fps:{"shutterState":"ON","shutterTemperature":294.489990234375,"usbNotifiedTimestamp":1176135054.8017,"usbEnqueuedTimestamp":1176135054.80321,"ffcState":"FFC_RAD_APPROX"}#000039 70/10 fps:{"shutterState":"ON","shutterTemperature":294.489990234375,"usbNotifiedTimestamp":1176135054.91573,"usbEnqueuedTimestamp":1176135054.91749,"ffcState":"FFC_RAD_APPROX"}...// another session$ sudo apt-get install v4l-utils$ v4l2-ctl --list-devicesDummy video device (0x0000) (platform:v4l2loopback-000):/dev/video1Dummy video device (0x0001) (platform:v4l2loopback-001):/dev/video2Lenovo EasyCamera (usb-0000:00:14.0-6):/dev/video0// check correct formats$ v4l2-ctl --list-formats-out -d /dev/video1ioctl: VIDIOC_ENUM_FMTIndex : 0Type : Video OutputPixel Format: 'GREY'Name : 8 bpp, Greyscale$ v4l2-ctl --list-formats-out -d /dev/video2ioctl: VIDIOC_ENUM_FMTIndex : 0Type : Video OutputPixel Format: 'MJPG'Name : Motion-JPEG// install guvcview and mplayer$ sudo apt-get install guvcview$ sudo apt-get install mplayer... and all works fine:only for comparing the "Driver version":Code:$ v4l2-ctl --all -d /dev/video2Driver Info (not using libv4l2):Driver name : v4l2 loopbackCard type : Dummy video device (0x0001)Bus info : platform:v4l2loopback-001Driver version: 3.19.8Capabilities : 0x85208003Video CaptureVideo OutputVideo Memory-to-MemoryRead/WriteStreamingDevice CapabilitiesDevice Caps : 0x85208003Video CaptureVideo OutputVideo Memory-to-MemoryRead/WriteStreamingDevice CapabilitiesVideo input : 0 (loopback: ok)Video output: 0 (loopback in)Format Video Capture:Width/Height : 640/480Pixel Format : 'MJPG'Field : NoneBytes per Line: 0Size Image : 1228800Colorspace : SRGBCustom Info : feedcafeFormat Video Output:Width/Height : 640/480Pixel Format : 'MJPG'Field : NoneBytes per Line: 0Size Image : 1228800Colorspace : SRGBCustom Info : feedcafeStreaming Parameters Video Capture:Frames per second: 30.000 (30/1)Read buffers : 8Streaming Parameters Video Output:Frames per second: 30.000 (30/1)Write buffers : 8User Controlskeep_format (bool) : default=0 value=0sustain_framerate (bool) : default=0 value=0timeout (int) : min=0 max=100000 step=1 default=0 value=0timeout_image_io (bool) : default=0 value=0

author: cynfab
author_rank: Regular Contributor
timestamp: December 30, 2015, 03:06:19 pm
content: Hi tomas123,Nice job detailing all of that.I believe that the issue I am having is the old version of v4l2loopback that comes with Mint17.3's v4l2loopback-dkms.I'll get a chance to rebuild it later this morning.I've got to deal with another 3-4" of new snow, so thermal imaging will have to wait a bit...ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: December 30, 2015, 03:15:11 pm
content: I was to curios about your error and thought that it's faster to try it self as write dozen posts in my broken englishDon't forget to clean your driver:Code:$ dpkg --get-selections | grep v4l2$ sudo apt-get remove v4l2loopback-dkms

author: cynfab
author_rank: Regular Contributor
timestamp: December 30, 2015, 05:09:55 pm
content: Thanks,I cleaned out the old v4l2loopback, but am having issues compiling the new one.With just a plain make, somehow it thinks I want to cross compile for arm.Just updated the kernel to 3.19.0-32, but that made no difference,Code:makeBuilding v4l2-loopback driver...make -C /lib/modules/`uname -r`/build M=/home/kenm/FLIR_ONE/thomas123/v4l2loopback modulesmake: Entering directory `/usr/src/linux-headers-3.19.0-32-generic'CC  /home/kenm/FLIR_ONE/thomas123/v4l2loopback/v4l2loopback.oIn file included from include/asm-generic/int-ll64.h:10:0,from ./arch/arm/include/asm/types.h:4,from include/uapi/linux/types.h:4,from include/linux/compiler.h:189,from include/linux/linkage.h:4,from include/linux/preempt.h:9,from include/linux/spinlock.h:50,from include/linux/vmalloc.h:4,from /home/kenm/FLIR_ONE/thomas123/v4l2loopback/v4l2loopback.c:17:include/uapi/asm-generic/int-ll64.h:11:29: fatal error: asm/bitsperlong.h: No such file or directorycompilation terminated.It's just one of those days........ken...NOOB mistake... had something set in .profile ARCH=armAnd now flir8g works perfectly!!

author: Fraser
author_rank: Super Contributor
timestamp: December 30, 2015, 06:42:46 pm
content: Nice work guysRESPECT 👍

author: cynfab
author_rank: Regular Contributor
timestamp: December 31, 2015, 01:44:15 am
content: Hi tomas123,For your thermal imaging pleasure, a version that does 3 video streams,one is greyscale thermalanother is visualand the third is a colorized version of the thermal image....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: January 02, 2016, 01:17:38 am
content: Hi cynfab,your lookup table works great.But first edit your memory leak by freeing fb_proc2.(Watch the growing virtual memory of process flir8h with top.)flir8h.cCode:...326: free(fb_proc);327: free(fb_proc2);...Quote from: tomas123 on December 17, 2015, 11:06:29 pmAs nice side effect, we have now a V4L2 thermal stream, whichmotioncan process.http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome$ makegcc -I/usr/include/libusb-1.0 -c -o flir8h.o flir8h.cgcc -I/usr/include/libusb-1.0 -o flir8h Palettes.o flir8h.o -lusb-1.0 -lm -Wall$ sudo ./flir8h// install motion$ sudo apt-get install motion// edit config file$ sudo nano /etc/motion/motion.confCode:# Maximum framerate for webcam streams (default: 1)webcam_maxrate 10# Restrict webcam connections to localhost only (default: on)webcam_localhost off# thread config files.thread /usr/local/etc/thread1.confthread /usr/local/etc/thread2.conf; thread /usr/local/etc/thread3.conf; thread /usr/local/etc/thread4.conf// create two additional config files for /dev/video2 and /dev/video3Code:$ cat /usr/local/etc/thread1.conf# V4L2_PIX_FMT_MJPEG : 2 'MJPEG'# V4L2_PIX_FMT_JPEG : 3 'JPEG'# V4L2_PIX_FMT_RGB24 : 4 'RGB3'v4l2_palette 2videodevice /dev/video2target_dir /tmp/motion2webcam_port 8081$ cat /usr/local/etc/thread2.conf# V4L2_PIX_FMT_MJPEG : 2 'MJPEG'# V4L2_PIX_FMT_JPEG : 3 'JPEG'# V4L2_PIX_FMT_RGBv4l2_palette 4videodevice /dev/video3target_dir /tmp/motion3webcam_port 8082install apache2 and create a simple html file(192.168.1.70 is the ip address from my raspberry pi)Code:$ cat /var/www/index.html<!DOCTYPE html><html><head><style type="text/css">body {text-align:center;background-color:#000000;}.container {width:100%;}.motion1 {border: 0;width: 40%;height: auto;}.motion2 {border: 0;width: 40%;height: auto;}.clear {clear:both;}</style></head><body><a href="http://192.168.1.70:8081"><img class="motion1" src="http://192.168.1.70:8081" /></a><a href="http://192.168.1.70:8082"><img class="motion2" src="http://192.168.1.70:8082" /></a></body></html>open URL of server in a browser

author: cynfab
author_rank: Regular Contributor
timestamp: January 02, 2016, 04:41:40 am
content: Hi tomas123,Happy New Year....Yep, I found and fixed the memory leak soon after my last post.The motion stuff is cool, gotta find some time to play with it.But, I need a way to combine the visual and thermal images as in your attachment but I don't need motion detection, just the side by side display....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: January 02, 2016, 12:04:14 pm
content: Hi cynfab,A Happy New Year from non snowy GermanyQuote from: cynfab on January 02, 2016, 04:41:40 amI tested last days some streaming tools for V4L2.A good entry point are this samples:https://github.com/umlaeute/v4l2loopback/wikiFor the side by side display you can use the html template from my last post.Here are my raw notes. All samples for our mjpeg stream /dev/video2:MJPG-Streamerworks great on Raspberry Pi and requires only 2% of CPU, because this tool only move the jpeg image without decoding/encoding.installation guidehttp://www.steinvoorte.nl/mjpgstreamer/index.php?page=2installCode:$ sudo apt-get install libjpeg8-dev imagemagick subversion libv4l-dev$ ls /usr/include/linux/videodev*/usr/include/linux/videodev2.h$ sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h$ wget http://sourceforge.net/code-snapshots/svn/m/mj/mjpg-streamer/code/mjpg-streamer-code-182.zip$ unzip mjpg-streamer-code-182.zip$ cd mjpg-streamer-code-182/mjpg-streamer// select required plugin (i.e. input_file.so)$ make USE_LIBV4L2=true mjpg_streamer input_uvc.so output_http.so// install (note, that apache2 use /var/www )$ sudo cp -R www /usr/local/www$ sudo cp mjpg_streamer /usr/local/bin$ sudo cp output_http.so input_uvc.so /usr/local/lib/start (note LD_LIBRARY_PATH to input_uvc.so)Code:$ export LD_LIBRARY_PATH=/usr/local/lib$ mjpg_streamer -i "input_uvc.so -d /dev/video2" -o "output_http.so -w /usr/local/www"i: Using V4L2 device.: /dev/video2i: Desired Resolution: 640 x 480i: Frames Per Second.: 5i: Format............: MJPEG...o: www-folder-path...: /usr/local/www/o: HTTP TCP port.....: 8080o: username:password.: disabledo: commands..........: enabledopen the stream on a second Notebookwith GUI:http://192.168.1.70:8080Stream only:http://192.168.1.70:8080/?action=streamunfortunately mjpg_streamer only eats mjpeg and not RGB24 /dev/video3fswebcamis a nice tool for create (single) images with timestamps etc. from a V4L2 devicehttp://manpages.ubuntu.com/manpages/lucid/man1/fswebcam.1.htmlCode:$ sudo apt-get install fswebcam$ fswebcam --device /dev/video3 1.jpg--- Opening /dev/video3...Trying source module v4l2.../dev/video3 opened.No input was specified, using the first.Adjusting resolution from 384x288 to 160x120.--- Capturing frame...Captured frame in 0.00 seconds.--- Processing captured image...Writing JPEG image to '1.jpg'.result:Nice for a web site with a periodic refreshCode:<META HTTP-EQUIV="refresh" CONTENT="15">more complex example:Code:fswebcam -D 3 -S 10 -F 10 -r 1280x720 -d /dev/video0 \ --font "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf:12" \ --title "Kamera 1" --subtitle "Hallo World" \ --timestamp "%d.%m.%Y %H:%M" --info "info" $FILEavconv / ffmpegmy sample is for avconvhttp://libav.org/avconv.htmlCode:sudo apt-get install libav-toolsCPU consumption on raspberry pi (top)VGA 640x480 150% CPUgray 160x120 25% CPUffmpeg/avconv can't work as really server but you can stream to a device (my notebook is 192.168.1.42):Code:$ avconv -f video4linux2 -i /dev/video2 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.1.42:1234avconv version 9.14-6:9.14-1rpi1rpi1, Copyright (c) 2000-2014 the Libav developersbuilt on Jul 22 2014 15:08:12 with gcc 4.6 (Debian 4.6.3-14+rpi1)[video4linux2 @ 0xdc3740] Estimating duration from bitrate, this may be inaccurateInput #0, video4linux2, from '/dev/video2':Duration: N/A, start: 1451736986.645583, bitrate: N/AStream #0.0: Video: mjpeg, yuvj422p, 640x480, 0 kb/s, 1000k tbn, 5 tbcOutput #0, rtp, to 'rtp://192.168.1.42:1234':Metadata:encoder : Lavf54.20.4Stream #0.0: Video: mpeg2video, yuv420p, 640x480, q=2-31, 2600 kb/s, 90k tbn, 25 tbcStream mapping:Stream #0:0 -> #0:0 (mjpeg -> mpeg2video)SDP:v=0o=- 0 0 IN IP4 127.0.0.1s=No Namec=IN IP4 192.168.1.42t=0 0a=tool:libavformat 54.20.4m=video 1234 RTP/AVP 32b=AS:2600Press ctrl-c to stop encodingframe= 437 fps= 24 q=4.2 size= 5613kB time=17.40 bitrate=2642.5kbits/son client 192.168.1.42 open the stream on localhost ;-)Code:vlc / open networkrtp://@:1234WithVLCI received not good results.Code:$ cvlc v4l2:// :v4l2-dev=/dev/video2 :v4l2-width=640 :v4l2-height=480 --sout '#transcode{vcodec=mp4v,vb=128}:rtp{sdp=rtsp://:8554/live.ts}"' -I dummyVLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89e) inhibit interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 main interface error: no suitable interface module main interface error: no suitable interface module main libvlc error: interface "globalhotkeys,none" initialization failed dummy interface: using the dummy interface module...[mpeg4 @ 0x730f80] removing common factors from framerate[mjpeg @ 0x71ba20] error count: 65[mjpeg @ 0x71ba20] error y=8 x=4[mjpeg @ 0x71ba20] error count: 64[mjpeg @ 0x71ba20] error y=10 x=29[mjpeg @ 0x71ba20] mjpeg: unsupported coding type (c9)[mjpeg @ 0x71ba20] error count: 66[mjpeg @ 0x71ba20] error y=19 x=32[mjpeg @ 0x71ba20] error count: 65[mjpeg @ 0x71ba20] error y=20 x=31[mjpeg @ 0x71ba20] only 8 bits/component accepted[mpeg4 @ 0x7095a0] removing common factors from framerate[mjpeg @ 0x71ba20] No JPEG data found in image[mjpeg @ 0x71ba20] No JPEG data found in imageThere is also the known feature/errorCode:VLC is not supposed to be run as root. Sorry.

author: cynfab
author_rank: Regular Contributor
timestamp: January 02, 2016, 03:10:33 pm
content: Hi tomas123,Thanks for the pointers,I've used MJPG-Streamer on an NSLU2 for a long time thanks to this site:https://johnarthur.wordpress.com/2008/03/25/a-high-resolution-ip-webcam/VLC is somewhat overkill as is ffmpeg, as they are both doing decode --> encode which gobbles up CPU cycles.I have a pcduino nano lite which uses an Allwinner A20 as my current test system, but a single core iMX6 is the actual target. No local display though.I guess I really need to get an iMX6 board to test with...ken...

author: cynfab
author_rank: Regular Contributor
timestamp: January 03, 2016, 06:07:29 pm
content: Hi tomasw123,Check this out:https://github.com/ccrisan/motioneyeos/wikiIt is motion based, I have it running on a RPi orig B with a UVC webcam, it seems a bit slow, but the RPi is a real dog....I'd bet they would be interested in integrating the flir8h driver......ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: January 03, 2016, 09:05:46 pm
content: I know this project ;-)and I hope that Flir sells more F1 to the community.Quote from: cynfab on January 02, 2016, 03:10:33 pmMy concept was, to start the mjpg_streamer for /dev/video2 and /dev/video3 and place the two streams side by side on a web front end.As I wrote before, mjpg_streamer only accepts mjpeg and YUV streams as input.For inspiration as attachment a new version which writes the colorized RGB Thermal Image as MJPEG to /dev/video3It needs the libjpeg library with libjpeg-dev (my path is /usr/include/jpeglib.h).Code:$ sudo apt-get install libjpeg-devThe code works fine...Code:$ makegcc -I/usr/include/libusb-1.0 -o flir8i Palettes.o flir8i.o -lusb-1.0 -ljpeg -lm -Wall$ sudo ./flir8iSuccessfully find the Flir One G2 deviceSuccessfully set usb configuration 3Successfully claimed interface 0,1,2using output device: /dev/video1vid_format->type =2vid_format->fmt.pix.width =160vid_format->fmt.pix.height =120vid_format->fmt.pix.pixelformat =1497715271vid_format->fmt.pix.sizeimage =20480vid_format->fmt.pix.field =1vid_format->fmt.pix.bytesperline=160vid_format->fmt.pix.colorspace =8using output device: /dev/video2vid_format->type =2vid_format->fmt.pix.width =640vid_format->fmt.pix.height =480vid_format->fmt.pix.pixelformat =1196444237vid_format->fmt.pix.sizeimage =1228800vid_format->fmt.pix.field =1vid_format->fmt.pix.bytesperline=0vid_format->fmt.pix.colorspace =8using output device: /dev/video3vid_format->type =2vid_format->fmt.pix.width =160vid_format->fmt.pix.height =120vid_format->fmt.pix.pixelformat =1196444237vid_format->fmt.pix.sizeimage =77824vid_format->fmt.pix.field =1vid_format->fmt.pix.bytesperline=0vid_format->fmt.pix.colorspace =8... with gucview and mplayer:QuoteBut unfortunately mjpg_streamer has a problem with a mjpeg stream 160x120.I don't know why.Quotewith MJPEG on /dev/video2 it works fineCode:$ mjpg_streamer -i "input_uvc.so -d /dev/video2" -o "output_http.so -w /usr/local/www"MJPG Streamer Version: svn rev: Unversioned directoryi: Using V4L2 device.: /dev/video2i: Desired Resolution: 640 x 480i: Frames Per Second.: 5i: Format............: MJPEG...o: www-folder-path...: /usr/local/www/o: HTTP TCP port.....: 8080o: username:password.: disabledo: commands..........: enabledPS: flir8i1.c is a working copy, which writes all colorized thermal frames as JPEGs to file with format #012345.jpg

author: cynfab
author_rank: Regular Contributor
timestamp: January 03, 2016, 10:09:48 pm
content: tomas123,When I display the colorized jpeg stream with guvcview, the color palette is messed up. could this be part of the problem with mpeg-streamer?But when I change the guvcview vid controls to RGB3 the colors are ok. Hmmmm.....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: January 04, 2016, 09:11:02 am
content: Quote from: cynfab on January 03, 2016, 10:09:48 pmdo you mean with guvcview on /dev/video3- flir8h with RGB24 (=RGB3)- or flir8i with MJPEG ?

author: cynfab
author_rank: Regular Contributor
timestamp: January 04, 2016, 03:05:48 pm
content: I believe it was a cockpit problem, I had the guvcview color controls set to MJPEG for /dev/video3 and the resulting stream was green. I changed it to RGB3 and it was ok.This was flir8i streaming a mjpeg stream on /dev/video3.

author: tomas123
author_rank: Frequent Contributor
timestamp: January 04, 2016, 11:39:54 pm
content: I can't confirm that.On my raspberry pi guvcview color controls is automatic set to MJPEG for /dev/video2and/dev/video3 and all works fineflir8i2.c (see attachment) writes all jpg frames for /dev/video2 and /dev/video3 to filethe only ones differences I found in the .jpg files was the subsampling (v2=/dev/video2 andv3=/dev/video3)Code:$ exiftool -YCb* \#0000010-v*.jpg======== #0000010-v2.jpgY Cb Cr Sub Sampling : YCbCr4:2:2 (2 1)======== #0000010-v3.jpgY Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)2 image files readboth subsamplings are valid for MJPEGbut nevertheless I changed the code for libjpeg at line 353 for YCbCr4:2:2 subsamplingCode:// 4:2:2 (2x1 1x1 1x1) - CrH 50% - CbH 50% - CrV 100% - CbV 100%cinfo.comp_info.h_samp_factor = 2;// Ycinfo.comp_info.v_samp_factor = 1;cinfo.comp_info.h_samp_factor = 1;// Cbcinfo.comp_info.v_samp_factor = 1;cinfo.comp_info.h_samp_factor = 1;// Crcinfo.comp_info.v_samp_factor = 1;Now I can't see a difference.Quote... except the missing JFIF in /video2Code:$ hexdump -n32 -C #0000010-v2.jpg00000000 ff d8 ff c0 00 11 08 01 e0 02 80 03 01 21 00 02 |.............!..|00000010 11 01 03 11 01 ff dd 00 04 00 28 ff db 00 84 00 |..........(.....|$ hexdump -n32 -C #0000010-v3.jpg00000000 ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 |......JFIF......|00000010 00 01 00 00 ff db 00 43 00 03 02 02 03 02 02 03 |.......C........|no differences in the announcements of the v4l2 loopback devicesCode:$ v4l2-ctl --all -d /dev/video2Driver Info (not using libv4l2):Driver name : v4l2 loopbackCard type : Dummy video device (0x0002)Bus info : platform:v4l2loopback-002Driver version: 3.18.13Capabilities : 0x85208001Video CaptureVideo Memory-to-MemoryRead/WriteStreamingDevice CapabilitiesDevice Caps : 0x05208001Video CaptureVideo Memory-to-MemoryRead/WriteStreamingVideo input : 0 (loopback: ok)Format Video Capture:Width/Height : 640/480Pixel Format : 'MJPG'Field : NoneBytes per Line: 0Size Image : 1228800Colorspace : SRGBCustom Info : feedcafeFormat Video Output:Width/Height : 640/480Pixel Format : 'MJPG'Field : NoneBytes per Line: 0Size Image : 1228800Colorspace : SRGBCustom Info : feedcafeStreaming Parameters Video Capture:Frames per second: 5.000 (5/1)Read buffers : 8Streaming Parameters Video Output:Frames per second: 5.000 (5/1)Write buffers : 8User Controlskeep_format (bool) : default=0 value=0sustain_framerate (bool) : default=0 value=0timeout (int) : min=0 max=100000 step=1 default=0 value=0timeout_image_io (bool) : default=0 value=0$ v4l2-ctl --all -d /dev/video3Driver Info (not using libv4l2):Driver name : v4l2 loopbackCard type : Dummy video device (0x0003)Bus info : platform:v4l2loopback-003Driver version: 3.18.13Capabilities : 0x85208001Video CaptureVideo Memory-to-MemoryRead/WriteStreamingDevice CapabilitiesDevice Caps : 0x05208001Video CaptureVideo Memory-to-MemoryRead/WriteStreamingVideo input : 0 (loopback: ok)Format Video Capture:Width/Height : 160/120Pixel Format : 'MJPG'Field : NoneBytes per Line: 0Size Image : 76800Colorspace : SRGBCustom Info : feedcafeFormat Video Output:Width/Height : 160/120Pixel Format : 'MJPG'Field : NoneBytes per Line: 0Size Image : 76800Colorspace : SRGBCustom Info : feedcafeStreaming Parameters Video Capture:Frames per second: 5.000 (5/1)Read buffers : 8Streaming Parameters Video Output:Frames per second: 5.000 (5/1)Write buffers : 8User Controlskeep_format (bool) : default=0 value=0sustain_framerate (bool) : default=0 value=0timeout (int) : min=0 max=100000 step=1 default=0 value=0timeout_image_io (bool) : default=0 value=0But still mjpg_streamer has the same problem with the mjpeg stream 160x120.Code:$ export LD_LIBRARY_PATH=/usr/local/lib$ mjpg_streamer -i "input_uvc.so -d /dev/video3 -r 160x120" -o "output_http.so -w /usr/local/www"MJPG Streamer Version: svn rev: Unversioned directoryi: Using V4L2 device.: /dev/video3i: Desired Resolution: 160 x 120i: Frames Per Second.: 5i: Format............: MJPEG...o: www-folder-path...: /usr/local/www/o: HTTP TCP port.....: 8080o: username:password.: disabledo: commands..........: enabled*** glibc detected *** mjpg_streamer: free(): invalid next size (normal): 0x01258910 ***AbortedIs 160x120 to small for mjpg_streamer?

author: cynfab
author_rank: Regular Contributor
timestamp: January 05, 2016, 01:13:33 am
content: tomas123,Maybe we should expanding the 160 x 120 image to 320 x 240. just a quick scaling by 2 should be enough to see if there is a minimum size issue....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: January 06, 2016, 11:43:42 pm
content: Yes, with an upscaled image to 320 x 240 mjpg_streamer works fine without a buffer/pointer error.Code:./mjpg_streamer -i "./input_uvc.so -d /dev/video3" -o "output_http.so -w /usr/local/www"I wasted many time for this bugQuoteAfter debugging the mjpg_streamer source code I know, that the error comes from the second (!) grabbed frameCode:$ ./mjpg_streamer -i "./input_uvc.so -d /dev/video3" -o "output_http.so -w /usr/local/www"MJPG Streamer Version: svn rev: 3:172MDBG(input_uvc.c, input_init(), 107): argv=UVC webcam grabberDBG(input_uvc.c, input_init(), 107): argv=-dDBG(input_uvc.c, input_init(), 107): argv=/dev/video3DBG(input_uvc.c, input_init(), 162): case 2,3DBG(input_uvc.c, input_init(), 245): input id: 0i: Using V4L2 device.: /dev/video3i: Desired Resolution: 640 x 480i: Frames Per Second.: 5i: Format............: MJPEGDBG(input_uvc.c, input_init(), 265): vdIn pn: 0i: The format asked unavailable, so the width 160 height 120DBG(v4l2uvc.c, init_videoIn(), 94): Current size: 160x120DBG(v4l2uvc.c, init_videoIn(), 123): Supported format: DBG(v4l2uvc.c, init_videoIn(), 153): Supported size with the current format: 160x120DBG(v4l2uvc.c, init_videoIn(), 123): Supported format: RGB3DBG(v4l2uvc.c, init_videoIn(), 155): Supported size: 160x120DBG(v4l2uvc.c, init_videoIn(), 123): Supported format: BGR3DBG(v4l2uvc.c, init_videoIn(), 155): Supported size: 160x120DBG(v4l2uvc.c, init_videoIn(), 123): Supported format: YU12DBG(v4l2uvc.c, init_videoIn(), 155): Supported size: 160x120DBG(v4l2uvc.c, init_videoIn(), 123): Supported format: YV12DBG(v4l2uvc.c, init_videoIn(), 155): Supported size: 160x120...DBG(v4l2uvc.c, enumerateControls(), 801): V4L2 API's V4L2_CTRL_FLAG_NEXT_CTRL is supportedDBG(v4l2uvc.c, control_readed(), 705): V4L2 parameter found: User Controls value 2123345140 Class: USERDBG(v4l2uvc.c, control_readed(), 710): Unable to get the value of User Controls retcode: -1 Permission deniedDBG(v4l2uvc.c, control_readed(), 705): V4L2 parameter found: keep_format value 0 Class: USERDBG(v4l2uvc.c, control_readed(), 705): V4L2 parameter found: sustain_framerate value 0 Class: USERDBG(v4l2uvc.c, control_readed(), 705): V4L2 parameter found: timeout value 0 Class: USERDBG(v4l2uvc.c, control_readed(), 705): V4L2 parameter found: timeout_image_io value 0 Class: USERDBG(v4l2uvc.c, enumerateControls(), 836): JPEG compression details:DBG(v4l2uvc.c, enumerateControls(), 837): Quality: 0DBG(v4l2uvc.c, enumerateControls(), 838): APPn: 0DBG(v4l2uvc.c, enumerateControls(), 839): APP length: 0DBG(v4l2uvc.c, enumerateControls(), 840): APP data:DBG(v4l2uvc.c, enumerateControls(), 841): COM length: 0DBG(v4l2uvc.c, enumerateControls(), 842): COM data:o: www-folder-path...: /usr/local/www/o: HTTP TCP port.....: 8080o: username:password.: disabledo: commands..........: enabledDBG(input_uvc.c, input_run(), 310): launching camera thread #00,sizeof(struct v4l2_buffer) DBG(v4l2uvc.c, uvcGrab(), 431): X3DBG(input_uvc.c, cam_thread(), 382): received frame of size: 76800 from plugin: 0DBG(input_uvc.c, cam_thread(), 411): copying frame from input: 0DBG(input_uvc.c, cam_thread(), 436): waiting for next frame*** glibc detected *** ./mjpg_streamer: free(): invalid next size (normal): 0x000ee9d8 ***Abortedthe errors comes from this line:input_uvc.cCode:/* grab a frame */377: if(uvcGrab(pcontext->videoIn) < 0) {this goes to V4l2 command VIDIOC_DQBUFv4l2uvc.cCode:int uvcGrab(struct vdIn *vd){430: vd->buf.memory = V4L2_MEMORY_MMAP;431: ret = xioctl(vd->fd, VIDIOC_DQBUF, &vd->buf);withCode:static int xioctl(int fh, int request, void *arg){int r;do{r = ioctl(fh, request, arg);} while (-1 == r && EINTR == errno);return r;}but I found no solutiononly for information:Quote from: tomas123 on January 04, 2016, 11:39:54 pmQuoteremove a JFIF header from jpeg withCode:cinfo.write_JFIF_header = FALSE;jpeg_start_compress(&cinfo, TRUE);

author: tomas123
author_rank: Frequent Contributor
timestamp: January 07, 2016, 08:09:52 am
content: Hi cynfab,have you ever tried mjpg_streamer on your Linux Mint?Today I tested it the first time on a Linux Mint Notebook with our old code flir8i.cReverse:- real video stream 640x480 on /dev/video2 goes to a memory error- thermal video stream 160x120 on /dev/video3 works fineIn the german ubuntu forumhttps://wiki.ubuntuusers.de/MJPG-Streamer/they describe, that the old Rev. 182 (Date 2008-06-21) of /mjpg_streamer is buggy while reading MJPEG.I can confirm it.

author: cynfab
author_rank: Regular Contributor
timestamp: January 07, 2016, 02:20:22 pm
content: Hi tomas123,No I haven't tried mjpeg-streamer on Mint. been busy & now snowed in againTrying to get a new kernel built for my pcduino, and having some toolchain problems. Once I get that working I'll be trying the various flir8x, v4l2 & loopback code on it....ken...

author: Ben321
author_rank: Frequent Contributor
timestamp: January 08, 2016, 08:34:43 am
content: When is FLIR going to start selling 160x120 Lepton chips as standalone components. I just recently checked their website and they link to Digikey which is selling the old 80x60 chips still. How long until the old ones sell out, so they can start selling the new version? And when (if ever) is FLIR going to start making true 320x240 or 640x480 Lepton chips? It seems they must have in the past couple years discovered a better manufacturing process for making vanadium oxide microbolometer chips, because 160x120 thermal imagers used to sell for about $2500, but the FLIR One costs only $250. If this is how dramatic they have been able to reduce the cost on 160x120 thermal images, I'm expecting them to eventually expand their range of super-cheap thermal imagers to eventually include ones with super-cheap 320x240, or even 640x480, VOX microbolometer chips (maybe a Lepton v4 or v5). Have you guys heard any rumors about any plans from FLIR for future versions of the Lepton chip that have a higher resolution than 160x120?

author: Lord of nothing
author_rank: Super Contributor
timestamp: January 10, 2016, 01:24:10 pm
content: are there any other company who make thermal sensors?

author: frenky
author_rank: Unknown
timestamp: January 10, 2016, 02:50:37 pm
content: Check out this two:http://www.i3system.com/eng/http://www.heimannsensor.com/products_imaging.phpSent from my LG-D855 using Tapatalk

author: tomas123
author_rank: Frequent Contributor
timestamp: January 10, 2016, 04:44:17 pm
content: a subforum for "Thermal Imaging"Hi cynfab,after terrible hours with a self compiled kernel driver (v4l2loopback.so) for ARM systemsCode:$ find / -name v4l2loopback.ko 2>/dev/zero/lib/modules/3.18.0-trunk-rpi2/extra/v4l2loopback.ko/lib/modules/3.18.13-v7+/extra/v4l2loopback.ko... I suggest new concept for using MJPEG Streamer with our Flir One:Create a RAMDisk and use the input_file.so module of mjpg_streamer.It works great with the low powered raspberry pi and youdon't need the loopback devices /dev/videoX(1) create a small ramdisk of 20MBCode:$ sudo mkdir /mnt/RAMDisk$ sudo chmod 777 /mnt/RAMDisk$ sudo mount -t tmpfs -o size=20m none /mnt/RAMDisk$ dfFilesystem 1K-blocks Used Available Use% Mounted onnone 20480 20480 0 100% /mnt/RAMDisk(2) compile the code flir8k.c from attachmentcheck your packagesCode:$ sudo apt-get install libusb-1.0-0$ sudo apt-get install libusb-1.0-0-dev$ sudo apt-get install libjpeg-devCode:$ makegcc -I/usr/include/libusb-1.0 -c -o flir8k.o flir8k.cgcc -I/usr/include/libusb-1.0 -o flir8k Palettes.o flir8k.o -lusb-1.0 -ljpeg -lm -Wall(3) start the binarynow the binary writes the two imagesreal.jpg and thermal.jpg to /mnt/RAMDisk/with 8 fpsCode:$ sudo ./flir8kSuccessfully find the Flir One G2 deviceSuccessfully set usb configuration 3Successfully claimed interface 0,1,2stop interface 2 FRAMEstop interface 1 FILEIOstart interface 1 FILEIO:xx Sun Jan 10 16:30:27 2016: Sun Jan 10 16:30:27 2016bulk read EP 0x81, actual length 101HEX:cc 01 00 00 01 00 00 00 55 00 00 00 30 73 8c df 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 56 6f 6c 74 61 67 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 76 6f 6c 74 61 67 65 22 3a 34 2e 31 37 30 30 30 30 30 37 36 32 39 33 39 35 2c 22 70 65 72 63 65 6e 74 61 67 65 22 3a 31 30 30 7d 7d 00STRING:?U0s??{"type":"batteryVoltageUpdate","data":{"voltage":4.17000007629395,"percentage":100}}: Sun Jan 10 16:30:27 2016>>>>>>>>>>>>>>>>>bulk transfer (in) 0x83:-7 LIBUSB_ERROR_TIMEOUTask for CameraFiles.zip on EP 0x83:: Sun Jan 10 16:30:28 2016EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 41 00 00 00 f8 b3 f7 00 ]Write successful!EP 0x02 to be sent: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}Write successful!Sent 65 bytes with string: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}EP 0x02 to be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 33 00 00 00 ef db c1 c1 ]Write successful!EP 0x02 to be sent 51 Bytes: {"type":"readFile","data":{"streamIdentifier":10}}Write successful!Sent 51 bytes with string: {"type":"readFile","data":{"streamIdentifier":10}}: Sun Jan 10 16:30:28 2016Ask for video stream, start EP 0x85:: Sun Jan 10 16:30:28 2016>>>>>>>>>>>>>>>>>bulk transfer (in) 0x81:-7 LIBUSB_ERROR_TIMEOUT#000001 0/10 fps:{"shutterState":"ON","shutterTemperature":310.179992675781,"usbNotifiedTimestamp":1177004833.33163,"usbEnqueuedTimestamp":1177004833.33369,"ffcState":"FFC_VALID_RAD"}#000002 0/10 fps:{"shutterState":"FFC","shutterTemperature":308.640014648438,"usbNotifiedTimestamp":1177004852.00896,"usbEnqueuedTimestamp":1177004852.01061,"ffcState":"FFC_RAD_APPROX"}: Sun Jan 10 16:30:47 2016bulk read EP 0x81, actual length 206HEX:cc 01 00 00 01 00 00 00 55 00 00 00 30 73 8c df 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 56 6f 6c 74 61 67 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 76 6f 6c 74 61 67 65 22 3a 34 2e 31 37 30 30 30 30 30 37 36 32 39 33 39 35 2c 22 70 65 72 63 65 6e 74 61 67 65 22 3a 31 30 30 7d 7d 00 cc 01 00 00 01 00 00 00 59 00 00 00 88 cc 5a 95 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 43 68 61 72 67 69 6e 67 53 74 61 74 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 63 68 61 72 67 69 6e 67 53 74 61 74 65 22 3a 22 73 74 61 74 65 43 68 61 72 67 69 6e 67 53 6d 61 72 74 50 68 6fSTRING:?U0s??{"type":"batteryVoltageUpdate","data":{"voltage":4.17000007629395,"percentage":100}}?Y??Z?{"type":"batteryChargingStateUpdate","data":{"chargingState":"stateChargingSmartPho#000003 0/10 fps:{"shutterState":"FFC","shutterTemperature":308.640014648438,"usbNotifiedTimestamp":1177004852.57983,"usbEnqueuedTimestamp":1177004852.58155,"ffcState":"FFC_RAD_APPROX"}#000004 3/10 fps:{"shutterState":"FFC","shutterTemperature":308.640014648438,"usbNotifiedTimestamp":1177004852.69227,"usbEnqueuedTimestamp":1177004852.69411,"ffcState":"FFC_RAD_APPROX"}#000005 8/10 fps:{"shutterState":"ON","shutterTemperature":308.640014648438,"usbNotifiedTimestamp":1177004852.80562,"usbEnqueuedTimestamp":1177004852.80794,"ffcState":"FFC_RAD_APPROX"}#000006 11/10 fps:{"shutterState":"ON","shutterTemperature":308.640014648438,"usbNotifiedTimestamp":1177004852.91994,"usbEnqueuedTimestamp":1177004852.92159,"ffcState":"FFC_RAD_APPROX"}#000007 14/10 fps:{"shutterState":"ON","shutterTemperature":308.640014648438,"usbNotifiedTimestamp":1177004853.03383,"usbEnqueuedTimestamp":1177004853.03595,"ffcState":"FFC_RAD_APPROX"}#000008 18/10 fps:{"shutterState":"ON","shutterTemperature":308.640014648438,"usbNotifiedTimestamp":1177004853.14999,"usbEnqueuedTimestamp":1177004853.15202,"ffcState":"FFC_RAD_APPROX"}#000009 20/10 fps:{"shutterState":"ON","shutterTemperature":308.75,"usbNotifiedTimestamp":1177004853.26203,"usbEnqueuedTimestamp":1177004853.26407,"ffcState":"FFC_RAD_APPROX"}#000010 23/10 fps:{"shutterState":"ON","shutterTemperature":308.75,"usbNotifiedTimestamp":1177004853.37733,"usbEnqueuedTimestamp":1177004853.37923,"ffcState":"FFC_RAD_APPROX"}#000011 26/10 fps:{"shutterState":"ON","shutterTemperature":308.75,"usbNotifiedTimestamp":1177004853.49003,"usbEnqueuedTimestamp":1177004853.49223,"ffcState":"FFC_RAD_APPROX"}#000012 28/10 fps:{"shutterState":"ON","shutterTemperature":308.769989013672,"usbNotifiedTimestamp":1177004853.60389,"usbEnqueuedTimestamp":1177004853.60574,"ffcState":"FFC_RAD_APPROX"}...#003170 86/10 fps:{"shutterState":"ON","shutterTemperature":310.679992675781,"usbNotifiedTimestamp":1177004033.54082,"usbEnqueuedTimestamp":1177004033.542,"ffcState":"FFC_VALID_RAD"}#003171 84/10 fps:{"shutterState":"ON","shutterTemperature":310.679992675781,"usbNotifiedTimestamp":1177004033.65724,"usbEnqueuedTimestamp":1177004033.6585,"ffcState":"FFC_VALID_RAD"}#003172 83/10 fps:{"shutterState":"ON","shutterTemperature":310.679992675781,"usbNotifiedTimestamp":1177004033.76884,"usbEnqueuedTimestamp":1177004033.77,"ffcState":"FFC_VALID_RAD"}#003173 83/10 fps:{"shutterState":"ON","shutterTemperature":310.679992675781,"usbNotifiedTimestamp":1177004033.88303,"usbEnqueuedTimestamp":1177004033.89359,"ffcState":"FFC_VALID_RAD"}#003174 84/10 fps:{"shutterState":"ON","shutterTemperature":310.679992675781,"usbNotifiedTimestamp":1177004034.00084,"usbEnqueuedTimestamp":1177004034.00196,"ffcState":"FFC_VALID_RAD"}#003175 84/10 fps:{"shutterState":"ON","shutterTemperature":310.679992675781,"usbNotifiedTimestamp":1177004034.11106,"usbEnqueuedTimestamp":1177004034.11261,"ffcState":"FFC_VALID_RAD"}#003176 84/10 fps:{"shutterState":"ON","shutterTemperature":310.679992675781,"usbNotifiedTimestamp":1177004034.2256,"usbEnqueuedTimestamp":1177004034.22683,"ffcState":"FFC_VALID_RAD"}(4) run a web server on /var/www/- like apacheCode:$ sudo apt-get install apache2- link the two files real.jpg and thermal.jpg from RAMDISK to web folder- check your web folder (current apache on raspi is /var/www/html/thermal.jpgCode:$ sudo ln -s /mnt/RAMDisk/thermal.jpg /var/www/thermal.jpg$ sudo ln -s /mnt/RAMDisk/real.jpg /var/www/real.jpg// don't forget the "sudo chmod 777 /mnt/RAMDisk" from (1)now you can see the two images in your web browserCode:http://192.168.1.70/real.jpghttp://192.168.1.70/thermal.jpgmy raspberry pi has the address 192.168.1.70(5) View video stream on an iDevice / Smartphoneload from apple app store ore google play store the free appIP Cam Viewer Litefrom NibblesnBitshttp://elinux.org/RPi-Cam-Web-Interface#View_video_stream_on_an_iDevice_.2F_SmartphoneQuoteYou can to it twice for thermal.jpg and real.jpg and then you see the two streams parallel.It's a little bit rough for the large image real.jpg with 9fps over WLAN, but thermal.jpg works fine(6) create twoMJPEG streamsfor real and thermal imagecompile mjpg-streamer from sourcemjpg-streamer needs imagemagickCode:$ sudo apt-get install imagemagickCode:$ sudo apt-get install subversion$ svn co svn://svn.code.sf.net/p/mjpg-streamer/code/ mjpg-streamer...Checked out revision 182.$ cd mjpg-streamer/mjpg-streamer$ makegcc -D'SVN_REV="3:172"' -O2 -DLINUX -D_GNU_SOURCE -Wall -c -o mjpg_streamer.o mjpg_streamer.cgcc -D'SVN_REV="3:172"' -O2 -DLINUX -D_GNU_SOURCE -Wall -c -o utils.o utils.cgcc -D'SVN_REV="3:172"' -O2 -DLINUX -D_GNU_SOURCE -Wall mjpg_streamer.o utils.o -lpthread -ldl -o mjpg_streamerchmod 755 mjpg_streamermake -C plugins/input_uvc all...cp plugins/input_file/input_file.so$ ls -altotal 412drwxr-xr-x 5 pi pi 4096 Jan 10 17:24 .drwxr-xr-x 10 pi pi 4096 Jan 10 17:22 ..-rw-r--r-- 1 pi pi 102 Jan 10 17:22 CHANGELOG-rwxr-xr-x 1 pi pi 14331 Jan 10 17:24 input_file.so-rwxr-xr-x 1 pi pi 168606 Jan 10 17:24 input_testpicture.so-rwxr-xr-x 1 pi pi 30905 Jan 10 17:24 input_uvc.so-rw-r--r-- 1 pi pi 17987 Jan 10 17:22 LICENSE-rw-r--r-- 1 pi pi 5107 Jan 10 17:22 Makefile-rwxr-xr-x 1 pi pi 16104 Jan 10 17:24 mjpg_streamer-rw-r--r-- 1 pi pi 15738 Jan 10 17:22 mjpg_streamer.c-rw-r--r-- 1 pi pi 3617 Jan 10 17:22 mjpg_streamer.h-rw-r--r-- 1 pi pi 9800 Jan 10 17:24 mjpg_streamer.o-rwxr-xr-x 1 pi pi 20284 Jan 10 17:24 output_file.so-rwxr-xr-x 1 pi pi 32436 Jan 10 17:24 output_http.so-rwxr-xr-x 1 pi pi 14891 Jan 10 17:24 output_udp.sodrwxr-xr-x 13 pi pi 4096 Jan 10 17:22 plugins-rw-r--r-- 1 pi pi 2631 Jan 10 17:22 READMEdrwxr-xr-x 2 pi pi 4096 Jan 10 17:22 scripts-rwxr-xr-x 1 pi pi 4630 Jan 10 17:22 start.sh-rw-r--r-- 1 pi pi 285 Jan 10 17:22 TODO-rw-r--r-- 1 pi pi 2866 Jan 10 17:22 utils.c-rw-r--r-- 1 pi pi 2399 Jan 10 17:22 utils.h-rw-r--r-- 1 pi pi 1804 Jan 10 17:24 utils.odrwxr-xr-x 2 pi pi 4096 Jan 10 17:22 wwwYou don't need a "sudo make install". Stay in current folder, the are all required binaries included.test the mjpg_streamer and get the helpCode:$ LD_LIBRARY_PATH=./ ./mjpg_streamer -i "input_file.so -h"MJPG Streamer Version: svn rev: 3:172---------------------------------------------------------------Help for input plugin..: FILE input plugin---------------------------------------------------------------The following parameters can be passed to this plugin:[-d | --delay ]........: delay to pause between frames[-f | --folder ].......: folder to watch for new JPEG files[-r | --remove ].......: remove/delete JPEG file after reading[-n | --name ].........: ignore changes unless filename matches---------------------------------------------------------------$ LD_LIBRARY_PATH=./ ./mjpg_streamer -o "output_http.so -h"MJPG Streamer Version: svn rev: 3:172---------------------------------------------------------------Help for output plugin..: HTTP output plugin---------------------------------------------------------------The following parameters can be passed to this plugin:[-w | --www ]...........: folder that contains webpages inflat hierarchy (no subfolders)[-p | --port ]..........: TCP port for this HTTP server[-c | --credentials ]...: ask for "username:password" on connect[-n | --nocommands ]....: disable execution of commands---------------------------------------------------------------write a start script start1.sh (there is already a start.sh)Code:$ cat ./start1.shexport LD_LIBRARY_PATH=././mjpg_streamer -i "input_file.so -f /mnt/RAMDisk/ -n thermal.jpg" -o "output_http.so -p 8080 -w /usr/local/www" &./mjpg_streamer -i "input_file.so -d 250 -f /mnt/RAMDisk/ -n real.jpg" -o "output_http.so -p 8081 -w /usr/local/www"Please note, that I reduced with "-d 250"ms the frame rate of the visible image to 4 fps, to reduce the WLAN bandwidthand start the scriptCode:$ ./start1.shMJPG Streamer Version: svn rev: 3:172Mi: folder to watch...: /mnt/RAMDisk/i: forced delay......: 250i: delete file.......: no, do not deletei: filename must be..: real.jpgo: www-folder-path...: /usr/local/www/o: HTTP TCP port.....: 8081MJPG Streamer Version: svn rev: 3:172Mo: username:password.: disabledo: commands..........: enabledi: folder to watch...: /mnt/RAMDisk/i: forced delay......: 0i: delete file.......: no, do not deletei: filename must be..: thermal.jpgo: www-folder-path...: /usr/local/www/o: HTTP TCP port.....: 8080o: username:password.: disabledo: commands..........: enablednow we have two MJPEG live streamssee thetwoweb front ends for informationsQuotetest it with VLC or mplayer etc.Code:http://192.168.1.70:8080/?action=streamhttp://192.168.1.70:8081/?action=stream(7) a simple html web front endcreate a index.html in your web folder /var/wwwCode:$ cat /var/www/index.html<!DOCTYPE html><html><head><style type="text/css">body {text-align:center;background-color:#000000;}.container {width:100%;}.motion1 {border: 0;width: 40%;height: auto;}.motion2 {border: 0;width: 40%;height: auto;}.clear {clear:both;}</style></head><body><a href="http://192.168.1.70:8080"><img class="motion1" src="http://192.168.1.70:8080/?action=stream" /></a><a href="http://192.168.1.70:8081"><img class="motion2" src="http://192.168.1.70:8081/?action=stream" /></a></body></html>load the site:Code:http://192.168.1.70

author: cynfab
author_rank: Regular Contributor
timestamp: January 10, 2016, 06:55:27 pm
content: Hi tomas123,Wow, you have been busy...Yea... Thermal Imaging section.Well I got my new kernel 4.3.3 for the pcduino building with buildroot, I was going to add the v4l2 kernel module, but after your recent experiments, maybe that'snot a good idea to waste any more time on.... I'd much rather a userland solution.I'll try and replicate your system soon. Busy week ahead....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: January 10, 2016, 11:14:07 pm
content: Quote from: cynfab on January 10, 2016, 06:55:27 pmI read something about the interesting UV4L "User space Video4Linux collection"http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=16but I have no idea, how to implement this in our code.The workaround over the RAMDisk has advantages and disadvantages.mjpg-streamer waits patiently for the next jpg image.Therefore you can restart the flir binary without stopping the mjpeg stream! // edit: restart works with v4l2 driver alsoOtherwise you have more random lags as with /dev/videoX.For a surveillance camera with a low frame rate is the RAMDisk workaround acceptable.If you want a nice live stream without lags, than is v4l2 the better solution.The cutted source code flir8k contains a better error correction and a filter for FFC frames.Code:// freeze thermal image if "shutterState"="FFC"if (strncmp (&buf85[28+ThermalSize+JpgSize+17],"FFC",3)!=0){I added a nice restart sequence, because sometimes the code doesn't correct start the USB flir cameraQuote

author: Brumby
author_rank: Unknown
timestamp: January 11, 2016, 02:30:00 am
content: Quote from: tomas123 on January 10, 2016, 04:44:17 pm+1

author: tomas123
author_rank: Frequent Contributor
timestamp: January 11, 2016, 11:55:35 pm
content: Quote from: tomas123 on January 04, 2016, 11:39:54 pmI found a niceworkaroundfor mjpg_streamer with the v4l2 input modul and 160x120 frame size.only enlarge the initialisation frame size of the v4l2 device from 160x120 to:Code:#define VIDEO_DEVICE2 "/dev/video3" // colorized thermal image#define FRAME_WIDTH2 320#define FRAME_HEIGHT2 240than you can write a smaller jpeg of 160x120 to VIDEO_DEVICE2Code:// write frame as jpg to fdwr2...int image_width=160;/* Number of columns in image */int image_height=120;/* Number of rows in image */int quality=90;and mjpg_streamer works fine with v4l2 loopback device (also VLC etc.)Code:./mjpg_streamer -i "./input_uvc.so -d /dev/video2" -o "./output_http.so -p 8080 -w /usr/local/www" &./mjpg_streamer -i "./input_uvc.so -d /dev/video3" -o "./output_http.so -p 8081 -w /usr/local/www"Quote from: cynfab on January 07, 2016, 02:20:22 pmI know this point from my early cross compile experiences for embedded devices like router, NAS etc.Last years I'm lazy and I mostly load a ready image for the raspberry pi.Unfortunately currently there are no 100% corresponding kernel sources for the last raspberry pi image. It's a pain for compiling kernel drivers.

author: cynfab
author_rank: Regular Contributor
timestamp: January 12, 2016, 01:57:34 am
content: tomas123,Been there done that.... Cross compiling kernel drivers is a PITA.....I used to be better at it than I am now... been lazy lately too,Fixed the toolchain problems, cockpit problem again, kernel now compiling and running...Then Linus releases 4.4 LTS so I need to repeat it all again with the new kernel code....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: January 12, 2016, 08:43:51 am
content: http://www.linksprite.com/linksprite-pcduino/What are the advantages of the pcduino, which do you need versus a raspberry pi?Flash?for other readers: on the right side is a pcDuino3

author: cynfab
author_rank: Regular Contributor
timestamp: January 12, 2016, 03:00:11 pm
content: tomas123,A bit off topic for the FlirOne Android thread but not tooooo far off.I have several sbc's, and am always looking for a better "bang for the buck".Prices keep falling and capabilities keep getting better.I bought the pcduino3 nano lite just before Xmas, at $US15 delivered from Amazon.Unfortunately that was some sort of promotion, and the real price is more like $US40.So it is not as good a deal as first thought. Oh well... I'll buy one of almost any SBC if I think it's worth evaluating.My collection of SBC's is like Frasers collection of thermal cameras (see not quite off topic)It is still a nice board with fairly good kernel support.I also have 2 RPi model B boards which I got in the early days of the RPi.IMHO their USB core in the SOC stinks. Their USB power system on the board stinks.This may have improved a bit in later versions RPi2.

author: tomas123
author_rank: Frequent Contributor
timestamp: January 12, 2016, 05:28:17 pm
content: Hi cynfab,Quote from: cynfab on January 12, 2016, 03:00:11 pmI have also a "nice" collection of RPi A, RPi B and now RPi 2.The USB power of RPi 2 is noticeable more better. We get no more low power resets after plug in a 300mA USB device.Quote from: tomas123 on January 11, 2016, 11:55:35 pmas alternative for the RAMdisk version flir8k.chttps://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg839518/#msg839518I uploaded as attachmentthe last version flir8k.cfor v4l2 loopback deviceswith the better error correction, FFC filter etc.Code:$ makegcc -I/usr/include/libusb-1.0 -c -o flir8l.o flir8l.cgcc -I/usr/include/libusb-1.0 -o flir8l Palettes.o flir8l.o -lusb-1.0 -ljpeg -lm -Wall$ sudo ./flir8lSuccessfully find the Flir One G2 deviceSuccessfully set usb configuration 3Successfully claimed interface 0,1,2using output device: /dev/video1vid_format->type =2vid_format->fmt.pix.width =160vid_format->fmt.pix.height =120vid_format->fmt.pix.pixelformat =1497715271vid_format->fmt.pix.sizeimage =20480vid_format->fmt.pix.field =1vid_format->fmt.pix.bytesperline=160vid_format->fmt.pix.colorspace =8using output device: /dev/video2vid_format->type =2vid_format->fmt.pix.width =640vid_format->fmt.pix.height =480vid_format->fmt.pix.pixelformat =1196444237vid_format->fmt.pix.sizeimage =1228800vid_format->fmt.pix.field =1vid_format->fmt.pix.bytesperline=0vid_format->fmt.pix.colorspace =8using output device: /dev/video3vid_format->type =2vid_format->fmt.pix.width =320vid_format->fmt.pix.height =240vid_format->fmt.pix.pixelformat =1196444237vid_format->fmt.pix.sizeimage =307200vid_format->fmt.pix.field =1vid_format->fmt.pix.bytesperline=0vid_format->fmt.pix.colorspace =8stop interface 2 FRAMEstop interface 1 FILEIOstart interface 1 FILEIO...use second terminal to start twice mjpg-streamersCode:~/MJPG-Streamer/test/mjpg-streamer/mjpg-streamer $ cat ./start1.sh./mjpg_streamer -i "./input_uvc.so -d /dev/video2" -o "./output_http.so -p 8080 -w /usr/local/www"&./mjpg_streamer -i "./input_uvc.so -d /dev/video3" -o "./output_http.so -p 8081 -w /usr/local/www"~/MJPG-Streamer/test/mjpg-streamer/mjpg-streamer $ lsCHANGELOG input_testpicture.so LICENSE mjpg_streamer mjpg_streamer.h output_file.so output_udp.so README start1.sh TODO utils.h wwwinput_file.so input_uvc.so Makefile mjpg_streamer.c mjpg_streamer.o output_http.so plugins scripts start.sh utils.c utils.o~/MJPG-Streamer/test/mjpg-streamer/mjpg-streamer $ ./start1.shMJPG Streamer Version: svn rev: 3:172i: Using V4L2 device.: /dev/video2i: Desired Resolution: 640 x 480i: Frames Per Second.: 5i: Format............: MJPEGo: www-folder-path...: /usr/local/www/o: HTTP TCP port.....: 8080o: username:password.: disabledo: commands..........: enabledMJPG Streamer Version: svn rev: 3:172i: Using V4L2 device.: /dev/video3i: Desired Resolution: 640 x 480i: Frames Per Second.: 5i: Format............: MJPEGi: The format asked unavailable, so the width 320 height 240o: www-folder-path...: /usr/local/www/o: HTTP TCP port.....: 8081o: username:password.: disabledo: commands..........: enablednext step like hereQuote from: tomas123 on January 10, 2016, 04:44:17 pm

author: tomas123
author_rank: Frequent Contributor
timestamp: January 16, 2016, 01:31:39 am
content: Hi cynfab,the next version for v4l2:I extend the thermal image with 8 lines to 128x160 pixel.Now is the height divisible by 16 (avoid video error: "not multiples of 16") and we have place for an information line.With knowledge of the formulas in my excel sheet RAW2Temp.xls(attachment ofhttps://www.eevblog.com/forum/thermal-imaging/flir-e4-thermal-imaging-camera-teardown/msg342072/#msg342072)I calculated the min/max temperature from the image and wrote some nice hot spot markers on the edges.( thanks to tmbinc for the font.h the the code snippet, seehttps://www.eevblog.com/forum/thermal-imaging/flir-ex-realtime-raw-radiometric-data-streaming-via-uvc/msg736344/#msg736344)For calculating the correct temperature you need the calibration values from your Flir One.You can extract it from your CameraFiles.zip at EP 0x83, but more simply is to use an jpg image from the FlirOne.app and feed exiftool:Code:$ exiftool -plan* FLIROne-2015-11-30-17-26-48+0100.jpgPlanck R1 : 16438.1Planck B : 1416.5Planck F : 1Planck O : -1315Planck R2 : 0.0123569and write it to the c source codeCode:// -- define Flir calibration values ---------------// exiftool -plan* FLIROne-2015-11-30-17-26-48+0100.jpg#define PlanckR1 16438.1#define PlanckB 1416.5#define PlanckF 1.0#define PlanckO -1315.0#define PlanckR2 0.0123569please note that I wrote always a decimal point, to avoid some unwanted integer castings in cI wrote here dozens of post about the flir formulas, therefore only the code without comments:Code:double raw2temperature(unsigned short RAW){// mystery correction factorRAW *=4;// calc amount of radiance of reflected objects ( Emissivity < 1 )double RAWrefl=PlanckR1/(PlanckR2*(exp(PlanckB/(TempReflected+273.15))-PlanckF))-PlanckO;// get displayed object temp max/mindouble RAWobj=(RAW-(1-Emissivity)*RAWrefl)/Emissivity;// calc object temperaturereturn PlanckB/log(PlanckR1/(PlanckR2*(RAWobj+PlanckO))+PlanckF)-273.15;}There is a uncleared issue. With the FlirOne.App we get the correct Flir RAW values for the Excel Sheet above.But over USB the RAW values seems divided by factor 4.I'm unsure and will further check it with some temperature measurements.Currently the string with min/max temperature is only for temperature below 100°C because I forgot to truncate the strings to 20 chars

author: cynfab
author_rank: Regular Contributor
timestamp: January 16, 2016, 05:18:10 am
content: Hi tomas123,NiceI moved the plank constants to a header file so that the flir8xx.c code can be clean of individual F1 G2 characteristics.Have you been able to view the video stream with guvcview, or mplayer? .. see attached.mplayer looks similar....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: January 16, 2016, 11:46:54 am
content: this is only a side effect of the mjpeg streamer workaroundQuote from: tomas123 on January 11, 2016, 11:55:35 pmthe solution for guvcview or mplayer:unload and reload the v4l2loopback kernel driverCode:// unload$ sudo modprobe -r v4l2loopback// load$ sudo modprobe v4l2loopback devices=5change code to the exact image sizeCode:#define VIDEO_DEVICE2 "/dev/video3" // colorized thermal image#define FRAME_WIDTH2 160 //320#define FRAME_HEIGHT2 128 //240compile and guvcview / mplayer works finein all your screenshots I see, that your frame rate is around 8.2 fpsI have a later FlirOne hardware version. My frame rate ist mostly around 7.9fpsCode:#00007305 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508916.42668,"usbEnqueuedTimestamp":1177508916.4285,"ffcState":"FFC_VALID_RAD"}#00007306 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508916.5428,"usbEnqueuedTimestamp":1177508916.54466,"ffcState":"FFC_VALID_RAD"}#00007307 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508916.65624,"usbEnqueuedTimestamp":1177508916.65782,"ffcState":"FFC_VALID_RAD"}#00007308 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508916.76904,"usbEnqueuedTimestamp":1177508916.77088,"ffcState":"FFC_VALID_RAD"}#00007309 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508916.88276,"usbEnqueuedTimestamp":1177508916.88477,"ffcState":"FFC_VALID_RAD"}#00007310 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508916.99627,"usbEnqueuedTimestamp":1177508916.99783,"ffcState":"FFC_VALID_RAD"}#00007311 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508917.11095,"usbEnqueuedTimestamp":1177508917.11306,"ffcState":"FFC_VALID_RAD"}#00007312 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508917.22461,"usbEnqueuedTimestamp":1177508917.22623,"ffcState":"FFC_VALID_RAD"}#00007313 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508917.34107,"usbEnqueuedTimestamp":1177508917.3429,"ffcState":"FFC_VALID_RAD"}#00007314 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508917.4537,"usbEnqueuedTimestamp":1177508917.45972,"ffcState":"FFC_VALID_RAD"}#00007315 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508917.56661,"usbEnqueuedTimestamp":1177508917.56837,"ffcState":"FFC_VALID_RAD"}#00007316 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508917.68063,"usbEnqueuedTimestamp":1177508917.6869,"ffcState":"FFC_VALID_RAD"}#00007317 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508917.79463,"usbEnqueuedTimestamp":1177508917.79671,"ffcState":"FFC_VALID_RAD"}#00007318 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508917.91498,"usbEnqueuedTimestamp":1177508917.91678,"ffcState":"FFC_VALID_RAD"}#00007319 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508918.0219,"usbEnqueuedTimestamp":1177508918.02369,"ffcState":"FFC_VALID_RAD"}#00007320 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508918.13852,"usbEnqueuedTimestamp":1177508918.14039,"ffcState":"FFC_VALID_RAD"}#00007321 81/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508918.25196,"usbEnqueuedTimestamp":1177508918.25356,"ffcState":"FFC_VALID_RAD"}#00007322 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508918.36496,"usbEnqueuedTimestamp":1177508918.3667,"ffcState":"FFC_VALID_RAD"}#00007323 81/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508918.4781,"usbEnqueuedTimestamp":1177508918.48,"ffcState":"FFC_VALID_RAD"}#00007324 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508918.59206,"usbEnqueuedTimestamp":1177508918.59365,"ffcState":"FFC_VALID_RAD"}#00007325 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508918.70655,"usbEnqueuedTimestamp":1177508918.70863,"ffcState":"FFC_VALID_RAD"}#00007326 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508918.82,"usbEnqueuedTimestamp":1177508918.82159,"ffcState":"FFC_VALID_RAD"}#00007327 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508918.93411,"usbEnqueuedTimestamp":1177508918.93615,"ffcState":"FFC_VALID_RAD"}#00007328 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508919.04937,"usbEnqueuedTimestamp":1177508919.05093,"ffcState":"FFC_VALID_RAD"}#00007329 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508919.16221,"usbEnqueuedTimestamp":1177508919.16431,"ffcState":"FFC_VALID_RAD"}#00007330 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508919.27651,"usbEnqueuedTimestamp":1177508919.28135,"ffcState":"FFC_VALID_RAD"}#00007331 81/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508919.38965,"usbEnqueuedTimestamp":1177508919.39117,"ffcState":"FFC_VALID_RAD"}#00007332 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508919.50482,"usbEnqueuedTimestamp":1177508919.50864,"ffcState":"FFC_VALID_RAD"}#00007333 81/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508919.61759,"usbEnqueuedTimestamp":1177508919.61911,"ffcState":"FFC_VALID_RAD"}#00007334 81/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508919.73212,"usbEnqueuedTimestamp":1177508919.73392,"ffcState":"FFC_VALID_RAD"}#00007335 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508919.8459,"usbEnqueuedTimestamp":1177508919.84773,"ffcState":"FFC_VALID_RAD"}#00007336 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508919.96018,"usbEnqueuedTimestamp":1177508919.96197,"ffcState":"FFC_VALID_RAD"}#00007337 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508920.07373,"usbEnqueuedTimestamp":1177508920.07574,"ffcState":"FFC_VALID_RAD"}#00007338 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508920.18741,"usbEnqueuedTimestamp":1177508920.18898,"ffcState":"FFC_VALID_RAD"}#00007339 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508920.30213,"usbEnqueuedTimestamp":1177508920.30423,"ffcState":"FFC_VALID_RAD"}#00007340 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508920.41558,"usbEnqueuedTimestamp":1177508920.41705,"ffcState":"FFC_VALID_RAD"}#00007341 80/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508920.52954,"usbEnqueuedTimestamp":1177508920.53154,"ffcState":"FFC_VALID_RAD"}#00007342 79/10 fps:{"shutterState":"ON","shutterTemperature":310.799987792969,"usbNotifiedTimestamp":1177508920.64426,"usbEnqueuedTimestamp":1177508920.6458,"ffcState":"FFC_VALID_RAD"}

author: cynfab
author_rank: Regular Contributor
timestamp: January 17, 2016, 04:01:13 am
content: Hi tomas123,Your latest code is now cross compiled and running with mjpg-streamer on my pcduino3 nano lite. kernel 4.3.3Wow, there are a lot of forks of mpg-streamer... close to 150!!https://github.com/jacksonliam/mjpg-streamer146 forkshttps://github.com/oliv3r/mjpg-streamer2 forksand maybe more...I'm getting 7.9-8.1 fps on the pcduino3.And the occasional reset buffer because of bad Magic Byte.The original 160 x 120 for video3 works with guvcview and mplayer....ken...

author: tomas123
author_rank: Frequent Contributor
timestamp: January 18, 2016, 08:05:37 am
content: if we debug the 160x120 resolution bug, than we can fork #151Code:// mystery correction factorRAW *=4;I checked it in my kitchen from -20°C to +100°C (boiling water). Tricky is to compare the temperature from our display (hottest point) with Flir crosshair (Flir One App) as medium of 4x4 pixel.But it seems, that the correction factor works fine.Please make own tests with your calibration values.Maybe this is a effect of the conversion factor from 14 Bit (Sensor) to 16 Bit (2 Byte RAW)

author: tomas123
author_rank: Frequent Contributor
timestamp: January 18, 2016, 10:16:23 am
content: I found a simple solution to check thefactor 4 between "Lepton RAW" and "Flir radiometric jpg RAW":The tea bag simulator of Flir SDK use real Lepton sensor values. You found it in the SDK file sampleframes.zip (6MB).I made with the SDK App a shot from the (random) tea bag frame 00051.Thereby we got a Flir radiometric jpg with an embedded calibrated RawThermalImage with a good temperature range from min/max=34°C/65°C(the unrealistic min temperature is a result of bad calibration values for the simulator)first some image magick steps with the lepton sensor values of frame 00051(file 00051-lep) from SDK sampleframes.zip("-chop 2x0+0+0 -chop 2x0+80+0" removes the 4 additional vertical lines with extra unknown informations)Code:// convert sample frame 00051 from SDK> convert -depth 16 -size 164x120 gray:00051-lep gray:- | convert -depth 16 -endian lsb -size 164x120 gray:- -chop 2x0+0+0 -chop 2x0+80+0 -rotate 90 00051-lep.png// multiply with factor 4> convert 00051-lep.png -fx "4*u" 00051-lep4x.png// get channel statistics> identify -verbose 00051-lep4x.pngChannel statistics:Pixels: 19200Gray:min: 14220 (0.216983)max: 20840 (0.317998)mean: 15014.9 (0.229113)standard deviation: 1218.95 (0.0186)kurtosis: 5.54453skewness: 2.30479and now compare the statistics with the "real"Flir radiometric image from the SDK appCode:// extract RawThermalImage from a Flir radiometric image> exiftool -b -RawThermalImage FLIROne-2016-01-18-10-33-07+0100.jpg > 00051exif.png// image is postprocessed and resized to 320x240> convert 00051exif.png -resize 160x FlirAppRAW120x160.png// get channel statistics>identify -verbose FlirAppRAW120x160.png...Channel statistics:Pixels: 19200Gray:min: 14266 (0.217685)max: 20831 (0.317861)mean: 15021.4 (0.229212)standard deviation: 1221.27 (0.0186354)kurtosis: 5.44004skewness: 2.28451By deducting theFlir post processing stepsto the original RAW values (seepatternsbelow) we got a great result!A sample:max-min=65-34=31°Cmax-min=20831-14266=6565 digits-> 1 digit = 31/6565=0.0047 KelvinThe difference between meanin this images is:(15021.4-15014.9)*0.0047 Kelvin=0.031 KelvinYou also see, that the last digit ADC "resolution" of Lepton in this range is > 0.0047*4 = 19mK (useless because of strong noise, see second image below with 4 Kelvin scale)Quote from: tomas123 on November 16, 2015, 11:58:16 am

author: tomas123
author_rank: Frequent Contributor
timestamp: January 19, 2016, 11:26:11 pm
content: minor update:- a smaller font 5x7 for more chars in information line- better filtering FFC frames- crosshair for medium temperature of 2x2 "center" pixels- info line with temperature min/crosshair/max

author: cynfab
author_rank: Regular Contributor
timestamp: January 20, 2016, 12:10:48 am
content: tomas123,Very nice

author: Fraser
author_rank: Super Contributor
timestamp: January 20, 2016, 03:19:27 am
content: Looking very good. Excellent work. 👍

author: tomas123
author_rank: Frequent Contributor
timestamp: January 20, 2016, 08:53:05 am
content: Thank You!Unfortunately we are only two F1G2 hackersThe internet is full with crazy projects using a Lepton 60x80.https://store.groupgets.com/#!/p/52239877-$210FLIR Lepton Dev Kit- with Raspberry Pi 2 Model B and a Raspberry Pi 5 MP Camera Board- Requires FLIR Lepton (sold separately)And don't forget, the Flir One is the only Lepton module with (calibrated) temperature measurementhttp://www.flir.com/cvs/cores/knowledgebase/index.cfm?CFTREEITEMKEY=914&view=67485

author: Fraser
author_rank: Super Contributor
timestamp: January 20, 2016, 05:59:38 pm
content: Yes it is a pity that there are not more people working on F1G2 development. Sadly my skill set does not include coding and the LEPTON 3 hardware is pretty well formed for many tasks. When I find time I will make a close up lens holder for the unit that will utilise a 12mm ZnSe lens. Sadly the MSX tends to be detrimental to close up performance even if the visible light camera is blinded.I appreciate your work and efforts though. I thought the other day that the F1G2 has not made the splash that I had expected. When compared to the SEEK camera release, the FLIR F1G2 has received a very muted response for no reason that I can identify. It is certainly selling well as FLIR continue to have trouble meeting demand. Maybe the Budget thermal camera is old news now and of less interest to the forum membership ?Fraser

author: tomas123
author_rank: Frequent Contributor
timestamp: January 20, 2016, 09:12:38 pm
content: Quote from: Fraser on January 20, 2016, 05:59:38 pmtry the SDK apk, there you can disable MSXQuote from: tomas123 on November 10, 2015, 08:45:22 amQuote from: Fraser on January 20, 2016, 05:59:38 pmI think also. Furthermore most retailer can't deliver Flir One G2 for Android.We have a delay of 6 weeks in Europe.

author: Trax
author_rank: Regular Contributor
timestamp: January 30, 2016, 06:52:47 pm
content: what hardware are you connecting the F2G2 to?Is it running some plain Linux or an android firmware?

author: cynfab
author_rank: Regular Contributor
timestamp: January 30, 2016, 07:17:11 pm
content: Both tomas123 and I have the F1G2 running under linux (various distros) on x86 and ARM hardware.RPi2, pcduino nano lite, Dell i7 desktop, hardkernel XU4, Amazon Fire 2015 tablet, Motorola Moto E, Google Nexus 7 2012We also have each built Android apps from the FlirOne SDK.

author: Trax
author_rank: Regular Contributor
timestamp: January 30, 2016, 07:26:59 pm
content: is the howto and source code organized in some place or do one need to scavenge the whole thread for bits and pieces?F1G2 on a x86 tablet would be awesome for me

author: cynfab
author_rank: Regular Contributor
timestamp: January 30, 2016, 08:32:53 pm
content: It's all in this thread.

author: tomas123
author_rank: Frequent Contributor
timestamp: January 30, 2016, 10:16:49 pm
content: A good entry point is:https://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg832208/#msg832208The last version you find yourself

author: Trax
author_rank: Regular Contributor
timestamp: February 03, 2016, 06:58:44 pm
content: I read in another thread that flir is deliberetly degrading the quality of teh f1g2 images, is that solved by the custom software or is it done in firmware ?

author: tomas123
author_rank: Frequent Contributor
timestamp: February 03, 2016, 10:10:19 pm
content: The camera sends over USB full resolution images."Downgrade" or MSX works in user software.With free SDK you also can process 160x120 images.

author: in.Vitro
author_rank: Regular Contributor
timestamp: February 10, 2016, 11:23:05 am
content: i have a dumb question... is there any way to get any data from the micro USB port or is just for charging? has anyone "backtraced" the USB port?

author: frenky
author_rank: Unknown
timestamp: February 10, 2016, 11:33:45 am
content: It looks like only the Vcc pin is connected to bottom layer... (and ground of course)http://hardtechlife.com/teardown-flir-one-for-android/

author: tomas123
author_rank: Frequent Contributor
timestamp: February 11, 2016, 06:59:00 am
content: I think also, but it's a multi layer circuit board. Therefore I can't see any details on this images.Sharper images from disassembly you find here:https://www.eevblog.com/forum/thermal-imaging/new-flir-products/msg750181/#msg750181

author: cynfab
author_rank: Regular Contributor
timestamp: February 12, 2016, 03:45:23 am
content: I'm pretty sure I rang out the D+ & D- lines on the charging connector and they don't go anywhere.But, you can charge the camera while operating. The charging messages tell you the state.I have had some wierd things happen if left on charge too long. The power button turns red and flashes. I haven't seen any description of what thatmeans but I can guess it is not good.I'd bet is one of the bad ones below, probably FAULT_HEAT.From the SDK docs:BADIndicates that a valid battery charging state was not available.CHARGING_SMART_PHONE_FAULT_HEATIndicates that a charging fault exists but the iPhone is being chargedCHARGING_SMART_PHONE_ONLYIndicates that the device is in phone-charging-only modeFAULTIndicates that an unexpected charging fault occurred (bad battery, etc.)FAULT_BAD_CHARGERIndicates that a charging fault occurred due to low current from the charging sourceFAULT_HEATIndicates that a charging heat fault occurredMANAGED_CHARGINGIndicates that the battery is charging from external power.MANAGED_CHARGING_ONLYIndicates that the device is in charge-only modeNO_CHARGINGIndicates that the battery is not charging because the device is not connected to an external power supply.

author: nitroxide
author_rank: Contributor
timestamp: March 12, 2016, 03:37:30 am
content: Tomas123, you rock! Great work.If you (or others) feel like customising the F1G2 software as well:As you may well know already there's a UART interface (3.3V level; 3 pads on the corner of SoC - GND RX TX) on the F1G2 PCB that allows serial console access to the Linux running on the SoC.However it's password protected and simple bootargs tricks from uboot would not work (bootargs env. variables are simply ignored).I've dumped the NAND from uboot and done some poking around with binwalk and recovered the root password.If anyone wants to check it out login with (root:indigo):Code:U-Boot> run boot_opboot operationalLoading from nand0, offset 0xe00000Image Name: Linux-2.6.39+Image Type: ARM Linux Kernel Image (uncompressed)Data Size: 3358884 Bytes = 3.2 MiBLoad Address: 20008000Entry Point: 20008000Automatic boot of image at addr 0x22000000 ...## Booting kernel from Legacy Image at 22000000 ...Image Name: Linux-2.6.39+Image Type: ARM Linux Kernel Image (uncompressed)Data Size: 3358884 Bytes = 3.2 MiBLoad Address: 20008000Entry Point: 20008000Verifying Checksum ... OKLoading Kernel Image ... OKOKStarting kernel ...Uncompressing Linux... done, booting the kernel.[ 0.025000] AT91: CM rev B and higher[ 0.037000] AT91: EK rev B and higher[ 0.401000] AT91SAM9 Watchdog: sorry, watchdog is disabledStarting watchdog...donemounting jffs2 READ-ONLY...donestart battery charge controlStarting battery_charge: OKdoneFormatting /tmp/versions: OK[ 1.677000] lepton_init[ 1.685000] lepton_probe: using 16-bit SPI widthWelcome to Rosebud (Operational)(none) login: rootPassword:login: root login on 'ttyS0'-sh: id: not foundsh: bad number-sh: id: not found-sh: /bin/hostname: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found$ cd /$ lsbin home linuxrc proc sys vardev init mnt root tmp version.txtetc lib opt sbin usr$ cd /$ uname -aLinux (none) 2.6.39+ #5 Fri Sep 4 16:01:23 PDT 2015 armv5tejl GNU/LinuxCheers!Nitro

author: Fraser
author_rank: Super Contributor
timestamp: March 12, 2016, 11:23:52 am
content: @Nitroxide,Nice work. The name 'Rosebud' has been seen before in FLIR cameras. The password on many FLIR cameras was a Swedish word but 'Indigo' is a nod to the company, Indigo Systems that FLIR bought in 2003.Indigo Systems were a specialist in compact thermal cameras and experts in microbolometers, image processing and novel camera design. FLIR wanted that specialist knowledge, so bought them.http://www.flir.com/corporate/display/?id=55679Fraser

author: nitroxide
author_rank: Contributor
timestamp: March 12, 2016, 11:36:39 am
content: @Fraser Yep, definitely not without reasonIn case anyone was curious, here's a dmesg output:Code:$ dmesg[ 0.000000] Linux version 2.6.39+ (nightly@rosebud-dev) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #5 Fri Sep 4 16:01:23 PDT 2015[ 0.000000] CPU: ARM926EJ-S  revision 5 (ARMv5TEJ), cr=00053177[ 0.000000] CPU: VIVT data cache, VIVT instruction cache[ 0.000000] Machine: Atmel AT91SAM9X5-EK[ 0.000000] Ignoring tag cmdline (using the default kernel command line)[ 0.000000] Memory policy: ECC disabled, Data cache writeback[ 0.000000] Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz[ 0.000000] On node 0 totalpages: 16384[ 0.000000] free_area_init_node: node 0, pgdat c071ada8, node_mem_map c0729000[ 0.000000] Normal zone: 128 pages used for memmap[ 0.000000] Normal zone: 0 pages reserved[ 0.000000] Normal zone: 16256 pages, LIFO batch:3[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768[ 0.000000] pcpu-alloc:  0[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256[ 0.000000] Kernel command line: mem=64M mtdparts=atmel_nand:50M(rosebud),14M(shared_files),12M(kernel),37M(rootfs),14M(shared_files2) rw atmel_nand.use_dma=0 quiet[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)[ 0.000000] Memory: 64MB = 64MB total[ 0.000000] Memory: 57600k/57600k available, 7936k reserved, 0K highmem[ 0.000000] Virtual kernel memory layout:[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)[ 0.000000] DMA : 0xff000000 - 0xffe00000 ( 14 MB)[ 0.000000] vmalloc : 0xc4800000 - 0xfee00000 ( 934 MB)[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)[ 0.000000] .init : 0xc0008000 - 0xc0482000 (4584 kB)[ 0.000000] .text : 0xc0482000 - 0xc06fe508 (2546 kB)[ 0.000000] .data : 0xc0700000 - 0xc071b4a0 ( 110 kB)[ 0.000000] NR_IRQS:192[ 0.000000] AT91: 128 gpio irqs in 4 banks[ 0.000000] AT91: Disabled rtc irq[ 0.000000] console  enabled[ 0.000000] Calibrating delay loop... 197.88 BogoMIPS (lpj=98944)[ 0.011000] pid_max: default: 32768 minimum: 301[ 0.011000] Mount-cache hash table entries: 512[ 0.012000] CPU: Testing write buffer coherency: ok[ 0.019000] NET: Registered protocol family 16[ 0.025000] AT91: CM rev B and higher[ 0.029000] AT91: Configured PCK0 clock output to 25000000 Hz[ 0.029000] BT: PCK0 on PB10 = 74[ 0.037000] BT: gpios initialized[ 0.037000] AT91: pin-mux CS0[ 0.037000] AT91: pin-mux CS2[ 0.037000] AT91: EK rev B and higher[ 0.044000] AT91: Power Management (with slow clock mode)[ 0.044000] AT91: Starting after general reset[ 0.045000] tcb_clksrc: tc0 at 16.166 MHz[ 0.068000] bio: create slab <bio-0> at 0[ 0.070000] usbcore: registered new interface driver usbfs[ 0.071000] usbcore: registered new interface driver hub[ 0.072000] usbcore: registered new device driver usb[ 0.075000] i2c-gpio i2c-gpio.0: using pins 62 (SDA) and 63 (SCL)[ 0.075000] at_hdmac at_hdmac.0: Atmel AHB DMA Controller ( cpy slave ), 8 channels[ 0.080000] at_hdmac at_hdmac.1: Atmel AHB DMA Controller ( cpy slave ), 8 channels[ 0.086000] Switching to clocksource tcb_clksrc[ 0.092000] NET: Registered protocol family 1[ 0.206000] JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.[ 0.206000] msgmni has been set to 112[ 0.207000] io scheduler noop registered (default)[ 0.217000] atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL[ 0.224000] brd: module loaded[ 0.236000] atmel_nand atmel_nand: No DMA support for NAND access.[ 0.236000] ONFI flash detected[ 0.237000] ONFI param page 0 valid[ 0.237000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xa1 (Micron MT29F1G08ABBEA3W)[ 0.237000] atmel_pmecc_init_params[ 0.237000] nand_chip->ecc.bytes 28[ 0.237000] nand_chip->ecc.steps 1[ 0.237000] nand_chip->ecc.layout = pmecc_oobinfo_2048[ 0.237000] host->mm 13[ 0.237000] host->nn 8191[ 0.237000] host->tt 4[ 0.237000] host->sector_size 512[ 0.237000] host->sector_number 4[ 0.237000] host->ecc_bytes_per_sector 7[ 0.237000] host->alpha_to -996098048[ 0.237000] host->index_of -996114432[ 0.237000] Scanning device for bad blocks[ 0.297000] 5 cmdlinepart partitions found on MTD device atmel_nand[ 0.297000] Creating 5 MTD partitions on "atmel_nand":[ 0.297000] 0x000000000000-0x000003200000 : "rosebud"[ 0.301000] 0x000003200000-0x000004000000 : "shared_files"[ 0.304000] 0x000004000000-0x000004c00000 : "kernel"[ 0.307000] 0x000004c00000-0x000007100000 : "rootfs"[ 0.311000] 0x000007100000-0x000007f00000 : "shared_files2"[ 0.316000] SPI MR: 0x33[ 0.317000] atmel_spi atmel_spi.0: Using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers[ 0.317000] atmel_spi atmel_spi.0: Atmel SPI Controller at 0xf0000000 (irq 13, SR 0x00010202)[ 0.317000] SPI turning on CSAAT[ 0.318000] setup: 22222222 Hz bpw 8 mode 0x3 -> csr0 00000609[ 0.319000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver[ 0.319000] ehci_hcd: block sizes: qh 60 qtd 96 itd 160 sitd 96[ 0.319000] Initializing Atmel-SoC USB Host Controller[ 0.319000] atmel-ehci atmel-ehci: start[ 0.320000] atmel-ehci atmel-ehci: Atmel EHCI UHP HS[ 0.320000] atmel-ehci atmel-ehci: new USB bus registered, assigned bus number 1[ 0.320000] atmel-ehci atmel-ehci: reset hcs_params 0x1303 dbg=0 cc=1 pcc=3 ordered !ppc ports=3[ 0.320000] atmel-ehci atmel-ehci: reset hcc_params 0026 thresh 2 uframes 256/512/1024 park[ 0.320000] atmel-ehci atmel-ehci: park 0[ 0.320000] atmel-ehci atmel-ehci: reset command 0080b02 park=3 ithresh=8 period=1024 Reset HALT[ 0.320000] atmel-ehci atmel-ehci: irq 22, io mem 0x00700000[ 0.320000] atmel-ehci atmel-ehci: reset command 0080b02 park=3 ithresh=8 period=1024 Reset HALT[ 0.321000] atmel-ehci atmel-ehci: init command 0010005 (park)=0 ithresh=1 period=512 RUN[ 0.327000] atmel-ehci atmel-ehci: USB 2.0 started, EHCI 1.00[ 0.327000] usb usb1: default language 0x0409[ 0.327000] usb usb1: udev 1, busnum 1, minor = 0[ 0.327000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002[ 0.327000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1[ 0.327000] usb usb1: Product: Atmel EHCI UHP HS[ 0.327000] usb usb1: Manufacturer: Linux 2.6.39+ ehci_hcd[ 0.327000] usb usb1: SerialNumber: atmel-ehci[ 0.328000] usb usb1: usb_probe_device[ 0.328000] usb usb1: configuration #1 chosen from 1 choice[ 0.328000] usb usb1: adding 1-0:1.0 (config #1, interface 0)[ 0.329000] hub 1-0:1.0: usb_probe_interface[ 0.329000] hub 1-0:1.0: usb_probe_interface - got id[ 0.329000] hub 1-0:1.0: USB hub found[ 0.329000] hub 1-0:1.0: 3 ports detected[ 0.329000] hub 1-0:1.0: standalone hub[ 0.329000] hub 1-0:1.0: no power switching (usb 1.0)[ 0.329000] hub 1-0:1.0: individual port over-current protection[ 0.329000] hub 1-0:1.0: power on to power good time: 20ms[ 0.329000] hub 1-0:1.0: local power source is good[ 0.330000] hub 1-0:1.0: trying to enable port power on non-switchable hub[ 0.331000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver[ 0.331000] ohci_hcd: block sizes: ed 64 td 64[ 0.332000] at91_ohci at91_ohci: start[ 0.332000] at91_ohci at91_ohci: AT91 OHCI[ 0.332000] at91_ohci at91_ohci: new USB bus registered, assigned bus number 2[ 0.332000] at91_ohci at91_ohci: supports USB remote wakeup[ 0.332000] at91_ohci at91_ohci: irq 22, io mem 0x00600000[ 0.332000] at91_ohci at91_ohci: created debug files[ 0.387000] at91_ohci at91_ohci: OHCI controller state[ 0.387000] at91_ohci at91_ohci: OHCI 1.0, NO legacy support registers[ 0.387000] at91_ohci at91_ohci: control 0x083 HCFS=operational CBSR=3[ 0.387000] at91_ohci at91_ohci: cmdstatus 0x00000 SOC=0[ 0.387000] at91_ohci at91_ohci: intrstatus 0x00000004 SF[ 0.387000] at91_ohci at91_ohci: intrenable 0x8000005a MIE RHSC UE RD WDH[ 0.387000] at91_ohci at91_ohci: hcca frame #0005[ 0.387000] at91_ohci at91_ohci: roothub.a 02000203 POTPGT=2 NPS NDP=3(3)[ 0.387000] at91_ohci at91_ohci: roothub.b 00000000 PPCM=0000 DR=0000[ 0.387000] at91_ohci at91_ohci: roothub.status 00008000 DRWE[ 0.387000] at91_ohci at91_ohci: roothub.portstatus  0x00000100 PPS[ 0.387000] at91_ohci at91_ohci: roothub.portstatus  0x00000100 PPS[ 0.387000] at91_ohci at91_ohci: roothub.portstatus  0x00000100 PPS[ 0.387000] usb usb2: default language 0x0409[ 0.387000] usb usb2: udev 1, busnum 2, minor = 128[ 0.387000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001[ 0.387000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1[ 0.387000] usb usb2: Product: AT91 OHCI[ 0.387000] usb usb2: Manufacturer: Linux 2.6.39+ ohci_hcd[ 0.387000] usb usb2: SerialNumber: at91[ 0.389000] usb usb2: usb_probe_device[ 0.389000] usb usb2: configuration #1 chosen from 1 choice[ 0.389000] usb usb2: adding 2-0:1.0 (config #1, interface 0)[ 0.390000] hub 2-0:1.0: usb_probe_interface[ 0.390000] hub 2-0:1.0: usb_probe_interface - got id[ 0.390000] hub 2-0:1.0: USB hub found[ 0.390000] hub 2-0:1.0: 3 ports detected[ 0.390000] hub 2-0:1.0: standalone hub[ 0.390000] hub 2-0:1.0: no power switching (usb 1.0)[ 0.390000] hub 2-0:1.0: global over-current protection[ 0.390000] hub 2-0:1.0: power on to power good time: 4ms[ 0.390000] hub 2-0:1.0: local power source is good[ 0.390000] hub 2-0:1.0: no over-current condition exists[ 0.390000] hub 2-0:1.0: trying to enable port power on non-switchable hub[ 0.392000] atmel_usba_udc atmel_usba_udc: MMIO registers at 0xf803c000 mapped at c4876000[ 0.392000] atmel_usba_udc atmel_usba_udc: FIFO at 0x00500000 mapped at c4900000[ 0.393000] gadgetfs: USB Gadget filesystem, version 24 Aug 2004[ 0.394000] at91_rtc at91_rtc: rtc core: registered at91_rtc as rtc0[ 0.394000] AT91 Real Time Clock driver.[ 0.394000] i2c /dev entries driver[ 0.395000] Linux media interface: v0.10[ 0.396000] Linux video capture interface: v2.00[ 0.401000] usbcore: registered new interface driver uvcvideo[ 0.402000] USB Video Class driver (v1.0.0)[ 0.402000] AT91SAM9 Watchdog: sorry, watchdog is disabled[ 0.407000] at91_wdt: probe of at91_wdt failed with error -5[ 0.410000] at91_rtc at91_rtc: setting system clock to 2007-01-01 00:00:17 UTC (1167609617)[ 0.413000] Freeing init memory: 4584K[ 0.430000] atmel-ehci atmel-ehci: GetStatus port:2 status 001803 0 ACK POWER sig=j CSC CONNECT[ 0.430000] hub 1-0:1.0: port 2: status 0501 change 0001[ 0.490000] hub 2-0:1.0: state 7 ports 3 chg 0000 evt 0000[ 0.530000] hub 1-0:1.0: state 7 ports 3 chg 0004 evt 0000[ 0.530000] hub 1-0:1.0: port 2, status 0501, change 0000, 480 Mb/s[ 0.555000] Empty flash at 0x000001b0 ends at 0x00000800[ 0.581000] atmel-ehci atmel-ehci: port 2 high speed[ 0.581000] atmel-ehci atmel-ehci: GetStatus port:2 status 001005 0 ACK POWER sig=se0 PE CONNECT[ 0.632000] usb 1-2: new high speed USB device number 2 using atmel-ehci[ 0.680000] Major: 252; minor: 0[ 0.680000] Registered device at91_adc.[ 0.684000] atmel-ehci atmel-ehci: port 2 high speed[ 0.684000] atmel-ehci atmel-ehci: GetStatus port:2 status 001005 0 ACK POWER sig=se0 PE CONNECT[ 0.788000] usb 1-2: skipped 1 descriptor after configuration[ 0.788000] usb 1-2: skipped 6 descriptors after interface[ 0.788000] usb 1-2: skipped 1 descriptor after endpoint[ 0.788000] usb 1-2: skipped 9 descriptors after interface[ 0.789000] usb 1-2: default language 0x0409[ 0.795000] usb 1-2: udev 2, busnum 1, minor = 1[ 0.795000] usb 1-2: New USB device found, idVendor=0c45, idProduct=6369[ 0.795000] usb 1-2: New USB device strings: Mfr=2, Product=1, SerialNumber=0[ 0.795000] usb 1-2: Product: USB 2.0 Camera[ 0.795000] usb 1-2: Manufacturer: Sonix Technology Co., Ltd.[ 0.802000] usb 1-2: usb_probe_device[ 0.802000] usb 1-2: configuration #1 chosen from 1 choice[ 0.802000] usb 1-2: adding 1-2:1.0 (config #1, interface 0)[ 0.807000] uvcvideo 1-2:1.0: usb_probe_interface[ 0.807000] uvcvideo 1-2:1.0: usb_probe_interface - got id[ 0.807000] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:6369)[ 0.842000] usb 1-2: adding 1-2:1.1 (config #1, interface 1)[ 1.454000] at91_ohci at91_ohci: auto-stop root hub[ 1.594000] usb 1-2: link qh4-0001/c32407a0 start 1 [1/0 us][ 1.695000] lepton_init[ 1.698000] tx_buf = c3328000 rx_buf = c3330000, frames = bf006f74[ 1.703000] lepton_probe: using 16-bit SPI width[ 1.708000] SPI turning on CSAAT[ 1.708000] setup: 22222222 Hz bpw 16 mode 0x3 -> csr0 00000689[ 1.714000] VSYNC [ 1.718000] lepton: bad line index, last line index 255 != expected index 60[ 1.718000] lepton status = 3 xfer 4 [ 8.156000] usb 1-2: unlink qh4-0001/c32407a0 start 1 [1/0 us][ 8.156000] atmel-ehci atmel-ehci: shutdown urb c320cac0 ep3in-intr$

author: Bill W
author_rank: Super Contributor
timestamp: March 12, 2016, 05:44:43 pm
content: I wonder how many folks from Indigo are now with SEEK ? Far too much of a coincidence I reckon.Fired up an old Indigo Alpha core the other day, surprisingly poor for a VOx with a lot of column structure, how far they have come. Even then it was very compact though. The oddest feature of that was the external shutter.A 2005 paper about early VOX bolometers :http://www.flir.com/uploadedFiles/CBI/Documents/Technical_Publications/2005SPIE/techpub_2_Photon_SPIE_2005.pdfIt must be early, they were still being honest about NETD'sBillwww.fire-tics.co.uk

author: Fraser
author_rank: Super Contributor
timestamp: March 12, 2016, 08:10:23 pm
content: FLIR were certainly annoyed when the two ex Indigo staff started SEEK Thermal. A complex situation that ended in court.I was always interested that FLIR enforced disablement of every 15th pixel on the SEEK 12um microbolometer. At the time I suspected the FLIR & SEEK 12um microbolometers were likely the product of a single research work stream within FLIR.Fraser

author: tomas123
author_rank: Frequent Contributor
timestamp: March 13, 2016, 01:13:56 pm
content: Quote from: nitroxide on March 12, 2016, 03:37:30 aminterestingIn the Flir One SDK library I can't find the strings root:indigo.There is only the well known Flir login root:3vligCode:$ strings FLIRONEExampleApplication/app/src/main/libs/armeabi-v7a/libjnidevicewrapper.so | grep -Fx -A1 rootroot3vligIn the FlirOneApp the functions of the "SDK library libjnidevicewrapper.so" is splittet in a libjnidevicewrapper.so and a libsystemimage.so.The FlirOneApp handles also the firmware updates of the Flir One.Code:$ strings FlirOne/apk/FlirOne/lib/armeabi-v7a/libsystemimage.so | grep -Fx -A1 rootroot3vlig

author: nitroxide
author_rank: Contributor
timestamp: March 13, 2016, 06:50:07 pm
content: @tomas123 Could be something left out in their SDK? I don't think the smartphones handling the updates do any logging in on the F1G2..There's a separate kernel image for the updater but I've checked now with 3vlig and the password for that one is indigo as well.Fun fact: the indigo password was hashed but unsalted so it only took John the Ripper a few seconds to crackI may do a dump of all folders from both images if I get some time next week but that'll need some fiddling around with serial file transfer.Nitro

author: eren
author_rank: Newbie
timestamp: March 15, 2016, 05:41:49 pm
content: Hi all,amazing work on this thread! I am continually blown away by the casually colossal magnitude of work done hereI'm just catching up with the capabilities, and running the F1 on Raspbian. Every once in a while I'm getting these stretches of rainbow frames where the FFC apparently gets in a bad state, and I have to wait until the next automatic FFC to clear it up. There is nothing coming from the 0x81, 0x83 or 0x85 endpoints to indicate we're entering a bad state. I'd like to try inducing an FFC state, at first periodically, any maybe later when I detect this state by pixel standard deviation etc. I can see manual FFC commands in the SDK, but no way to do that manually using libusb. Anybody have any ideas on how to manually trigger FFC by writing to USB endpoints?Cheers

author: tomas123
author_rank: Frequent Contributor
timestamp: March 16, 2016, 09:48:53 pm
content: Quote from: eren on March 15, 2016, 05:41:49 pmThe stretches of of rainbow frames are reflections of the temperature of warm lepton on the shutterI wrote here something about trigger the FFC:Quote from: tomas123 on January 23, 2016, 03:25:43 pmwatch for combination of "shutterState"AND"ffcState" on EP 0x85Code:#000373 77/10 fps:{"shutterState":"ON","shutterTemperature":310.040008544922,"usbNotifiedTimestamp":1176999451.09764,"usbEnqueuedTimestamp":1176999451.09942,"ffcState":"FFC_VALID_RAD"}#000374 77/10 fps:{"shutterState":"ON","shutterTemperature":310.040008544922,"usbNotifiedTimestamp":1176999451.2123,"usbEnqueuedTimestamp":1176999451.21411,"ffcState":"FFC_VALID_RAD"}#000375 78/10 fps:{"shutterState":"ON","shutterTemperature":310.040008544922,"usbNotifiedTimestamp":1176999451.32683,"usbEnqueuedTimestamp":1176999451.32872,"ffcState":"FFC_VALID_RAD"}#000376 78/10 fps:{"shutterState":"ON","shutterTemperature":310.040008544922,"usbNotifiedTimestamp":1176999451.43988,"usbEnqueuedTimestamp":1176999451.44173,"ffcState":"FFC_VALID_RAD"}#000377 78/10 fps:{"shutterState":"ON","shutterTemperature":310.040008544922,"usbNotifiedTimestamp":1176999451.55378,"usbEnqueuedTimestamp":1176999451.55576,"ffcState":"FFC_VALID_IMG"}#000378 78/10 fps:{"shutterState":"ON","shutterTemperature":310.040008544922,"usbNotifiedTimestamp":1176999451.66878,"usbEnqueuedTimestamp":1176999451.67105,"ffcState":"FFC_VALID_IMG"}#000379 78/10 fps:{"shutterState":"ON","shutterTemperature":310.040008544922,"usbNotifiedTimestamp":1176999451.7818,"usbEnqueuedTimestamp":1176999451.78388,"ffcState":"FFC_DESIRED"}#000380 79/10 fps:{"shutterState":"ON","shutterTemperature":310.040008544922,"usbNotifiedTimestamp":1176999451.8954,"usbEnqueuedTimestamp":1176999451.89716,"ffcState":"FFC_DESIRED"}#000381 78/10 fps:{"shutterState":"ON","shutterTemperature":309.940002441406,"usbNotifiedTimestamp":1176999452.01968,"usbEnqueuedTimestamp":1176999452.0214,"ffcState":"FFC_PROGRESS"}#000382 75/10 fps:{"shutterState":"FFC","shutterTemperature":309.940002441406,"usbNotifiedTimestamp":1176999452.35303,"usbEnqueuedTimestamp":1176999452.35494,"ffcState":"FFC_VALID_RAD"}#000383 75/10 fps:{"shutterState":"FFC","shutterTemperature":309.940002441406,"usbNotifiedTimestamp":1176999452.46615,"usbEnqueuedTimestamp":1176999452.46842,"ffcState":"FFC_VALID_RAD"}#000384 75/10 fps:{"shutterState":"FFC","shutterTemperature":309.940002441406,"usbNotifiedTimestamp":1176999452.57972,"usbEnqueuedTimestamp":1176999452.58159,"ffcState":"FFC_VALID_RAD"}#000385 75/10 fps:{"shutterState":"FFC","shutterTemperature":309.950012207031,"usbNotifiedTimestamp":1176999452.69317,"usbEnqueuedTimestamp":1176999452.6951,"ffcState":"FFC_VALID_RAD"}#000386 72/10 fps:{"shutterState":"FFC","shutterTemperature":309.950012207031,"usbNotifiedTimestamp":1176999453.16082,"usbEnqueuedTimestamp":1176999453.16271,"ffcState":"FFC_VALID_RAD"}#000387 70/10 fps:{"shutterState":"FFC","shutterTemperature":309.950012207031,"usbNotifiedTimestamp":1176999453.37775,"usbEnqueuedTimestamp":1176999453.38077,"ffcState":"FFC_VALID_RAD"}#000388 71/10 fps:{"shutterState":"ON","shutterTemperature":309.950012207031,"usbNotifiedTimestamp":1176999453.49103,"usbEnqueuedTimestamp":1176999453.4927,"ffcState":"FFC_VALID_RAD"}#000389 71/10 fps:{"shutterState":"ON","shutterTemperature":309.950012207031,"usbNotifiedTimestamp":1176999453.60539,"usbEnqueuedTimestamp":1176999453.60742,"ffcState":"FFC_VALID_RAD"}#000390 71/10 fps:{"shutterState":"ON","shutterTemperature":309.950012207031,"usbNotifiedTimestamp":1176999453.71995,"usbEnqueuedTimestamp":1176999453.72604,"ffcState":"FFC_VALID_RAD"}Quote from: eren on March 15, 2016, 05:41:49 pmYou can simple debug all USB commands with the Flir SDK by using the extracted flir java.class.Set a breakpoint in FLIROneSDKBundle/FLIRONEExampleApplication/app/src/main/java/com/flir/flironesdk/usb/UsbCommunicator.javain function public void sendDataToDevice(byte[] data, ProtocolType protocolType)on sendData(destinationEndpoint, data, data.length);and watch for array "data"Quote from: tomas123 on November 13, 2015, 01:21:25 pmas sample the tune command{"type":"setOption","data":{"option":"doFFC","value":true}}Code:data = {byte@21045}0 = 123 (0x7B)1 = 34 (0x22)2 = 116 (0x74)3 = 121 (0x79)4 = 112 (0x70)5 = 101 (0x65)6 = 34 (0x22)7 = 58 (0x3A)8 = 34 (0x22)9 = 115 (0x73)10 = 101 (0x65)11 = 116 (0x74)12 = 79 (0x4F)13 = 112 (0x70)14 = 116 (0x74)15 = 105 (0x69)16 = 111 (0x6F)17 = 110 (0x6E)18 = 34 (0x22)19 = 44 (0x2C)20 = 34 (0x22)21 = 100 (0x64)22 = 97 (0x61)23 = 116 (0x74)24 = 97 (0x61)25 = 34 (0x22)26 = 58 (0x3A)27 = 123 (0x7B)28 = 34 (0x22)29 = 111 (0x6F)30 = 112 (0x70)31 = 116 (0x74)32 = 105 (0x69)33 = 111 (0x6F)34 = 110 (0x6E)35 = 34 (0x22)36 = 58 (0x3A)37 = 34 (0x22)38 = 100 (0x64)39 = 111 (0x6F)40 = 70 (0x46)41 = 70 (0x46)42 = 67 (0x43)43 = 34 (0x22)44 = 44 (0x2C)45 = 34 (0x22)46 = 118 (0x76)47 = 97 (0x61)48 = 108 (0x6C)49 = 117 (0x75)50 = 101 (0x65)51 = 34 (0x22)52 = 58 (0x3A)53 = 116 (0x74)54 = 114 (0x72)55 = 117 (0x75)56 = 101 (0x65)57 = 125 (0x7D)58 = 125 (0x7D)59 = 0 (0x0)protocolType = {UsbCommunicator$ProtocolType@20949} "CONFIGURATION"PS: Please don't forget to post your knowledge here!

author: eren
author_rank: Newbie
timestamp: March 18, 2016, 05:31:24 pm
content: Hi Tomas,thanks a bunch for your suggestion -- it worked!after dumping the data argument of sendDataToDevice and tinkering with the app, I got the following code to trigger FFC frames:Code:unsigned char my_string2={0xcc,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0xb9,0xcb,0xa2,0x99};r = libusb_bulk_transfer(devh, 2, my_string2, length, &transferred, 0);if(r == 0 && transferred == length)printf("\nWrite successful!");elseprintf("\nError in write! res = %d and transferred = %d\n", r, transferred);char my_string;transferred = 0;strcpy(my_string, "{\"type\":\"setOption\",\"data\":{\"option\":\"doFFC\",\"value\":true}}");length = strlen(my_string)+1;unsigned char *my_string1 = (unsigned char*)my_string;transferred = 0;r = libusb_bulk_transfer(devh, 2, my_string1, length, &transferred, 0);if(r == 0 && transferred == length){printf("\nWrite successful!");printf("\nSent %d bytes with string: %s\n", transferred, my_string);}elseprintf("\nError in write! res = %d and transferred = %d\n", r, transferred);* note that I'm sendingtwomessages -- the clear string doesn't work without the binary "pre-message"unfortunately, this didn't clear up the "rainbow frames", which sort of look like the attached image.Even after I remove FFC frames, I also see the "wavy" pixel intensity behavior you see (also attached graph). You can also see the "rainbow frames" where the frame max/mean go up by a few hundred intensity values and stay up for a few hundred frames.This behavior persists even if I uplug and restart the camera. I'm guessing it has to do with overheating -- I'm using the camera on continual charge, and while I don't always get the flashing red light I do sooner or later always end up with rainbow frames. Seeing as how reboots don't help I'm guessing it might be a hardware issue, so it'll probably be with us until FLIR find a firmware workaround.Thanks a bunch! Didn't solve the immediate issue, but learned a lotEren

author: Clay
author_rank: Newbie
timestamp: March 18, 2016, 07:15:20 pm
content: Quote from: eren on March 18, 2016, 05:31:24 pmIt may be caused by the battery heating up.Attached is an image I took after triggering the shutter a bunch of times in a short time span.You can see a thermal gradient across the image. I am guessing that the motor for the shutter is near the corner of the sensor and that it is heating up.

author: Macbeth
author_rank: Super Contributor
timestamp: March 18, 2016, 09:22:25 pm
content: Bookmarking because I've finally given up waiting for F1G2 to be in stock and backordered. Hopefully I get one the first week of April

author: tomas123
author_rank: Frequent Contributor
timestamp: March 19, 2016, 12:33:44 am
content: I can't confirm the temperature gradient (rainbow).My F1G2 runs several days by continuous battery charging at 20°C room temperature without problems, but I noticed a really battery heating like a fast charging smartphone.I'm worried about the duration of the shutter mechanism (640 movements daily)

author: eren
author_rank: Newbie
timestamp: March 21, 2016, 10:50:28 am
content: Interesting -- what's your shutter temperature after a full days run? Is your LED indicator blinking red at any point? I will get the red blinking every time after I run it for 3-5 hours, and start seeing something like Clay's sample frame fairly regularly. I also see that the FFC process starts taking longer -- I'm guessing that when I see the rainbow frames, the FFC has failed.The shutter motor heating up sounds like a likely scenario, but I'd also suspect the battery overheating during charging. If only there were a way to disengage the battery entirely when plugged into DC power...

author: tomas123
author_rank: Frequent Contributor
timestamp: March 21, 2016, 09:55:53 pm
content: Quote from: eren on March 21, 2016, 10:50:28 amyes, the LED is blinking redI can't give a better answer for shutter temperature as described herehttps://www.eevblog.com/forum/thermal-imaging/flir-one-thermal-imaging-camera-teardown-and-hacks/msg848878/#msg848878

author: sadae
author_rank: Newbie
timestamp: April 04, 2016, 09:25:49 pm
content: Hello, I have a problem saving different types of files, I did this code:Code:try {lastSavedPath = path + "/" + "Thermal+" + fileName;renderedImage.getFrame().save(new File(lastSavedPath), RenderedImage.Palette.Iron, RenderedImage.ImageType.ThermalRGBA8888Image);MediaScannerConnection.scanFile(context,new String[]{path + "/" + "Thermal+" + fileName}, null,new MediaScannerConnection.OnScanCompletedListener() {@Overridepublic void onScanCompleted(String path, Uri uri) {Log.i("ExternalStorage", "Scanned " + path + ":");Log.i("ExternalStorage", "-> uri=" + uri);}});}catch (Exception e){e.printStackTrace();}try{lastSavedPath = path + "/" + "RGB+" + fileName;renderedImage.getFrame().save(new File(lastSavedPath), RenderedImage.Palette.Iron, RenderedImage.ImageType.VisualYCbCr888Image);MediaScannerConnection.scanFile(context,new String[]{path + "/" + "RGB+" + fileName}, null,new MediaScannerConnection.OnScanCompletedListener() {@Overridepublic void onScanCompleted(String path, Uri uri) {Log.i("ExternalStorage", "Scanned " + path + ":");Log.i("ExternalStorage", "-> uri=" + uri);}});}catch (Exception e){e.printStackTrace();}But I don't know why one time save the RGB photo, another time save the thermal photo and another time save the both files

author: tomas123
author_rank: Frequent Contributor
timestamp: April 04, 2016, 10:15:56 pm
content: Ah, now you found the *.raw files in your folder /pictures?You must switch to the 14 Bit ViewA better forum for questions about the Flir SDK ishttp://developer.flir.com/forums/forum/flir-one-developer-community/general-discussion/

author: sadae
author_rank: Newbie
timestamp: April 05, 2016, 07:10:19 am
content: Quote from: tomas123 on April 04, 2016, 10:15:56 pmYes, finally I installed a raw viewer, this was my problem. But about save the other images do you know any idea? Thanks!Edit: I discovered that I have to change the image mode in the Change View to save the raw, for example if I choose the Thermal Linear 14Bit in the Change View the App take a photo with this image mode. But if the view is Blended the app doesn't take any Thermal Linear photo. Someone know how to fix it?Edit2: Now when I take a Thrmal Linear 14Bit image appear the raw empty, with a size of only 35kB...

author: tomas123
author_rank: Frequent Contributor
timestamp: April 05, 2016, 10:04:48 am
content: the RAW is not empty:160x120x2=38.400 Byteuse ImageMagick (Q16 = 16 Bit) and convert the RAW to a real imageCode:convert -size 120x160 -depth 16 gray:ir.raw 120x160.pngsee my signature for more informations

author: sadae
author_rank: Newbie
timestamp: April 05, 2016, 12:01:43 pm
content: Quote from: tomas123 on April 05, 2016, 10:04:48 amOh, thanks!One question more, I'm trying to use this raw image in Flir Tools, I converted the image to .jpg and the software can read it, but can't do nothing with the image because all the metadata disappear. Is this maybe related with my conversor?And one doubt more, I saw that the Flir E8 do multispectral images, could the Flir One do it? Someone know how to create a multispectral .jpg using the RGB camera and the Thermal camera of the FLir One?Do you know a visualizer app to visualize the .raw file in Android?

author: tomas123
author_rank: Frequent Contributor
timestamp: April 05, 2016, 12:33:19 pm
content: You must rebuild a Flir thermal jpg.See my signature: "Flir panorama images"Quote from: sadae on April 05, 2016, 12:01:43 pmI don't understand the question. The Flir One App can only makes this MSX images...If you want make own MSX images with Imagemagick see my signature "Flir images with Exiftool+ImageMagick"Code:--msx Flir MSX Mode for PiP--shade Flir MSX Mode for PiP with amboss effect

author: sadae
author_rank: Newbie
timestamp: April 05, 2016, 01:52:52 pm
content: Quote from: tomas123 on April 05, 2016, 12:33:19 pmYes, the Flir One App do this MSX images, but my objective is change the Blended MSX for the 14-Bit Linear image, and then load this image with Flir Tools as the MSX image. Is that possible?Edit: I continue with my develop and I found that using the ThermalRadiometricKelvinImage can to know the temperature of one pixel of the image, as the Flir One App. In the EditorActivity.java I have this code:Code:else if (renderedImage.imageType() == RenderedImage.ImageType.ThermalRadiometricKelvinImage) {double averageTemp = 0;short[] shortPixels = new short[renderedImage.pixelData().length / 2];ByteBuffer.wrap(renderedImage.pixelData()).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(shortPixels);for (int i = 0; i < shortPixels.length; i++) {averageTemp += (((int)shortPixels) - averageTemp) / ((double) i + 1);}final double averageC = (averageTemp / 100) - 273.15;Log.i("Tempera", String.valueOf(averageC));runOnUiThread(new Runnable() {@Overridepublic void run() {Log.i("Tempera", String.valueOf(averageC));Toast.makeText(getApplicationContext(), "Average Temperature = " + averageC + "ºC", Toast.LENGTH_LONG).show();}});But in any moment I get a Log or a Toast of this function. Do you know if I have to change something to get the average temperature in this case?

author: tomas123
author_rank: Frequent Contributor
timestamp: April 05, 2016, 02:48:47 pm
content: Quote from: sadae on April 05, 2016, 01:52:52 pmYES!!You are a hard nutI give you all necessary links and you ask the same question.todo list:- get a vga image- get a thermal 14 bit image- get a real Flir Thermal Image- inject vga and 14Bit image in Flir Thermal Image- edit the ratio factor between real/thermal and the offset for best fitCode:>exiftool -Real* -Offset* ir.jpgReal 2 IR : 1.23121082782745Offset X : +5Offset Y : -35Thats all.Now you can open this new thermal image with Flir Tools.clarification: enlarge the border of the vga image for uncropped FOV (field of view) of the thermal imageYou need some changes in my panorama script for additional injection of the real image.Read the exiftool source codehttp://cpansearch.perl.org/src/EXIFTOOL/Image-ExifTool-10.10/lib/Image/ExifTool/FLIR.pmsimplification:If you take the FlirThermal jpg and the 14Bit RAW frome the same scene, then you must only inject the 14Bit image.But don't delete the embedded real image (FLIR Record 0x2a and 0x0e)Code:>exiftool -v2 ir.jpg | grep -A1 Record| | FLIR Record 0x20, offset 0x0200, length 0x09ac| | 0) CameraInfo (SubDirectory) -->--| | FLIR Record 0x22, offset 0x0bac, length 0x0310| | 1) PaletteInfo (SubDirectory) -->--| | FLIR Record 0x21, offset 0x0ebc, length 0x0038| | 2) MeasurementInfo (SubDirectory) -->--| | FLIR Record 0x01, offset 0x0ef4, length 0x25820| | 3) RawData (SubDirectory) -->--| | FLIR Record 0x2a, offset 0x26714, length 0x0060| | 4) PiP (SubDirectory) -->--| | FLIR Record 0x2b, offset 0x26774, length 0x00b8| | 5) GPSInfo (SubDirectory) -->--| | FLIR Record 0x0e, offset 0x2682c, length 0xe1020| | 6) EmbeddedImage (SubDirectory) -->Please post your result here.Now make your homeworks...

author: cynfab
author_rank: Regular Contributor
timestamp: April 24, 2016, 10:39:40 pm
content: Finally got my F1G2 attached to my 3DR Solo drone. Still a WIP but it works.......ken...

author: Fraser
author_rank: Super Contributor
timestamp: April 25, 2016, 12:31:06 am
content: I took a look at the FLIR Twitter page today.https://mobile.twitter.com/flirThey attended a large Fire Fighting exhibition and were demonstrating their new K2 camera....... Of more interest to me, there are pictures of an F1G2 attached to a phone and suspended underneath a drone. They included pictures captured during a flight above people.Now all we need is a really compact and light weight smart phone to mate with the F1G2 and a means to extract the image data in real timeIt is good to see people being innovative with this technology.Fraser

author: cynfab
author_rank: Regular Contributor
timestamp: April 25, 2016, 12:48:57 am
content: What Flir doesn't want to acknowledge is that the Flir F1G2 can be used WITHOUT ANDROID or their app or a phone.Here's a screen shot from a video I just took out in our horse coral, using my drone and F1G2 attached to a PcDuino running linux and the driver tomas123 & I developed.No MSX either.Sure, a Bozon or a Vue/Vue Pro would be nice but you can actually afford a F1G2.

author: Ben321
author_rank: Frequent Contributor
timestamp: April 25, 2016, 03:02:46 am
content: Quote from: cynfab on April 25, 2016, 12:48:57 amAs far as I know, there's no way to use it on a regular PC yet (sorry if I missed anything that might indicate otherwise, there's a TON of posts here so I skipped to the last one to see the latest news, but may have missed something else along the way).

author: cynfab
author_rank: Regular Contributor
timestamp: April 25, 2016, 03:18:28 am
content: tomas123 & I used "regular pc's" to develop the code.I do all my testing on a Dell XPS 8900 with the F1G2 plugged into the USB port. Just like I did with my Seek.linux kernel, libusb, v4l2loopback, gstreamer. All run on my embedded platforms like they do on my desktop.Oh... did you mean Windoze? sorry, I don't do Windoze, so wouldn't have the slightest clue where to begin.

author: Ben321
author_rank: Frequent Contributor
timestamp: April 25, 2016, 03:59:43 am
content: Quote from: cynfab on April 25, 2016, 03:18:28 amSo you used Linux? Any possibility that you could take what you learned from your experiments, and have a friend who's familiar with programming device drivers for Windows, go ahead and write a Windows driver for the FLIR One? I'd LOVE to get to use it as a LWIR webcam, but I don't know the first thing about using Linux.

author: tomas123
author_rank: Frequent Contributor
timestamp: April 25, 2016, 10:13:39 am
content: Hi cynfab,a great jobI see, that you used the 3DR Solo app.https://play.google.com/store/apps/details?id=com.o3dr.solo.android3DR Solo only supports GoPro camerashttps://3dr.com/kb/solo-user-manual/(page 10)Can you post some details, how do you connect the Flir One G2 as GoPro camera (hardware and software)?

author: cynfab
author_rank: Regular Contributor
timestamp: April 25, 2016, 12:11:28 pm
content: Hi tomas123,You remember my PcDuino3 nano experiments, well this is just an extension of that.The 3DR Solo's "companion computer" has an HDMI input and an ADV7610 HDMI decoder. It accepts all sorts of HDMI input formats.The Solo can only "control" a GoPro, but it happily accepts the 1280x720p output from my PcDuino3 nano.The Solo run a Yocto headless distro on an iMx6S. My first thought was to use its USB to connect the Flir One.Alas, 3DR's source release isn't quite in sync with what they are running. That's another story.So I strapped the PcDuino to the bottom of the Solo, plugged the HDMI out into where the GoPro connected. A DC-DC converter powers the PcDuino.I run my own custom 4.3.3 kernel as well as v4l2loopback and our flir8x driver. A gstreamer pipeline takes the visual and thermal images and composits them together.I built all this with buildroot.It still has lots and lots of issues, not turn key by any means yet....ken...

author: sadae
author_rank: Newbie
timestamp: April 29, 2016, 09:25:05 am
content: Hello, I have more questionsSomeone knows how from a MSX image delete the FLIR logo and modify the range temperature of the thermal image to for example 10ºC to 20ºC?But all this without use the Flir Tools because I only want the thermal image modified, and not the different graphics that it draw in the image

author: OrBy
author_rank: Regular Contributor
timestamp: April 29, 2016, 07:41:43 pm
content: Quote from: sadae on April 29, 2016, 09:25:05 amtomas123's wonderful PHP script or one of the directives based off it like BFIC come to mind as having the ability to do such things to FLIR's images.

author: tomas123
author_rank: Frequent Contributor
timestamp: April 30, 2016, 09:17:52 am
content: a quick-and-dirty method is to make a (cropped) screenshot from Flir Tools for PC.Then you have a great image resolution with color scale etc. and without the Flir Logo!For the php scripts see my footer

author: sadae
author_rank: Newbie
timestamp: April 30, 2016, 09:47:53 am
content: Quote from: tomas123 on April 30, 2016, 09:17:52 amMy first idea was to use the first methodBut the problem is that I have more than 1000 MSX images to unify the range temperature (I'm trying to create a 3D thermal model of an object) and I only need the thermal image with a palette and without the Flir logo and the scale. For this reason I'm trying your php script and execute a loop using this line:flir.php --rmin 20 --rmax 30 --clut --scale -i flir.jpg -o test1.jpgBut I think that something is wrong because it doesn't create the test1.jpg file.Thanks for all!

author: faboaic
author_rank: Newbie
timestamp: May 30, 2016, 04:38:00 pm
content: Hello,tomas123 and cynfab, thank you so much!I now have my Cheerson CX-20 ready for flying with flir one and raspberry pi 2.Different from ken's solution on the solo I do not have an included hdmi video transmitter.But raspberry pi has video out 'cvbs' that can be connected to a standard 5,8 GHz video transmitter, used e.g. for FPV.I received that video with 5,8 GHz video receiver, displayed and recorded it with an old Sony DCR-TRV820E Digital8 camcorder.Here is a YouTube video with the cropped and cut video:https://youtu.be/ugQJUSyidRgSo the solution is up and running.But some things might make it even better.@tomas123is it possible or would it make sense to stop flir one from calibration all the time repeatedly?so that color temperature scale is fixed all the time, for example to 10 - 30 degree Celsius or configurable range?Use case is flying over the field and searching for Bambi that would be hurt or killed while mowing the hay.with fixed scale I think we would see Bambi more easily.thanks and regards,Fabian

author: cynfab
author_rank: Regular Contributor
timestamp: May 30, 2016, 07:09:41 pm
content: Hi Fabian,Nice job, glad to see someone else flying with a Flir One.Here is my latest version of the driver, it has a few "improvements" over the last one posted here.

author: tomas123
author_rank: Frequent Contributor
timestamp: May 30, 2016, 10:05:28 pm
content: Quote from: faboaic on May 30, 2016, 04:38:00 pmyou can stop the FFC with this (java) command from SDKSDK/documentation-FLIR-One-Android-1.0.1-HTML/com/flir/flironesdk/Device.htmlQuotethis command is converted to this string and send over USBCode:{"type":"setOption","data":{"option":"autoFFC","value":false}}but you need some hex bytes around (i.e. 16 Bytes prequel which begins with "cc 01 00 00 01 00 00 00", checksum etc.).Best way to get this hex code is to debug the function sendDataToDevice() in the SDK sample code and call a setAutomaticTuning(false). I described it here:Quote from: tomas123 on March 16, 2016, 09:48:53 pmBut if you look at the diagram above, you see that there is a large temperature drift, which is compensated by FFC.I think without autoFFC you have not better conditions for a fixed scale.I would enlarge the FFC interval from 135 seconds to 10 minutes...Quote from: faboaic on May 30, 2016, 04:38:00 pm

author: Trax
author_rank: Regular Contributor
timestamp: July 02, 2016, 08:18:06 am
content: is it compatible with a "Sony Xperia Z3+"

author: encryptededdy
author_rank: Frequent Contributor
timestamp: July 02, 2016, 08:45:12 am
content: Quote from: Trax on July 02, 2016, 08:18:06 amOS: Android 5.0SoC: Snapdragon 810USB Port direction: Short side towards screenUSB-OTG support: YesUSB Port side: BottomI'm 99% sure it'll work; I don't see why it wouldn't.

author: sadae
author_rank: Newbie
timestamp: July 13, 2016, 09:09:11 am
content: Hi to all! I'm trying to get a same range of temperatures (18º to 30º, for example) from the .RAW images of the Flir One.In this moment I'm executing this code in Windows, installing ImageMagick 6.9.3.-Q16 and exiftool:for /l %%x in (1, 1, 167) do (echo %%xconvert -size 120x160 -depth 16 gray:%%x.raw %%x.pngconvert %%x.png -auto-level %%x.png)//Coloring the images:exiftool FLIR0080.jpg -b -Palette > pal.rawconvert -size 224X1 -depth 8 YCbCr:pal.raw -separate -swap 1,2 -set colorspace YCbCr -combine -colorspace sRGB pal.pngfor /l %%x in (1, 1, 167) do (echo %%xconvert -size 224X1 -depth 8 YCbCr:pal.raw -separate -swap 1,2 -set colorspace YCbCr -combine -colorspace sRGB -auto-level pals.pngconvert %%x.png pals.png -clut ColorBetter%%x.png)//Applying the same range of temperatures for all the images:for /l %%x in (1, 1, 167) do (echo %%xconvert ColorBetter%%x.png -resize 480x -sharpen 0x1 -level 14000,16000 NormColor%%x.png)The problem is that whit this code, I continue without have the same range of temperatures in the images, as to do Flir Tools, choosing the real temperature of the images and modifying the palette to show this range of temperatures. Due to this problem MS ICE can't do any type of panorama...I upload some files to this .rar:*.RAW images from the Flir One*.PNG from .RAW images* Color images applying a color table* Normalized images with a determinate range of temperature (it doesn't work)* .BAT of all the processhttps://mega.nz/#!BER2ASBK!NuQrYnl9TR97JTmQMEsPAiCPzloNAcQariA4QWO3f6sPD: You can see in the images NormColor4 and NormColor5 the problem, it is the same wall and change totally the image temperature.Thanks again!

author: tomas123
author_rank: Frequent Contributor
timestamp: July 13, 2016, 09:32:28 am
content: Hi sadae,a great postI think, your problem is, that your first step is an auto-level of RAW images:Code:convert %%x.png -auto-level %%x.pngcomment it outThe next step is finding your upper and lower level in your images (you use -level 14000,16000, see my footer for more informations)Then expand your level and feed the MS ICE with 16 bitgray scaleimages.Colorize your imagesafterpanorama stitchung!

author: tomas123
author_rank: Frequent Contributor
timestamp: July 13, 2016, 09:45:23 am
content: A sample with your 10 RAW images.I used GnuWin to simulate your windows systemhttp://sourceforge.net/projects/gnuwin32/files/Code:>for /l %x in (1, 1, 10) do (convert -size 120x160 -depth 16 gray:%x.raw %xr.png)(convert -size 120x160 -depth 16 gray:1.raw 1r.png )(convert -size 120x160 -depth 16 gray:2.raw 2r.png )(convert -size 120x160 -depth 16 gray:3.raw 3r.png )...(convert -size 120x160 -depth 16 gray:7.raw 7r.png )(convert -size 120x160 -depth 16 gray:8.raw 8r.png )(convert -size 120x160 -depth 16 gray:9.raw 9r.png )>identify -verbose *r.png | grep -n5 statist | grep -e "max\|min" | sort -k3 -n | awk "{ if (NR ==1) print} END {print}"17- min: 11548 (0.176211)1976- max: 18040 (0.275273)select min/max = 11500 / 18100a hint:awk only print the first and last line. You can drop it:>identify -verbose *r.png | grep -n5 statist | grep -e "max\|min" | sort -k3 -n17-min: 11548(0.176211)1269- min: 11640 (0.177615)698- min: 11688 (0.178347)...3636- max: 17080 (0.260624)3033- max: 17200 (0.262455)2475- max: 17908 (0.273259)1976-max: 18040(0.275273)edit:I see, that MS ICE has serious trouble to stitch the F1 RAW images with the large distortion of the flir one lens.Maybe, you need only more overlapping images.Whats's that?

author: sadae
author_rank: Newbie
timestamp: July 13, 2016, 04:39:11 pm
content: Thanks again tomas123 for your great help! I did it!I had some errors in my code, as you said, and this is my final code:Code:exiftool FLIR0080.jpg -b -Palette > pal.rawconvert -size 224X1 -depth 8 YCbCr:pal.raw -separate -swap 1,2 -set colorspace YCbCr -combine -colorspace sRGB -auto-level pals.pngfor /l %%x in (1, 1, 167) do (echo %%xconvert -size 120x160 -depth 16 gray:%%x.raw %%x.pngconvert %%x.png -resize 480x -sharpen 0x1 -level 11500,18100 %%x.pngconvert %%x.png pals.png -clut ColorBetter%%x.png)Quote from: tomas123 on July 13, 2016, 09:45:23 amIn 1 month I will upload to the forum the results of my thesis in the HSKAThis is a part of a silo, and MS ICE doesn't work for the perspective of the data collection because my idea isn't create a panorama. Now, the only problem that I have is the low resolution of the Flir One and the lack of photos. As you said, I have should taken the photos with more overlap, even repeating photos...But well, I know it for the next job, I have all my job did it with the Blended MSX photos, but I wanted do the same only with the thermal images from the Flir One.

author: Trax
author_rank: Regular Contributor
timestamp: July 15, 2016, 06:58:51 am
content: Does anyone used the flir one already with a OnePlus 3 phone?

author: Trax
author_rank: Regular Contributor
timestamp: July 16, 2016, 10:23:57 am
content: I know the plug is mechanically not compatible, but other than a adapter cable all should be fine, right?

author: trevwhite
author_rank: Frequent Contributor
timestamp: July 16, 2016, 12:09:16 pm
content: Checking the specs, I reckon it will easily handle it.

author: jeng
author_rank: Newbie
timestamp: August 02, 2016, 06:27:40 am
content: Hi @all,It would bee cool to get this work ower usbip!I try to explain what i want to do.Right,I have a drone "Phantom 3 Pro"now i would connect my Android mini pc with my Flir One "G2" and mount this to my drone.Then i tested VirtualHere Serverhttps://www.virtualhere.com/android_usb_serverand give a try to connect to Raspberry pi 3 linux client.Ref:https://www.virtualhere.com/sites/default/files/usbclient/vhclientarmhfWhat i want to do with this, i want to controll my Android "Flir One G2 " cam on Linux tablet or raspberry pi via wifi.I can connect both, but if i start ./flir8p1 xxxx.raw it hangs...I am not devlopper, so if you need informations on this, please dont hesitate to ask.Greatings from LuxemburgJengEdit: i add some screenshots:

author: tomas123
author_rank: Frequent Contributor
timestamp: August 02, 2016, 09:13:43 am
content: I see use use the last driver from cynfabQuote from: cynfab on May 30, 2016, 07:09:41 pmIs this pipe correct?"Phantom 3 Pro" with Android mini pc (Raspberry pi 3) running a "VirtualHere USB Server"-> wifi ->Linux tablet with flir8p1 software and VirtualHere USB Client

author: jeng
author_rank: Newbie
timestamp: August 02, 2016, 09:18:52 am
content: @tomas123I just modified my previous post.Attached some screenshots.Here the correct pipe,"Phantom 3 Pro" with Android mini pc running a "VirtualHere USB Server" -> wifi -> Linux tablet or raspberry pi with flir8p1 software and VirtualHere USB Client.

author: tomas123
author_rank: Frequent Contributor
timestamp: August 02, 2016, 09:39:50 am
content: the flir F1 USB interface it's extreme time criticalAs I posted above in this thread, I have not success with connecting a Flir F1 to my Macbook running a virtual linux machine in vmware fusion (some hours of useless work)the best way is to run the Flir One software direct on your "Phantom 3 Pro"

author: jeng
author_rank: Newbie
timestamp: August 02, 2016, 09:45:30 am
content: Quote from: tomas123 on August 02, 2016, 09:39:50 amOk, so no way to get this work.But thank you anyway!edit: just fyi,Android server log.--------- beginning of /dev/log/mainI/vhusbd-boot( 5655): Starting server daemon...I/vhusbd ( 5655): Tue Aug 2 09:35:30 2016 LOG_INFO >>> Starting VirtualHere USB Server v2.9.8 (Built: Jul 15 2016, 13:54:35)<<<I/vhusbd ( 5655): Tue Aug 2 09:35:30 2016 LOG_INFO Using configuration /data/data/com.virtualhere.androidserver/config.iniI/vhusbd ( 5655): Tue Aug 2 09:35:30 2016 LOG_INFO Server licensed to=unlicensed max_devices=1I/vhusbd ( 5655): Tue Aug 2 09:35:30 2016 LOG_INFO Using large URB'sI/vhusbd ( 5655): Tue Aug 2 09:35:30 2016 LOG_DEBUG TCPServer starting...I/vhusbd ( 5655): Tue Aug 2 09:35:30 2016 LOG_INFO Listening on all network interfaces at port 7575I/vhusbd ( 5655): VirtualHere USB Server is running...press CTRL-C to stopD/dalvikvm( 5655): GC_CONCURRENT freed 307K, 12% free 2870K/3240K, paused 3ms+2ms, total 24msI/vhusbd ( 5655): Tue Aug 2 09:35:32 2016 LOG_DEBUG Not a device .I/vhusbd ( 5655): Tue Aug 2 09:35:32 2016 LOG_DEBUG Not a device ..I/vhusbd ( 5655): Tue Aug 2 09:35:32 2016 LOG_DEBUG Found /dev/bus/usb/003/008 in /sys/bus/usb/devices/3-1 (bus/usb/003/008)I/vhusbd ( 5655): Tue Aug 2 09:35:32 2016 LOG_INFO Found High speed device [09cb:1996] "FLIR Systems, FLIR ONE Camera" at address 31I/dalvikvm( 5655): Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.n.onProvideKeyboardShortcutsW/dalvikvm( 5655): VFY: unable to resolve interface method 6832: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)VD/dalvikvm( 5655): VFY: replacing opcode 0x72 at 0x0002W/dalvikvm( 5655): VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)I/dalvikvm( 5655): Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.n.onSearchRequestedW/dalvikvm( 5655): VFY: unable to resolve interface method 6834: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)ZD/dalvikvm( 5655): VFY: replacing opcode 0x72 at 0x0002I/dalvikvm( 5655): Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.n.onWindowStartingActionModeW/dalvikvm( 5655): VFY: unable to resolve interface method 6838: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;D/dalvikvm( 5655): VFY: replacing opcode 0x72 at 0x0002I/dalvikvm( 5655): Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.cr.getDrawableW/dalvikvm( 5655): VFY: unable to resolve virtual method 201: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;D/dalvikvm( 5655): VFY: replacing opcode 0x6e at 0x0002I/dalvikvm( 5655): Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.cr.getDrawableForDensityW/dalvikvm( 5655): VFY: unable to resolve virtual method 203: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;D/dalvikvm( 5655): VFY: replacing opcode 0x6e at 0x0002I/dalvikvm( 5655): Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.c.a.b.aW/dalvikvm( 5655): VFY: unable to resolve virtual method 98: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;D/dalvikvm( 5655): VFY: replacing opcode 0x6e at 0x0006D/OpenGLRenderer( 5655): Enabling debug mode 0E/dalvikvm( 5655): Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.aw.aW/dalvikvm( 5655): VFY: unable to resolve instanceof 108 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/aw;D/dalvikvm( 5655): VFY: replacing opcode 0x20 at 0x000cD/dalvikvm( 5655): GC_CONCURRENT freed 223K, 9% free 3035K/3324K, paused 2ms+1ms, total 14msI/dalvikvm( 5655): Could not find method android.widget.PopupWindow.setEnterTransition, referenced from method android.support.v7.widget.cp.aW/dalvikvm( 5655): VFY: unable to resolve virtual method 7153: Landroid/widget/PopupWindow;.setEnterTransition (Landroid/transition/Transition;)VD/dalvikvm( 5655): VFY: replacing opcode 0x6e at 0x000aI/dalvikvm( 5655): Could not find method android.widget.PopupWindow.setExitTransition, referenced from method android.support.v7.widget.cp.bW/dalvikvm( 5655): VFY: unable to resolve virtual method 7154: Landroid/widget/PopupWindow;.setExitTransition (Landroid/transition/Transition;)VD/dalvikvm( 5655): VFY: replacing opcode 0x6e at 0x000aI/ListPopupWindow( 5655): Could not find method setEpicenterBounds(Rect) on PopupWindow. Oh well.I/dalvikvm( 5655): Could not find method android.support.v7.widget.bu.drawableHotspotChanged, referenced from method android.support.v7.widget.bu.aW/dalvikvm( 5655): VFY: unable to resolve virtual method 5656: Landroid/support/v7/widget/bu;.drawableHotspotChanged (FF)VD/dalvikvm( 5655): VFY: replacing opcode 0x6e at 0x000aI/dalvikvm( 5655): Could not find method android.view.View.drawableHotspotChanged, referenced from method android.support.v7.widget.bu.aW/dalvikvm( 5655): VFY: unable to resolve virtual method 6624: Landroid/view/View;.drawableHotspotChanged (FF)VD/dalvikvm( 5655): VFY: replacing opcode 0x6e at 0x004aD/dalvikvm( 5655): GC_FOR_ALLOC freed 57K, 8% free 3113K/3352K, paused 13ms, total 13msD/dalvikvm( 5655): GC_CONCURRENT freed 28K, 5% free 3482K/3628K, paused 2ms+2ms, total 17ms

author: jeng
author_rank: Newbie
timestamp: August 02, 2016, 10:07:53 am
content: https://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg819919/?topicseen#msg819919This would be an alternativ,but i can´t get the driver to compile on Linux raspberrypi 4.4.16-v7+ #899 SMP Thu Jul 28 12:40:33 BST 2016 armv7l GNU/LinuxI got smartcam app compiled and working on raspberry...

author: jeng
author_rank: Newbie
timestamp: August 02, 2016, 10:40:33 am
content: Quote from: tomas123 on August 02, 2016, 09:39:50 amHuhh, how can i do that?

author: Kilrah
author_rank: Unknown
timestamp: August 02, 2016, 12:33:34 pm
content: Well for example an android phone mounted on the P3 with the camera on and that directly runs the Flir app, and some kind of screen sharing /video streaming software that allows to view it remotely from another device... or just the solution from a few posts above.

author: Kilrah
author_rank: Unknown
timestamp: August 02, 2016, 10:46:56 pm
content: Quote from: tomas123 on August 02, 2016, 09:39:50 amInteresting... the VirtualHere USB solution works a treat with the Thermal Expert cam! Thanks for the heads up, had never heard of it!https://www.eevblog.com/forum/thermal-imaging/another-smartphone-thermal-imager-from-i3/msg996374/#msg996374

author: jeng
author_rank: Newbie
timestamp: August 02, 2016, 10:56:31 pm
content: Quote from: Kilrah on August 02, 2016, 12:33:34 pmokbut thats not the solution for me.Thanks anyway.

author: Kilrah
author_rank: Unknown
timestamp: August 03, 2016, 07:22:07 am
content: Why not? Would be hard to do any simpler.

author: tomas123
author_rank: Frequent Contributor
timestamp: August 03, 2016, 07:55:28 pm
content: Quote from: jeng on August 02, 2016, 10:40:33 amI don't understand your problem.You know, that there are some solutions for a drone in this threat.for instanceQuote from: cynfab on April 24, 2016, 10:39:40 pmandQuote from: faboaic on May 30, 2016, 04:38:00 pm

author: Champal
author_rank: Newbie
timestamp: September 02, 2016, 11:23:42 am
content: Hi,First thank you to tomas123 and cynfab for your workI now can use the FlirOne from a PC and this is easier than with a smartphone.I have read all this thread and test almost all version (g, h, i, k, l1, l2, l3 and p1)Thanks for your details steps and explanations.Quote from: cynfab on May 30, 2016, 07:09:41 pmWith this version p1 the "colorized thermal image" is in "RGB24" instead of "MJPEG" => mjpg-streamer can't read thisI do a fusion between version l3 and p1 to encode the "colorized thermal image" in MJPEG and it's work !There is 2 scripts "gst5" and "gst6" that use gst-launch-1.0 but after installing it, it doesn't work. What are they supposed to do ?Code:$ gst-launch-1.0 --versiongst-launch-1.0 version 1.2.4GStreamer 1.2.4https://launchpad.net/distros/ubuntu/+source/gstreamer1.0$ sudo ./gst5WARNING: erroneous pipeline: could not link videoscale0 to autovideosink0$ sudo ./gst6WARNING: erroneous pipeline: no element "compositor"Next steps for me : autostart when the cam is plug/power on and run on a raspberry pi.Some ideas for the future :* Mesure of the temperature anywhere in the image* Mask and/or Area of mesurements* Block/Modify the range for the "palette"* Changing "palette" in live* ...Again, thanks.Champal

author: tomas123
author_rank: Frequent Contributor
timestamp: September 02, 2016, 02:02:29 pm
content: Quote from: Champal on September 02, 2016, 11:23:42 amif you dont like use V4L withCode:#define FRAME_FORMAT2 V4L2_PIX_FMT_RGB24then test the initial variant flir8k.zip with jpg files from a RAMDISKhttps://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg839518/#msg839518mjpg-streamer works great with jpg input filesCode:./mjpg_streamer -i "input_file.so -f /mnt/RAMDisk/ -n thermal.jpg" -o "output_http.so -p 8080 -w /usr/local/www"

author: tomas123
author_rank: Frequent Contributor
timestamp: September 20, 2016, 10:11:40 pm
content: Quote from: tomas123 on August 02, 2016, 09:39:50 amPlease note on EP 0x81 I got allways a answer on OSX and in VMseehttps://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg816972/#msg816972The challange is EP 0x83 and EP 0x85

author: joe-c
author_rank: Frequent Contributor
timestamp: September 21, 2016, 07:38:00 pm
content: Quote from: tomas123 on September 20, 2016, 10:11:40 pmWhy FLIR... why...thank you for the info, i will try later more with the FLIR One

author: TheError
author_rank: Newbie
timestamp: September 22, 2016, 08:29:44 am
content: Quote from: joe-c on September 21, 2016, 07:38:00 pmI'm so ready for this, the Android app isn't very stable and your software looks perfect for what im trying to do.

author: Stereo
author_rank: Contributor
timestamp: October 02, 2016, 04:44:31 am
content: Hi all.My Flir One Android often freezing image after calibration "click" need touch calibration button again then it may unfreezing or even need reconnect device.Please advise.

author: tomas123
author_rank: Frequent Contributor
timestamp: October 02, 2016, 03:41:39 pm
content: This is unfortunately a feature of the F1G2.

author: allstone
author_rank: Contributor
timestamp: October 03, 2016, 12:36:22 pm
content: Quote from: joe-c on September 21, 2016, 06:44:35 AMjoe-c Have you succeeded in connecting Flir One same as Seek Compact to PC ?

author: tomas123
author_rank: Frequent Contributor
timestamp: October 03, 2016, 05:14:48 pm
content: please give use more details about your host machine and linux version

author: allstone
author_rank: Contributor
timestamp: October 03, 2016, 05:58:55 pm
content: Quote from: tomas123 on October 03, 2016, 05:14:48 pmtomas123 - was this question intended for me? If so, firstly it would be interesting to know if you managed to connect it to PC at all in any conditions.I can give you my machine specs, its windows 10 build 1607 on laptop, on tablet windows 10 build 1501. I saw in some thread that someone used some driver and PC saw Flir One as a device, not sure which device.Anyway, if its possible to connect to windows - great, I will be able to take from there. If from linux - I can install linux and try out it that way, maybe do dual boot on my tablet. Though I would prefer windows. Not sure if recognising the device and sending correct challenge is the same - it was 10+ years ago I wrote any driver in C++, I now mostly code in java.Anyway, I scanned through all the threads and I am, simply, confused from all the information. I will be getting Flir One in a week maybe, so I thought I will begin readingMaybe I need to scan all the Flir One related threads one more time, not sure yet.

author: joe-c
author_rank: Frequent Contributor
timestamp: October 03, 2016, 09:01:14 pm
content: Quote from: allstone on October 03, 2016, 12:36:22 pmConnection 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.The Problem seems to be at the Initialization step 2 (sending some magic Byte sequences followed by a string command sequence.)My device often disconnects at this point, sometimes it run to Step 3 and has an error while ControlTransferOut, sometimes it passed this point and poll 0x85 without a response.from my point of view its a low priority project. if i have a little bit time i try some things.i think now about buying a better logic analyzer... and if i was able to "see the transmissions" it will be maybe more possible to make this thing working under windows.For now, the application has only 2 Steps... fist "Connect and Stream" should be hit and green, this indicates, the FLIR was found and respond to a control request.than the Button "Get 1 Frame (Byte array)" tries a initialization routine and returns, if more 10 bytes was read from EP 0x85... this never happen until now.i tried sometimes the FLIR One G2 on my Smartphone to be sure, it still works.if somebody will try, here is the Project file and the way to get this thing installed on windows.Additional Note: i have a iOS version too, it was internal connected over 4 Wires (i suggest USB, like the Seek Thermal) but sadly this device is not recognized on the PC or Smartphone. Not sure if its defect or it has just another communications way. My Andoid PCB have less components.

author: allstone
author_rank: Contributor
timestamp: October 04, 2016, 07:11:25 am
content: Quote from: joe-c on October 03, 2016, 09:01:14 pmThanks joe-c, thats great start for me!So it seems this still needs a bit of reverse engineering, I will take a look when I get my camera. The main reason I bought Flir One G2, but not Seek Compact, was because of the more accurate thermal data coming from the sensor and less bleeding (at least from the images others has posted). But we will see.Joe-c, when you say "and the way to get this thing installed on windows." do you mean it is working with streaming on Linux? Have you also got some try-out project for that? I know it works on Android though, because I see there is a custom app. Would be great to get something working on Linux and Android, it would be easier to spot the differences. I like meddling with with firmware through wireshark and disassemblers, might get it working just to be able to connect it to my tablet for easier home inspection, as this is my primary usage for the camera. I already see a lot of information regarding the protocol, I think you all were very close, maybe some bad byte orders, bad timing, bad encoding or something like that.

author: joe-c
author_rank: Frequent Contributor
timestamp: October 04, 2016, 07:51:56 am
content: Quote from: allstone on October 04, 2016, 07:11:25 amlook at page 2 of this thread, thomas123 and cynfab get it working under linux mint. they provide a working linux sample.they made it working under linux, i just used there working code as base for a windows application.maybe its just a tiny change...

author: tomas123
author_rank: Frequent Contributor
timestamp: October 04, 2016, 08:08:14 am
content: Quote from: allstone on October 03, 2016, 05:58:55 pmSorry for misunderstanding, I would know, if you are using some variants of virtual machines.I've made the experience, that my libusb code only opens the EP 0x81 on VM and OSX. ( no EP 0x83 etc., see my post to cynfab above).I think, there are some timing issues...Quote from: allstone on October 04, 2016, 07:11:25 amyes,therefore I built the driver code "byte for byte" from the usb dump (thanks to cynfab) and the java code from the Flir One Android App (https://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg798258/#msg798258).seehttp://www.beyondlogic.org/usbnutshell/usb5.shtml

author: allstone
author_rank: Contributor
timestamp: October 04, 2016, 08:14:39 am
content: Thanks guys, I see it. Plenty of info, now the big picture is already in my head. I believe we will do it - I always succeed when I put enough effort :p and it seems interesting enough for me to invest some time.

author: tomas123
author_rank: Frequent Contributor
timestamp: October 04, 2016, 08:21:48 am
content: and with this running code, you can debug the java communication between the Flir One App (Android) anf the F1G2Quote from: tomas123 on November 13, 2015, 01:21:25 pma sample for getting the configuration file CameraFiles.zip from the camera(set a breakpoint in "public void sendDataToDevice"){"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}Code:data = {byte@20956}0 = -52 (0xCC)1 = 1 (0x1)2 = 0 (0x0)3 = 0 (0x0)4 = 1 (0x1)5 = 0 (0x0)6 = 0 (0x0)7 = 0 (0x0)8 = 65 (0x41)9 = 0 (0x0)10 = 0 (0x0)11 = 0 (0x0)12 = -8 (0xF8)13 = -77 (0xB3)14 = -9 (0xF7)15 = 0 (0x0)protocolType = {UsbCommunicator$ProtocolType@20957} "CONFIGURATION"{"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}data = {byte@20984}0 = 123 (0x7B)1 = 34 (0x22)2 = 116 (0x74)3 = 121 (0x79)4 = 112 (0x70)5 = 101 (0x65)6 = 34 (0x22)7 = 58 (0x3A)8 = 34 (0x22)9 = 111 (0x6F)10 = 112 (0x70)11 = 101 (0x65)12 = 110 (0x6E)13 = 70 (0x46)14 = 105 (0x69)15 = 108 (0x6C)16 = 101 (0x65)17 = 34 (0x22)18 = 44 (0x2C)19 = 34 (0x22)20 = 100 (0x64)21 = 97 (0x61)22 = 116 (0x74)23 = 97 (0x61)24 = 34 (0x22)25 = 58 (0x3A)26 = 123 (0x7B)27 = 34 (0x22)28 = 109 (0x6D)29 = 111 (0x6F)30 = 100 (0x64)31 = 101 (0x65)32 = 34 (0x22)33 = 58 (0x3A)34 = 34 (0x22)35 = 114 (0x72)36 = 34 (0x22)37 = 44 (0x2C)38 = 34 (0x22)39 = 112 (0x70)40 = 97 (0x61)41 = 116 (0x74)42 = 104 (0x68)43 = 34 (0x22)44 = 58 (0x3A)45 = 34 (0x22)46 = 67 (0x43)47 = 97 (0x61)48 = 109 (0x6D)49 = 101 (0x65)50 = 114 (0x72)51 = 97 (0x61)52 = 70 (0x46)53 = 105 (0x69)54 = 108 (0x6C)55 = 101 (0x65)56 = 115 (0x73)57 = 46 (0x2E)58 = 122 (0x7A)59 = 105 (0x69)60 = 112 (0x70)61 = 34 (0x22)62 = 125 (0x7D)63 = 125 (0x7D)64 = 0 (0x0)protocolType = {UsbCommunicator$ProtocolType@20957} "CONFIGURATION"and here the tune command "doFFC" (Flat-field correction){"type":"setOption","data":{"option":"doFFC","value":true}}Code:data = {byte@21106}0 = -52 (0xCC)1 = 1 (0x1)2 = 0 (0x0)3 = 0 (0x0)4 = 1 (0x1)5 = 0 (0x0)6 = 0 (0x0)7 = 0 (0x0)8 = 60 (0x3C)9 = 0 (0x0)10 = 0 (0x0)11 = 0 (0x0)12 = -71 (0xB9)13 = -53 (0xCB)14 = -94 (0xA2)15 = -103 (0x99)protocolType = {UsbCommunicator$ProtocolType@20957} "CONFIGURATION"{"type":"setOption","data":{"option":"doFFC","value":true}}data = {byte@21045}0 = 123 (0x7B)1 = 34 (0x22)2 = 116 (0x74)3 = 121 (0x79)4 = 112 (0x70)5 = 101 (0x65)6 = 34 (0x22)7 = 58 (0x3A)8 = 34 (0x22)9 = 115 (0x73)10 = 101 (0x65)11 = 116 (0x74)12 = 79 (0x4F)13 = 112 (0x70)14 = 116 (0x74)15 = 105 (0x69)16 = 111 (0x6F)17 = 110 (0x6E)18 = 34 (0x22)19 = 44 (0x2C)20 = 34 (0x22)21 = 100 (0x64)22 = 97 (0x61)23 = 116 (0x74)24 = 97 (0x61)25 = 34 (0x22)26 = 58 (0x3A)27 = 123 (0x7B)28 = 34 (0x22)29 = 111 (0x6F)30 = 112 (0x70)31 = 116 (0x74)32 = 105 (0x69)33 = 111 (0x6F)34 = 110 (0x6E)35 = 34 (0x22)36 = 58 (0x3A)37 = 34 (0x22)38 = 100 (0x64)39 = 111 (0x6F)40 = 70 (0x46)41 = 70 (0x46)42 = 67 (0x43)43 = 34 (0x22)44 = 44 (0x2C)45 = 34 (0x22)46 = 118 (0x76)47 = 97 (0x61)48 = 108 (0x6C)49 = 117 (0x75)50 = 101 (0x65)51 = 34 (0x22)52 = 58 (0x3A)53 = 116 (0x74)54 = 114 (0x72)55 = 117 (0x75)56 = 101 (0x65)57 = 125 (0x7D)58 = 125 (0x7D)59 = 0 (0x0)protocolType = {UsbCommunicator$ProtocolType@20949} "CONFIGURATION"

author: tomas123
author_rank: Frequent Contributor
timestamp: October 04, 2016, 08:47:08 am
content: @allstone@joe-cI forgot the make a documentation of the FlirOne control commands (see my last post) while debugging the SDK App.If you get some new informations, please post it hereThe deactivation of the automatic shutter maybe a interesting feature, because the 135 seconds intervall generates a absurd drift of 1.5 Kelvin:Quote from: tomas123 on January 23, 2016, 03:25:43 pm

author: allstone
author_rank: Contributor
timestamp: October 04, 2016, 11:35:12 am
content: Quote from: tomas123 on October 04, 2016, 08:47:08 amHm, sorry for asking, but does that mean that even with original app you cannot achieve real 0.1C temperature measurement changes, and they are more like 1-2K because of the shutter/FFC intervals? Or it means real temperature can differ from shown in Flir app 1-2C/1-2K ?Quote from: tomas123 on January 23, 2016, 03:25:43 pmOh wait, did you notice if it was calibrated for starting (up to 10 minutes) or for the stabilized (after 10min) in Flir One. Or maybe FFC and other calibration data already accounts for this and correct the shown temperature values accordingly ? I though this was done in other Flir devices at least when I were reading on documents on FFC to account for the heating up. Because noone wants either of two things: wait for heatup or see real values at once (but see them drifting over-time). So if calibration data was not correcting this temperature as seeing from the logs, then maybe Flir App is doing that then.Either way, I saw that Lepton 3 microbolometer is able to detect even 0.005C differences. That brings another question that I did not see answered: can Leptop 3 detect temperatures outside -20 to 150C (advertised as 120C, but I saw mentioning 150C in some posts who reads raw data) ? I wonder if Lepton just sees in that range but is more accurate on each pixel in regard of Raytheon in Seek which seems to be not as accurate for each pixel, but having wider range, or its something else like firmware limiting the temperatures.

author: tomas123
author_rank: Frequent Contributor
timestamp: October 04, 2016, 01:08:44 pm
content: yes, also with original Flir One App the temperature drifts like shown in the diagramm (20,0°C -> shutter -> immediately 19,2°C -> after 20 seconds 20,5°C -> one minute later you get the old value 20,0°C)It's better to reduce the shutter frequence after the warm up phase.The "real" temperature is another question.Quote from: allstone on October 04, 2016, 11:35:12 amLook at the diagram above. It shows a cold start of a switched off camera.This drift is a problem of the low cost Flir One. With my Flir E4 and Flir E40 this effect is significant lower.edit:Datasheet: Flir Lepton 3 thermal sensitivity <50 mK =0,050 K.This is a realistic value, but not so good like a upgraded E4. You see the difference ;-)QuoteTry Georgs Thermal Camera App. There is no temperature limit (but limited by SDK).

author: allstone
author_rank: Contributor
timestamp: October 04, 2016, 03:01:24 pm
content: Quote from: tomas123 on October 04, 2016, 01:08:44 pmYes but it does not make sense not to calibrate for cold start. If the sensor reacts this way, it should be calibrated to work from the start and to show correct values. Hm, will do some testing, mines already shipped, not long to wait.Here is Lepton 3 datasheethttp://www.file-upload.net/download-11989243/Lepton_Datasheet.pdf.html.There are some interesting points. For example, page 21, "Lepton 3 automatically prohibits the shutter from operating when it detects the temperature to be outside the range -10° C to +65° C. For example, if the camera is operating at a temperature of 70° C, no automatic FFC will be performed, and the camera will ignore any commanded FFC if the FFC mode is “automatic” or “manual.” ". Meaning if you want shutter control, there of course is another way - heat the thing up. Ok, do not listen to me, you can burn it. Just saying. Maybe E4 has heating element? Anyway, on page 57 Maximum Operating Temperature is -40 to +80C. Over that it shuts after some seconds has passed.Quote from: tomas123 on October 04, 2016, 01:08:44 pmYup, NETD is rated <50 mK (20 mK typical) according to datasheet at page 52.But temperature is rated 0 K to >400 K at the same page 52. Hm, that means realy -273.15 C to >+126.85 C , meaning this sensor can actually sense that temperature. Ok, maybe over 120C it is not as accurate (or it just dies and sees same values for any higher?), but I believe Seek over 120C is not very acccurate too. You think Flir SDK let us see this whole range really?Ok, I do not want to resurrect old discussions about the f. rate limit here, and firmware, etc, heck I do not even have the product in hands yet, well but being still careful, even though page 36 states that 26 frames are @8mhz, max @20mhz could be 60 or smth, and at page 42 you can see interesting statement "For each unique frame, two duplicates follow in the VoSPI stream", so this may as well be something different, but anyway what I am trying to say you know where the limit is (could be) implemented, so I wonder if temperature range is not limited there too.Quote from: tomas123 on October 04, 2016, 01:08:44 pmDefinitely. I think I will buy it anyway, need to support the community

author: tomas123
author_rank: Frequent Contributor
timestamp: October 04, 2016, 03:53:08 pm
content: Don't forget, that you have with the Flir One not a direct communication with the Lepton 3 sensor.And the FFC has (almost) nothing to do with it the "calibrated" radiometric mode.Try Georgs App and use your camera outside the regular temperature range.This is all what you can get with Windows software if you self decode the usb data stream of the Flir One.This is limited by the internal calculations around the "calibrated" radiometric mode.You can't read out the native SPI interface of the Flir One...Believe me, 20mK is impossible for the Flir One.50mK it's a lot. See this sample:Quote from: tomas123 on November 16, 2015, 11:58:16 am

author: allstone
author_rank: Contributor
timestamp: October 04, 2016, 05:15:04 pm
content: Quote from: tomas123 on October 04, 2016, 03:53:08 pmQuote from: tomas123 on October 04, 2016, 03:53:08 pmIs this a hardware limitation? Cause I have no problem connecting to the chip legs directly, but.. that is not my intention with Flir One, I could have bought just the sensor instead then. But I dont believe that there is a chip inside which would decode the original firmware at runtime, and that the firmware is inside unreadable EEPROM. Its just too small for such device.. with 2 cameras in it.Thanks. Enough information for starters. Dont get me wrong, I am not the professional in this field, I used PRO Flir device maybe once or twice, nothing fancy. My intention to use this at two of my houses to find insulation problems, see if cracks in a wall has any effect on it, also on the wires to see if they do not get too hot, find shorts maybe or bad connections early on before any real damage, then when testing laptops to see if they are not getting too hot somewhere and are not in need of better cooling or just cleaning, and lastly maybe on some electronics, but just 4fun (if I manage to buy ZnSe lenses for example). But I am a programmer so I will definitely meddle with it at some degree, as I meddle with any chip on my quadcopters, laptop EC/BIOS, car ECU, etc.

author: allstone
author_rank: Contributor
timestamp: October 10, 2016, 05:28:55 pm
content: Well I got Flir One G2 today. Works with my older micro USB Android 4.4.2 phone (I needed to root it and write OTG file to enable OTG functionality though). Still waiting for several micro usb to type-c otg adapters (or Ill solder my own otg adapter otherwise if they will not work) for my newer phone.Anyways, first impression is good. Although I tried it on my heated floor several times in the dark. Sometimes, tubes could be clearly visible, other times image was blurry. After some time it was again visible. Not sure, maybe together with internal clicking it is also re-focusing or something. Also I used it for 10-15 minutes, noticed temperatures were 2C lower than should be. But seeing your graph @tomas123 I had to use it for 45 minutes for temps to stabilise, but internal battery does not hold as long. How did you manage to use it that long? Was it attached to external power source during that time? Can it be used with external power source for longer periods while still connected to the phone? Anyways, wanted to try Thermal Camera application but it goes to Thanks screen and when pressing thanks keeps showing me same screen on my old phone. Flir Mobile Tools also does not work on older phone. Maybe will need to try on newer one when type-c situation is resolved.

author: Fraser
author_rank: Super Contributor
timestamp: October 10, 2016, 07:03:53 pm
content: Has anyone else noticed the number of used FLIR One G2 cameras appearing on the secondary market at ever decreasing prices ?I almost bought a faulty F1G2 last month for £80 but thought better of it as I already have one. In the last week I managed to buy an as new F1G2 Android for only £60 complete with box and accessories. I bought another today for £135.I am thinking that maybe the Thermal Revolution is coming to an end for many consumers as they realise it is a neat gadget for which they have no real use in everyday life. I suspect that we will see more F1G2 cameras selling at very reasonable prices. Who would buy a LEPTON3 now when a used F1G2 costs so much less on the secondary market.I wonder if FLIR sales of the F1G2 have, or are about to, take a steep downturn ?Interesting times. Fads come and go very quickly. May be good news for us 'hard core' users of the technology but sadly if the consumer market loses interest, we may see the likes of FLIR being less keen to invest in new developments for the low end consumer market.Food for thoughtFraser

author: allstone
author_rank: Contributor
timestamp: October 10, 2016, 07:49:22 pm
content: Quote from: Fraser on October 10, 2016, 07:03:53 pmNot sure where you bought it at such a cheap price? Anyway, Flir may be as well interested to kill consumer market. It is too cheap to make huge profit. I would never consider buying it if it would cost more than several hundred euro. It would then be better to go to lending office. Anyways, I still think it has huge potential. Not everything is discovered in this area yet too. Either Flir kills it or reveals potential good uses for it at home. I.e. what is the most common use for thermal imaging at home for consumer besides the fun factor? I mean what it is good for for casual people at home. To check on laptops temperature? To find out where the dog was sleeping at night? I mean one has to find why people would need this camera. If not, several days of usage and they sell it not having any potential usage for it..

author: Fraser
author_rank: Super Contributor
timestamp: October 10, 2016, 08:48:52 pm
content: Hi Allstone,FLIR are using the LEPTON 2 and 3 in more specialist products that have a definite market. namely the hunting/trekking/Maritime and trades-person tools. These markets will continue IMHO. It is the budget consumer phone accessory that I can see fading away over time. Maybe FLIR will do some more promotion of the technology, I do not know.My £60 FLIR ONE G2 Android was advertised locally in the newsagent and my £135 FLIR ONE G2 came off ebay today. Both sellers told me the same story. It was a fun gadget for a while but they then put it away and never used it again. How common this scenario must be... just like any consumer gadget bought without a real need for it. I should know, I am a prime offender in that area with test equipment !Is it just the UK where they are selling cheap on ebay then ? There have been several sold very cheaply of recent here. All with boxes paperwork etc so I do not think they are 'dodgy', just unwanted.Fraser

author: Macbeth
author_rank: Super Contributor
timestamp: October 10, 2016, 09:01:19 pm
content: Fraser, I know you are a Louis Rossmann fan but doesn't infuriate/amuse you how he checks for shorted ICs using heat detection with his lips and a regulated PSU (HP 6632A?)That same trick would be so much quicker and easier with a F1G2 for not much money at all.I have certainly used it. At least a few repairs allow me to justify the £200 and 2 month wait anyway! £60 is a no brainer.

author: Fraser
author_rank: Super Contributor
timestamp: October 10, 2016, 09:11:09 pm
content: Hi Macbeth,I have not been watching Louis of recent. The video channel went a bit 'off-tune' for my tastes.Yes I saw Louis using parts of his anatomy to check surface temperatures. He says be does not want to waste money on the thermal camera. Fair enough if his process works for him. It is only in very recent years that thermal cameras have been affordable to the 'common man' so we techs always tended to use sensitive parts of out bodies to check temperatures on IC's etcBurnt lips is not pleasant so most of us used a finger tip first, then the back of the hand, and lastly lips if feeling brave, I have never needed to go beyond the back of my hand though !I am biased. I love thermal imaging technology so no no excuse to use it in repairs. It helps me understand what is, or is not running properly on a PCB. Louis has his own approach though and I cannot criticise it if it works for him.I now own four F1G2 cameras as I want to experiment with one or two without having to worry about trashing £200+FraserFraser

author: frenky
author_rank: Unknown
timestamp: October 10, 2016, 09:21:52 pm
content: Now that you have mutiple F1G2 you could make a thermal VR headset.P.S.I watch Lois too and he is using soldering iron for about 1000$, microscope for about the same amount, but check for shorts with alcohol and hand.I do not know if he is aware of F1G2 existance...

author: Fraser
author_rank: Super Contributor
timestamp: October 10, 2016, 09:28:50 pm
content: Frenky,I already have the parts for a Thermal VR headset...... multiple sets of Olympus FMD200 and the better FMD700 headsetsFraser

author: -jeffB
author_rank: Regular Contributor
timestamp: October 10, 2016, 11:00:44 pm
content: Quote from: allstone on October 10, 2016, 07:49:22 pmWith a head-mounted or otherwise hands-free version, I'd use it ALL THE TIME for cooking.

author: allstone
author_rank: Contributor
timestamp: October 12, 2016, 02:28:55 pm
content: Quote from: -jeffB on October 10, 2016, 11:00:44 pm@-jeffB you can do ittry using USB extension cable from Flir to your phone, while the phone should be on your forearm (near wrist). Usb cable would then go from forearm, upper arm, should to your head, to the camera itself. You can attach camera to any cheap cap available. Now while cooking you just face the thing you are cooking in front, camera sees it as it is positioned so, you pull your wrist in front of you and you can just check the screen for the image.

author: Fraser
author_rank: Super Contributor
timestamp: October 12, 2016, 05:17:22 pm
content: How about an app that duplicates the image side by side on the phone and then you can use one of those cheap stereoscopic mobile phone VR headsets that I keep seeing

author: vze1lryy
author_rank: Regular Contributor
timestamp: October 12, 2016, 08:59:34 pm
content: Quote from: Macbeth on October 10, 2016, 09:01:19 pmKissing something that will later burn you is well within my zone of familiarity.The problem I've had with any thermal camera is that, I put it above the board, and 90% of the board turns red. So what is hot.. oh the entire board you say... well yes mr. thermal camera, I was aware the short is on the board? But where? It's infuriating! There are over 130 components within the range of the "red dot."When thermal cameras are 720p and $200 I will jump on it. I was so excited for this, and then I actually demo'd some $6000 FLIR cam and jeez.. absolutely amazing tool for telling where the cold air leaks are in my apartment, but I'd drive myself nuts using that present technology for troubleshooting.Just goes to show, use what works best for you!!

author: Macbeth
author_rank: Super Contributor
timestamp: October 12, 2016, 09:33:00 pm
content: Louis, you are not wrong. It is sometimes hard to appreciate how tiny the stuff you work with actually is! I really should get an Amscope and see for myself!

author: Fraser
author_rank: Super Contributor
timestamp: October 12, 2016, 11:10:24 pm
content: For high density 0402 type PCB work a thermal camera really needs to have a resolution of at least 320 x 240 pixels, and, importantly, it needs both span and centre temperature manual adjustment capability. It will also require the fitting of a decent close-up lens, as most cameras do not focus well at the very close range required for 0402. With such a configuration good thermal mapping may be carried out and individual components seen.If the camera is left in Auto span and centre temperature mode it will try to cover all bases and not provide the detail required for such work. By setting the span to a relatively small range the centre temperature may be increased and decreased to reveal the components that are operating at the different temperatures in an area if the board.. A full span view covering maximum to minimum temperatures in the FOV can also provide a useful overview on occasions but you can get the large area confusion detailed by Louis.Good PCB temperature profiling can be done with the right tools and effort. Is the F1G2 the camera for such tasks as Louis is involved with? IMHO, no. Does Louis need a thermal camera to do his job, IMHO his current methods work, so no.I am spoilt with the nice industrial cameras that I have in my collection so have not had problems working on PCB's. However I fully understand that such expensive camera technology used in Lois's situation would take a very long time to pay for itself, if ever.Cheap, budget cameras tend to disappoint. The latest Thermal Expert and similar cameras are getting better images though.For info, there are such things as thermal microscopes. I own the optics from such a unit. It has X15 magnificationI may use the lens assembly on another camera in the future.Frsser

author: Bill W
author_rank: Super Contributor
timestamp: October 14, 2016, 09:44:43 am
content: I find that the key to thermal camera fault finding, and indeed making sure the errant part does not catch fire before you fix it, is a very short power on. Even one second is enough to warm up the fault enough to see it and does not cause the red spread that Louis notes. All you need is 1 degree rise.For someone doing enough work, a day out spent making a camera using the core from a second hand fire cameras would surely be worthwhile. Yes it will have all the aesthetics of a brick but it would be free-standing, 320x240, video out or own display, manual focus and 30Hz, plus possibly manual gain / iris depending on model. Yours for somewhere around GBP250-500 and a bit of fun putting it together.regardsBill(who may have an interest in this suggestion)

author: allstone
author_rank: Contributor
timestamp: October 14, 2016, 10:52:48 am
content: Quote from: Bill W on October 14, 2016, 09:44:43 amI still would like to make Flir One work for that too. I will use it to find out which motor/ESC is bad or does not work correctly on my quadcopter. Or maybe if I have cold solder joints, as its a regular thing to resolder something on quadcopter. 320x240 not really a necessity, I believe good quality dots on lepton even smaller amount of them of 160x120, is ok. It is portable enough to bring to the field and check on quadcopter just after the flying session.

author: Fraser
author_rank: Super Contributor
timestamp: October 14, 2016, 01:31:01 pm
content: After Bill's comment i have to say, I love working on thermal cameras so I am very biased. That said ........The advantage of building your own 'thermal workbench' is that you, the user, can set it up as an overhead view PCB profiler with the right lens settings for the job, manual focus lens to as short a distance as you want (without needing a close-up auxiliary lens) and it will all cost a lot less than a commercial built camera. Such a system would be far more practical for electronics than messing around with a FLIR One G2 or SEEK camera.I am always amused when I see thermal fire fighting cameras being sold at knock down prices. Many people searching for a cheap thermal camera pass these by, thinking they are old or poor performance. Such could not be further from the truth. They were built to a standard rather than down to a price. They contain well known high quality imaging cores with superb large diameter Germanium lenses and may be stripped down easily. Just because a fire fighting thermal camera is built in a certain format, does not mean it has to stay in that format. As an example, the ARGUS 2's that I just repaired are basically a nice aluminium chassis onto which are bolted the self contained composite video Viewfinder PCB, EEV controller PCB, Raytheon Core PCB and Imaging sensor with Optical block attached. I have long intended to reformat one of these cameras into a more lab friendly format. You could even have the imaging core separated from the EEV controller and viewfinder boards, like the LAB cameras that had the CCD head separate form the rest of the camera electronics.Well that is enough of my off F1G2 topic comment but potential FLIR One G2 owners should consider some of the more bulky thermal camera formats if they have the ability to remodel such to a custom solution that better suits their needs.Fraser

author: Fraser
author_rank: Super Contributor
timestamp: October 14, 2016, 02:27:02 pm
content: A word of caution to those thinking of using a thermal camera to monitor solder joints. Such are highly reflective and have very poor emissivity. As such you see your own body heat reflected off of them. The solder joint surface temperature is very hard to measure unless a high emissivity coating has been applied to it first. It would be possible to see localised heating of the PCB around a poor quality high current solder joint. Much depends upon the exact topology of the PCB being examined.A FLIR One G2 would really need a close-up lens in order to make any sense of a modern model flight controller. They are small.Fraser

author: faboaic
author_rank: Newbie
timestamp: October 17, 2016, 04:55:17 am
content: Quote from: vze1lryy on October 12, 2016, 08:59:34 pmit depends on the density, etc.From my point of view it can be good enough for many things.E.g. a defective ESC on the quadcopter:https://youtu.be/81KTsn3Yo1khttps://youtu.be/qxtDaJcAIm4Cheers,Fabian

author: allstone
author_rank: Contributor
timestamp: October 17, 2016, 10:49:42 am
content: Quote from: faboaic on October 17, 2016, 04:55:17 amExactly! And when u see on esc which part is overheating, you can always place a small heatsink on that part as to better dissipate the heat if you haven't got a spare on hands.

author: G0MJW
author_rank: Regular Contributor
timestamp: November 12, 2016, 11:16:47 am
content: Hi AllI am having some issues getting this to work on the lastest RPI raspian distribution. Its a newer kernel which may be an issue but I think the real problem is the steps are scattered all over this thread so its not really clear what needs to be done and which is the latest driver e.g. flir8p1 is newer than flir8l3. 8p1 contains an already compiled executable but I can't clean and remake it, whereas I can with 8l3 but both give the same error which is an issue with v4l.[ 2494.720659] usb 1-1.4: new high-speed USB device number 7 using dwc_otg[ 2494.822165] usb 1-1.4: New USB device found, idVendor=09cb, idProduct=1996[ 2494.822191] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3[ 2494.822208] usb 1-1.4: Product: FLIR ONE Camera[ 2494.822225] usb 1-1.4: Manufacturer: FLIR Systems[ 2494.822241] usb 1-1.4: SerialNumber: FLIRONEF03G4F004AFFsudo ./flir8p1 Rainbow.rawSuccessfully find the Flir One G2 deviceSuccessfully set usb configuration 3Successfully claimed interface 0,1,2using output device: /dev/video2flir8p1: flir8p1.c:168: startv4l2: Assertion `fdwr1 >= 0' failed.sudo ./flir8l3Successfully find the Flir One G2 deviceSuccessfully set usb configuration 3Successfully claimed interface 0,1,2using output device: /dev/video1flir8l3: flir8l3.c:136: startv4l2: Assertion `fdwr0 >= 0' failed.ls -al /dev/video*ls: cannot access /dev/video*: No such file or directoryv4l-utils and v4l2loopback are both installed.:pi@raspberrypi:~/flir8l3 $ dpkg --get-selections |grep v4llibv4l-0:armhf installlibv4l-dev:armhf installlibv4l2rds0:armhf installlibv4lconvert0:armhf installv4l-utils installv4l2loopback-dkms installSo why the assertion error? Note this PI works fine with a webcam. I am missing a driver installation step - hence the request for a procedure.MikePostscriptI 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 fromhttps://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/You need to know your kernel:$ uname -aLinux raspberrypi 4.4.21-v7+ #911 SMP Thu Sep 15 14:22:38 BST 2016 armv7l GNU/LinuxDownload the appropriate headers and install with:$ sudo dpkg -i /home/pi/linux-headers-4.4.21-v7+_4.4.21-v7+-2_armhf.debIts important to get the right ones, your world might end otherwise. Then you can download and make:$ git clonehttps://github.com/umlaeute/v4l2loopback$ cd v412loopback$ sudo make [I needed sudo - normally you don't]$ sudo make installBut 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,3I an not running a gui so to make it do something useful I piped it to another PC and opened it in vlc (rtp://@:1234) based on the advice further up this thread:From the directory I compiled the flir package in I ran:$ sudo ./flir8p1 Rainbow.rawand in another terminalThis needs avtools$ sudo apt-get install libav-tools$ avconv -f video4linux2 -i /dev/video3 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.1.100:1234

author: tomas123
author_rank: Frequent Contributor
timestamp: November 13, 2016, 04:47:00 pm
content: Hi Mike,Now flir8p1 with v4l works fine?(Sorry but currently I'm not working with my raspberry pi.)

author: G0MJW
author_rank: Regular Contributor
timestamp: November 17, 2016, 08:22:59 pm
content: Hi Thomas - not the version that comes with Jessie-lite. It seems to be necessary to compile the loopback module but that means getting the kernel headers and these are not where they should be but need to be downloaded from the site I mentioned.

author: rbalint
author_rank: Newbie
timestamp: November 21, 2016, 10:09:24 pm
content: Quote from: tomas123 on August 02, 2016, 09:13:43 amBased on the PM discussion with tomas123 I added copyright info to the files. Tomas123 kindly agreed to license the code and other content under GPL 2+ and I think I tracked down the origin of font5x7.h, too.Clarifying licensing is needed because I would like to add some improvements and share it on GitHub - I'll post the repository URL here.

author: cynfab
author_rank: Regular Contributor
timestamp: November 21, 2016, 11:11:01 pm
content: You are welcome.

author: tomas123
author_rank: Frequent Contributor
timestamp: November 22, 2016, 04:05:59 pm
content: Quote from: rbalint on November 21, 2016, 10:09:24 pmI agree with the GPL license.Please post the link to your github project.

author: pbash
author_rank: Newbie
timestamp: November 26, 2016, 10:36:15 pm
content: Thanks to Tomas and Cynfab for the great work on the Flir One G2 and the flir8p1.c program that I am using stream thermal images.I'm looking to improve the accuracy of the temperature readings and have extracted most of the calibration constants from CameraFiles.zip and updated Planck.h:.calib.extRBF.ds120C_weRB_apNOA_fiNOF_le.B double 1494.1 PlanckB.calib.extRBF.ds120C_weRB_apNOA_fiNOF_le.F double 1 PlanckF.calib.extRBF.ds120C_weRB_apNOA_fiNOF_le.J0 double 1223 Planck0.calib.extRBF.ds120C_weRB_apNOA_fiNOF_le.J1 double 81.587158.calib.extRBF.ds120C_weRB_apNOA_fiNOF_le.R double 20628.172 PlanckR1However, I cant find the PlanckR2 constant for my camera in calib.rsc and hence using the default value from the planck.h file. Unfortunately, I dont have an Android phone to get an image file that I have seen can be used with exiftool to obtain the values. Appreciate any pointers on how to find PlanckR2 and again thanks for the great work.

author: tomas123
author_rank: Frequent Contributor
timestamp: November 27, 2016, 03:58:01 pm
content: this is a good questionI will help you:from my radiometric jpg:Code:$ exiftool -planck* flir_20160319T173259.jpgPlanck R1 : 16528.178Planck B : 1427.5Planck F : 1Planck O : -1307Planck R2 : 0.012258549from CameraFiles.zipCode:$ grep CameraFiles/system/calib.rsc.calib.extRBFCalc.curData.cProt.ds120C_weRB_apNOA_fiNOF_leExFOL2.const text "R 16528, B 1427.5, F 1.00 (J0 1307, J1 81.575722)"1/81.575722=0.01225854918(-1)*-1307 = 1307

author: Uho
author_rank: Frequent Contributor
timestamp: November 28, 2016, 05:56:59 pm
content: The use of macro lens with a 25mm focal. With germanium lens 15mm focal seen the sweat glands on the hand.

author: tomas123
author_rank: Frequent Contributor
timestamp: December 08, 2016, 08:41:29 am
content: 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".Quote from: G0MJW on November 12, 2016, 11:16:47 amhere my steps on with clean raspberry pi installationCode:$ uname -aLinux raspberrypi 4.4.34+ #930 Wed Nov 23 15:12:30 GMT 2016 armv6l GNU/Linuxhttps://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi// linux-headers-4.4.34+_4.4.34+-2_armhf.debhttps://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-4.4.34%2B_4.4.34%2B-2_armhf.deb$ sudo apt-get install bc$ sudo dpkg -i linux-headers-4.4.34+_4.4.34+-2_armhf.deb...HOSTCC scripts/conmakehashHOSTCC scripts/recordmcountHOSTCC scripts/sortextablemake: 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-dkmsReading package lists... DoneBuilding dependency treeReading state information... DoneThe following extra packages will be installed:dkmsSuggested packages:v4l2loopback-utilsThe following NEW packages will be installed:dkms v4l2loopback-dkms0 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] YGet: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 digitIt is likely that 4.4.34+ belongs to a chroot's hostBuilding 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 v4llibv4l-0:armhfinstalllibv4l-dev:armhfinstalllibv4l2rds0:armhfinstalllibv4lconvert0:armhfinstallv4l-utilsinstallv4l2loopback-dkmsinstall$ git clone https://github.com/umlaeute/v4l2loopbackCloning 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 1548Receiving 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 makeBuilding v4l2-loopback driver...make -C /lib/modules/`uname -r`/build M=/home/pi/v4l2loopback modulesmake: Entering directory '/usr/src/linux-headers-4.4.34+'CC  /home/pi/v4l2loopback/v4l2loopback.oBuilding modules, stage 2.MODPOST 1 modulesCC /home/pi/v4l2loopback/v4l2loopback.mod.oLD  /home/pi/v4l2loopback/v4l2loopback.komake: Leaving directory '/usr/src/linux-headers-4.4.34+'$ sudo make installmake -C /lib/modules/`uname -r`/build M=/home/pi/v4l2loopback modules_installmake: Entering directory '/usr/src/linux-headers-4.4.34+'INSTALL /home/pi/v4l2loopback/v4l2loopback.koDEPMOD 4.4.34make: 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,3insmod: ERROR: could not insert module /lib/modules/4.4.34/extra/v4l2loopback.ko: Unknown symbol in modulePS: 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

author: tomas123
author_rank: Frequent Contributor
timestamp: December 10, 2016, 03:32:51 pm
content: I answer myselfQuote from: G0MJW on November 12, 2016, 11:16:47 amYes, modprobe doesn't work.....but insmod doesn't load needed dependencies.I found thishttps://github.com/umlaeute/v4l2loopback/issues/94Quotelets test it and preload the videodev.koCode:pi@raspberrypi:~/v4l2loopback $ sudo insmod ./v4l2loopback.koinsmod: ERROR: could not insert module ./v4l2loopback.ko: Unknown symbol in modulepi@raspberrypi:~/v4l2loopback $ sudo modprobe videodevpi@raspberrypi:~/v4l2loopback $ sudo insmod ./v4l2loopback.kopi@raspberrypi:~/v4l2loopback $ lsmodModule Size Used byv4l2loopback 26994 0videodev 172779 1 v4l2loopbackmedia 16312 1 videodev...v4l2loopback is succesfull loaded!!Code:$ ls /dev/video*/dev/video0

author: G0MJW
author_rank: Regular Contributor
timestamp: December 11, 2016, 11:28:04 pm
content: Well done! Now we need to get it automated.Meanwhile, my ZnSe lens arrived which will be interesting for close ups.Mike

author: Ben321
author_rank: Frequent Contributor
timestamp: January 17, 2017, 04:36:44 am
content: 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 = 09CBPID = 1996I 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)?

author: tomas123
author_rank: Frequent Contributor
timestamp: January 17, 2017, 05:03:55 pm
content: ask joe-c, he is working on a driver for Thermovision_JoeCQuote from: joe-c on October 03, 2016, 09:01:14 pm

author: Ben321
author_rank: Frequent Contributor
timestamp: January 17, 2017, 05:54:51 pm
content: Quote from: tomas123 on January 17, 2017, 05:03:55 pmI 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.

author: Ben321
author_rank: Frequent Contributor
timestamp: January 17, 2017, 09:50:07 pm
content: 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?

author: joe-c
author_rank: Frequent Contributor
timestamp: January 17, 2017, 10:37:38 pm
content: 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.UseSeekthermal.cs->FlirOneG2Class->public byte[] GetFrame_asBytes()as entry point with the debugger.good luckjoe-c

author: Ben321
author_rank: Frequent Contributor
timestamp: January 17, 2017, 11:41:26 pm
content: Quote from: joe-c on January 17, 2017, 10:37:38 pmZadig 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?

author: Ben321
author_rank: Frequent Contributor
timestamp: January 17, 2017, 11:45:11 pm
content: Quote from: allstone on October 03, 2016, 12:36:22 pmWith 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?

author: Ben321
author_rank: Frequent Contributor
timestamp: January 17, 2017, 11:58:35 pm
content: 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:QuoteI hope somebody will find this useful in debugging Joe-C's program.

author: Ben321
author_rank: Frequent Contributor
timestamp: January 19, 2017, 08:08:12 pm
content: 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.

author: joe-c
author_rank: Frequent Contributor
timestamp: January 19, 2017, 09:05:11 pm
content: 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.

author: Ben321
author_rank: Frequent Contributor
timestamp: January 19, 2017, 09:51:56 pm
content: Quote from: joe-c on January 19, 2017, 09:05:11 pmYou 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.

author: joe-c
author_rank: Frequent Contributor
timestamp: January 20, 2017, 05:12:31 am
content: 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/#msg819493additional its good to read the messages before and after this post.

author: gtoal
author_rank: Newbie
timestamp: January 25, 2017, 06:24:14 am
content: Quote from: G0MJW on December 11, 2016, 11:28:04 pmCasual 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:#!/bin/bashKERNEL_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 https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-${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 https://github.com/umlaeute/v4l2loopback"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 0offhand 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

author: Mohanad
author_rank: Newbie
timestamp: January 25, 2017, 02:42:06 pm
content: HelloI'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

author: Ben321
author_rank: Frequent Contributor
timestamp: January 27, 2017, 03:28:09 am
content: 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?

author: Ben321
author_rank: Frequent Contributor
timestamp: February 05, 2017, 05:38:03 am
content: 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.

author: tomas123
author_rank: Frequent Contributor
timestamp: February 05, 2017, 01:45:57 pm
content: There is no latest = best versionIf 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/#msg839518for v4l see this and the following post:https://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg840976/#msg840976

author: Ben321
author_rank: Frequent Contributor
timestamp: February 09, 2017, 05:00:33 am
content: Quote from: tomas123 on February 05, 2017, 01:45:57 pmI 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?

author: RTouris
author_rank: Newbie
timestamp: February 09, 2017, 10:53:27 am
content: 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.

author: Fraser
author_rank: Super Contributor
timestamp: February 09, 2017, 01:25:47 pm
content: 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

author: RTouris
author_rank: Newbie
timestamp: February 09, 2017, 05:16:23 pm
content: 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

author: tomas123
author_rank: Frequent Contributor
timestamp: February 10, 2017, 08:52:39 am
content: Quote from: Ben321 on February 09, 2017, 05:00:33 amYes, I understand your problem, but there are two steps:(1) USB communication with F1G2(2) video stream in windowsI 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

author: Ben321
author_rank: Frequent Contributor
timestamp: February 17, 2017, 10:18:03 pm
content: Quote from: tomas123 on February 10, 2017, 08:52:39 amThe Windows has an equivalent to V4L (video for Linux). It's called VFW (video for Windows). In order to use the VFW framework, you simply need to write a VFW driver for the device in question. In this case, the device is the FLIR One Gen2. VFW supports a number of different video formats, but unfortunately 16bit grayscale isn't one of them. However, I can think of a potential workaround. That workaround, is to write a driver based on YUYV. This way the driver will accept 16bits of data (YU bytes on the first pixel, and YV bytes on the second pixel, etc). Now, once the driver is written and compiled, and you access your F1G2 from within your own software using the VFW driver, will the preview window interpret this as YUYV color data, and the preview window will show it incorrectly. However the VFW framework allows you to write your own video stream callback function in your program, and using this feature you will be able to access the raw pixels, and write your own code that does not process it as YUYV color data, and instead handle it correctly as 16bit grayscale data.All I need now, is to find a member of these forums, who's willing to take their time and write a VFW driver for the F1G2.

author: djcasper
author_rank: Newbie
timestamp: February 28, 2017, 04:14:28 pm
content: Hello.I have tried your example of extracting jars and when I do the steps you provided I only get 1 jar file. If i look in exploded view on the sample project i can see the jars but cant edit them. I'm trying to get an editable version of the new 1.2.8 sdk to work with because the basis 04 that was posted is very bad and has overflow errors which you can see in 14 bit linear mode near hot items above its max temp. when i use the new flir one sdk this does not happen.also many bugs are removed i the newer sdk.I have been laying around with the 04 bundle but now im at a halt because of the faults it has.i have tried to do each step and i just cant seem to get all this done with the new 1.2.8 sdk.any help would be appreciated.Quote from: tomas123 on December 13, 2015, 08:43:53 am

author: tomas123
author_rank: Frequent Contributor
timestamp: March 01, 2017, 08:51:27 am
content: As I wrote earlier, there is no click to run solution for getting working java code from a aar file (binary code).You must manuell debug the source code fragments and stitch to your project until all works fine.The link above to stackoverflow is a good entry point.Test it with differents decompilers, because different decompilers deliver differents results.Make the best of them.--------see alsoApkTookhttp://ibotpeaches.github.io/Apktool/dex2jarhttp://sourceforge.net/projects/dex2jar/decompiler:JD-GUIhttps://github.com/java-decompiler/jd-guibytecode-viewerhttps://github.com/Konloch/bytecode-viewerand don't forget the decompiler in Android Studio

author: djcasper
author_rank: Newbie
timestamp: March 07, 2017, 09:38:56 am
content: DO NOT USE THIS IF YOUR GOING TO USE GOOGLE PLAY!!!!!THIS CODE JUT GOT ME IN BIG TROUBLE WITH GOOGLE THEY SUSPENDED IT SAYING IT WAS MALICIOUS I ALREADY HAVE 3 SUSPENSIONS SO NOW I HAVE 4 I DARE NOT EVEN UPDATE MY CURRENT APPS OR EVER UPLOAD A NEW APP AP AGAIN IN CASE ,Y ACCOUNT GETS CLOSED. IT JUST PROVES USING SAMPLES ONLINE IS VERY DANGEROUS AND UNLESS YOU HAVE WRITTEN IT YOUR SELF STAY AWAY.LIBPNG LIBRARY HAS VULNERABILITIES THAT COME UNDER "MALICIOUS BEHAVIOUR" AND THE USER DATA POLICY ALL VOILATED!!!!NO HAPPY AT WHAT THE CONTENTS OF THIS SITE HAVE DONE TO MY GOOGLE PLAY DEV ACCOUNT.THANKS VERY MUCH I REALLY APRECIATE ALL YOUR HELP AND THE FACT THAT ITS ALMOST CLOSED MY GOOGLE ACCOUNT.Quote from: tomas123 on November 13, 2015, 01:21:25 pm

author: djcasper
author_rank: Newbie
timestamp: March 07, 2017, 09:42:39 am
content: HERES THE SCREENSHOT OF MY EMAIL FROM GOOGLE PLAY.

author: Fraser
author_rank: Super Contributor
timestamp: March 07, 2017, 12:16:49 pm
content: Djcasper,Sorry to hear you are having some issues with others code that you have decided to use in your application.I do find your post amusing however. Where did you read that all code on this forum developed by others is 'safe' and 'perfect' . A developer should be aware of the risks of using code written by others.People on this forum have tried to assist you, please do not get annoyed with them if something goes wrong...... it is development after all !Now to your Google Play problem.........Have you considered writing to Google and explaining what you have been developing and the fact that there was no malicious intent ? Such may be looked upon favourably and the strike removed. I see that you say you have previous strikes against your account. Maybe you need to determine how to test your developer code before exposing Google Play to it ? Ask Google for advice or go to a Android developer forum To seek such. In my world we operated pre-prop systems to test code before uploading it into a live environment. Maybe such exists for Android ?Please do not get angry against fellow developers, that can only lead to you being ignored when asking for help in the future.Time for a deep breath and a carefully crafted email to Google, and then maybe, a less vitriolic post on this forum that is not in capitals ?There are some very good, friendly and helpful people on this forum. Do not alienate them. They are just trying to offer help and remember, they are doing so in their own time and without reward. Perfect they are not, neither do they deserve to be subjected to angry posts for a possible error that they have made.Just my thoughts. Feel free to do with them what you will.Fraser

author: djcasper
author_rank: Newbie
timestamp: March 07, 2017, 06:46:18 pm
content: Hello,I get what your saying now i'm a little calmer.I'm am sorry for the way i reacted. There really is no need.Because my android programming is limited I try to understand the best i can.My apps I have made took many days whereas an experienced programmer for android could do it in a hour maybe half.I was annoyed because there was an older editable version and no matter how im told to do it i don't get it.I have decompiled the java and tried everything to get the upto date version working so i can actually move on and play around.I have lots of exp with hacking but unfortunately i reprogramed chips eproms hex codes for modified items that saved people a lot of money over the years but on wont say in public on what. .I feel when I can get going I have a lot to offer on reverse engineering the flir and theres a few things I want to do when I get this updated 1.2.8 i think it is in an editable manner then I can work on raw data and do some reprogramming on the actual hardware calls. I believe the things i want to do will greatly improve the improvements already done which with the help of this forum I managed to do as said to achieve the bigger images sizes and stop them over writing them. which i am thankful for.Ive even been willing to pay anybody who will send me a working 1.2.8 version where i can edit all the files from within the .aar file namely the java thats how much I want to get this going.I love the fact that flir allow apps to be made but I love the fact that you can do so much more when restrictions are removed such as imported java that you cant edit.Most can do this with ease I cant because Its not something I do ... yetAnyway my other apps did have issues down to me not backing up older projects and reusing parts of others to update an existing app and leaving the old google add code in. silly little things like ads on an app that links to youtube somewhere and because it has ads on they pretty much made me update however with no help from them to find out what my problems was i would try fid the issue resubmit then end up suspended.This however they seen as malicious intent due to new regulations on libpng which come in to effect in september or from now on any new updates to existing apps or any new apps.i assume it was the streaming they didnt like and i removed it however i have no idea where this libpng is so i cant even go ahead and rename the project and try again incase i get my google account blocked totally.anyways sorry once again im trying so hard with this spending everyday and getting nowhere at all.

author: tomas123
author_rank: Frequent Contributor
timestamp: March 08, 2017, 12:00:31 am
content: Quote from: djcasper on March 07, 2017, 09:38:56 amWhat do you mean exactly with your warn about my raspberry pi code written for a linux system?https://support.google.com/faqs/answer/7011127?hl=enChange your Libpng version!

author: tomas123
author_rank: Frequent Contributor
timestamp: March 08, 2017, 08:55:58 am
content: Ah, I see...(1) For reverse engineering of the Flir one USB protocol I debugged with user cynfabthe traffic between the camera and an Android system.(2) For this purpose I decompiled some Flir java libraries in 2015 (proof of concept).(3) 16 month later you upload own code with the manipulated Flir SDK (from my code) to the google play store(4) You violate the law, because the terms of licence from the Flir One SDK prohibit the manipulation of the SDK(5) Be happy, that Google refused your apk, because the outdated Flir SDK from 2015 used an old Libpng version

author: da-nie
author_rank: Contributor
timestamp: March 09, 2017, 03:48:39 pm
content: Hello! My english is bad (I studied German,But did not learn) . Sorry.I buy Flir One Gen 2. I connect Flir One to PC. I read this thema and create my programm for Windows XP. Tomas123, many thanks for the your program!I use usblib v1.26, but ep 0x83 and ep 0x85 received is error: "libusb0-dll:err  submitting request failed, win error: The parameter is incorrect".Algorithm:1) usb_init(); usb_find_busses(); usb_find_devices().2) Find device. USBDeviceHandle=usb_open(dev).3) usb_set_configuration(USBDeviceHandle,3).4) usb_claim_interface(USBDeviceHandle,0); usb_claim_interface(USBDeviceHandle,1); usb_claim_interface(USBDeviceHandle,2).5) Stop inerface 1 and 2.usb_control_msg(USBDeviceHandle,1,0x0b,0,2,data,0,100); - Why "0"?usb_control_msg(USBDeviceHandle,1,0x0b,0,1,data,0,100) - Why "0"?6) Start interface 1.usb_control_msg(USBDeviceHandle,1,0x0b,1,1,data,0,100) - Why "0"?7) Read 0x81: usb_bulk_read(USBDeviceHandle,0x81,Data,SizeOfData,10);Read 0x83: usb_bulk_read(USBDeviceHandle,0x83,Data,SizeOfData,10);9) Start interface 2.usb_control_msg(USBDeviceHandle,1,0x0b,1,2,data,2,200) - Why "2"?10) Read 0x81: usb_bulk_read(USBDeviceHandle,0x81,Data,SizeOfData,10);11) Read 0x83: usb_bulk_read(USBDeviceHandle,0x83,Data,SizeOfData,10);12) Read frame: usb_bulk_read(USBDeviceHandle,0x85,Data,SizeOfData,100);13) go to 10In line 11,12 received error (The parameter is incorrect). In line 10 - time out.Maybe someone knows what the problem is? Thanks.Programm (russian language in log file and text!).

author: tomas123
author_rank: Frequent Contributor
timestamp: March 10, 2017, 08:30:41 am
content: You are the third user who tries to compile this code with windows (without success).I think, the best way is to debug my working code with a Linux machine like Raspi (don't try a virtual machine!!).You can also boot from an Ubuntu Live Media.Then you can debug all binary packets and compare the usb traffic witth your windows machine.Maybe that the overlaying usb library under windows not all transfer byte are identical with the linux usb library.As I wrote the linux code I compared all transfer bytes with the logfile from cynfabs usb sniffer (see top ofv this thread).And this was very tricky. The F1 is a diva. I guess there are somecritical timings and you need some delayshere is a sample from my first steps in 2015Code:$ ./flirSuccessfully find the Flir One G2 devicelibusb_control_transfer(devh, DATA0: 80 06 00 01 00 00 12 00DATA1: 12 01 00 02 00 00 00 40 cb 09 96 19 08 01 01 02 03 01libusb_control_transfer(devh, DATA0: 80 06 00 02 00 00 09 00DATA1: 09 02 60 00 03 03 04 c0 00libusb_control_transfer(devh, DATA0: 80 06 00 02 00 00 60 00DATA1: 09 02 60 00 03 03 04 c0 00 09 04 00 00 02 ff f0 00 05 07 05 81 02 00 02 00 07 05 02 02 00 02 01 09 04 01 01 00 ff f0 01 06 09 04 01 00 02 ff f0 01 06 07 05 83 02 00 02 00 07 05 04 02 00 02 01 09 04 02 01 00 ff f0 01 07 09 04 02 00 02 ff f0 01 07 07 05 85 02 00 02 00 07 05 06 02 00 02 01libusb_get_string_descriptor langid=0x409String descriptor 2: "FLIR ONE Camera"String descriptor 1: "FLIR Systems"String descriptor 3: "FLIRONEF03F8O0FAFFF"Successfully set usb configuration 3String descriptor 4: "SBIBDP Configuration"String descriptor 5: "iAP Interface"String descriptor 6: "com.flir.rosebud.fileio"String descriptor 7: "com.flir.rosebud.frame"Successfully claimed interface 0,1,2stop interface 2 FRAMEstop interface 1 FILEIOstart interface 1 FILEIO: Mon Dec 7 09:55:58 2015Mon Dec 7 09:55:58 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x81: LIBUSB_ERROR_TIMEOUTMon Dec 7 09:55:59 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x83: LIBUSB_ERROR_OTHERMon Dec 7 09:56:00 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x85: LIBUSB_ERROR_IO: Mon Dec 7 09:56:01 2015bulk read EP 0x81, actual length 535HEX:cc 01 00 00 01 00 00 00 07 02 00 00 77 60 0c bd 7b 22 74 79 70 65 22 3a 22 73 6c 65 64 49 6e 66 6f 72 6d 61 74 69 6f 6e 22 2c 22 64 61 74 61 22 3a 7b 22 73 65 72 69 61 6c 4e 75 6d 62 65 72 42 6f 61 72 64 22 3a 22 46 30 33 46 38 4f 30 30 41 46 46 22 2c 22 70 61 72 74 4e 75 6d 62 65 72 42 6f 61 72 64 22 3a 22 32 31 32 30 30 31 36 30 32 30 31 22 2c 22 76 65 72 73 69 6f 6e 42 6f 61 72 64 22 3a 22 44 22 2c 22 73 65 72 69 61 6c 4e 75 6d 62 65 72 4c 65 70 74 6f 6e 22 3a 22 33 37 31 38 37 31 22 2c 22 76 65 72 73 69 6f 6e 4c 65 70 74 6f 6e 22 3a 22 33 2e 31 2e 34 36 22 2c 22 6c 65 70 74 6f 6e 51 52 22 3a 22 41 30 33 37 31 38 37 31 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 46 61 63 74 6f 72 79 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 4f 70 65 72 61 74 69 6f 6e 61 6c 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 55 70 64 61 74 65 72 45 53 57 22 3a 22 30 2e 34 2e 32 37 22 2c 22 76 65 72 73 69 6f 6e 52 6f 73 65 62 75 64 41 50 49 22 3a 22 6d 61 73 74 65 72 2e 30 31 35 65 64 65 34 22 2c 22 67 69 74 52 65 76 69 73 69 6f 6e 22 3a 22 6d 61 73 74 65 72 2e 30 31 35 65 64 65 34 22 2c 22 61 75 74 6f 6d 61 74 69 63 53 68 75 74 74 65 72 22 3a 22 59 22 2c 22 66 6f 72 6d 46 61 63 74 6f 72 22 3a 22 64 6f 6e 67 6c 65 22 2c 22 74 68 65 72 6d 61 6c 48 65 69 67 68 74 22 3a 22 31 32 30 22 2c 22 74 68 65 72 6d 61 6c 57 69 64 74 68 22 3a 22 31 36 30 22 2c 22 62 69 67 45 6e 64 69 61 6e 54 68 65 72 6d 61 6c 22 3a 22 30 22 2c 22 6f 70 65 72 61 74 69 6e 67 4d 6f 64 65 22 3a 22 6f 70 65 72 61 74 69 6f 6e 61 6c 22 7d 7d 00STRING:?w`?{"type":"sledInformation","data":{"serialNumberBoard":"F03F8O0FAFF","partNumberBoard":"21200161301","versionBoard":"D","serialNumberLepton":"371871","versionLepton":"3.1.46","leptonQR":"A0371871","versionRosebudFactoryESW":"0.4.27","versionRosebudOperationalESW":"0.4.27","versionRosebudUpdaterESW":"0.4.27","versionRosebudAPI":"master.015ede4","gitRevision":"master.015ede4","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatingMode":"operational"}}Mon Dec 7 09:56:01 2015>>>>>>>>>>>>>>>>>bulk transfer (in) 0x85: LIBUSB_ERROR_PIPE: Mon Dec 7 09:56:02 2015bulk read EP 0x81, actual length 282HEX:cc 01 00 00 01 00 00 00 54 00 00 00 55 14 30 67 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 56 6f 6c 74 61 67 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 76 6f 6c 74 61 67 65 22 3a 33 2e 36 39 30 30 30 30 30 35 37 32 32 30 34 36 2c 22 70 65 72 63 65 6e 74 61 67 65 22 3a 31 31 7d 7d 00 cc 01 00 00 01 00 00 00 45 00 00 00 af 24 95 8f 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 43 68 61 72 67 69 6e 67 43 75 72 72 65 6e 74 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 63 68 61 72 67 69 6e 67 43 75 72 72 65 6e 74 22 3a 30 7d 7d 00 cc 01 00 00 01 00 00 00 51 00 00 00 67 e4 ee 50 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 43 68 61 72 67 69 6e 67 53 74 61 74 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 63 68 61 72 67 69 6e 67 53 74 61 74 65 22 3a 22 73 74 61 74 65 4e 6f 43 68 61 72 67 69 6e 67 22 7d 7d 00STRING:?TU0g{"type":"batteryVoltageUpdate","data":{"voltage":3.69000005722046,"percentage":11}}?E?$??{"type":"batteryChargingCurrentUpdate","data":{"chargingCurrent":0}}?Qg??P{"type":"batteryChargingStateUpdate","data":{"chargingState":"stateNoCharging"}}ask for CameraFiles.zip on EP 0x83:: Mon Dec 7 09:56:02 2015To be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 41 00 00 00 f8 b3 f7 00 ]Write successful!To be sent: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}Write successful!Sent 65 bytes with string: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}To be sent Hexcode: 16 Bytes[ cc 01 00 00 01 00 00 00 33 00 00 00 ef db c1 c1 ]Write successful!To be sent 51 Bytes: {"type":"readFile","data":{"streamIdentifier":10}}Write successful!Sent 51 bytes with string: {"type":"readFile","data":{"streamIdentifier":10}}: Mon Dec 7 09:56:02 2015: Mon Dec 7 09:56:02 2015bulk read EP 0x81, actual length 16HEX:cc 01 00 00 01 00 00 00 5d 00 00 00 df 5b 38 1aSTRING:?]?[8: Mon Dec 7 09:56:02 2015bulk read EP 0x81, actual length 93HEX:7b 22 74 79 70 65 22 3a 22 6f 70 65 6e 46 69 6c 65 53 74 61 74 75 73 22 2c 22 64 61 74 61 22 3a 7b 22 70 61 74 68 22 3a 22 43 61 6d 65 72 61 46 69 6c 65 73 2e 7a 69 70 22 2c 22 73 74 72 65 61 6d 49 64 65 6e 74 69 66 69 65 72 22 3a 31 31 2c 22 6d 6f 64 65 22 3a 22 72 22 7d 7d 00STRING:{"type":"openFileStatus","data":{"path":"CameraFiles.zip","streamIdentifier":11,"mode":"r"}}: Mon Dec 7 09:56:04 2015: Mon Dec 7 09:56:06 2015bulk read EP 0x81, actual length 99HEX:cc 01 00 00 01 00 00 00 53 00 00 00 ec 2c e7 fa 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 56 6f 6c 74 61 67 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 76 6f 6c 74 61 67 65 22 3a 33 2e 36 38 30 30 30 30 30 36 36 37 35 37 32 2c 22 70 65 72 63 65 6e 74 61 67 65 22 3a 31 31 7d 7d 00STRING:?S?,??{"type":"batteryVoltageUpdate","data":{"voltage":3.6800000667572,"percentage":11}}: Mon Dec 7 09:56:08 2015bulk read EP 0x81, actual length 100HEX:cc 01 00 00 01 00 00 00 54 00 00 00 55 14 30 67 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 56 6f 6c 74 61 67 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 76 6f 6c 74 61 67 65 22 3a 33 2e 36 39 30 30 30 30 30 35 37 32 32 30 34 36 2c 22 70 65 72 63 65 6e 74 61 67 65 22 3a 31 31 7d 7d 00STRING:?TU0g{"type":"batteryVoltageUpdate","data":{"voltage":3.69000005722046,"percentage":11}}: Mon Dec 7 09:56:12 2015bulk read EP 0x81, actual length 99HEX:cc 01 00 00 01 00 00 00 53 00 00 00 ec 2c e7 fa 7b 22 74 79 70 65 22 3a 22 62 61 74 74 65 72 79 56 6f 6c 74 61 67 65 55 70 64 61 74 65 22 2c 22 64 61 74 61 22 3a 7b 22 76 6f 6c 74 61 67 65 22 3a 33 2e 36 38 30 30 30 30 30 36 36 37 35 37 32 2c 22 70 65 72 63 65 6e 74 61 67 65 22 3a 31 31 7d 7d 00STRING:?S?,??{"type":"batteryVoltageUpdate","data":{"voltage":3.6800000667572,"percentage":11}}

author: da-nie
author_rank: Contributor
timestamp: March 10, 2017, 02:45:01 pm
content: Thank you! Now it is clear that the problem is with Windows. With the program for Linux, I'm not very interested.I'm sure that the program for Linux will work. I'll try all the same so far to launch under Windows.

author: G0MJW
author_rank: Regular Contributor
timestamp: March 10, 2017, 07:12:07 pm
content: Don't linux and Windows use opposite byte order - bigendian vs littleendian? Maybe this has some impact.

author: da-nie
author_rank: Contributor
timestamp: March 10, 2017, 07:19:12 pm
content: For Linux Mageia 5 the program is working.Data is accepted.Bigendian and littleendian in USB protocol? Unlikely. The standard must accurately determine the order of the bytes.

author: tomas123
author_rank: Frequent Contributor
timestamp: March 10, 2017, 10:48:26 pm
content: Quote from: da-nie on March 10, 2017, 07:19:12 pmGreat.Now you can translate step-by-step all "steps" to windows code.Please tell us your progress.

author: da-nie
author_rank: Contributor
timestamp: March 11, 2017, 05:29:48 am
content: In Windows, the functions in the libusb have a different format and other names.For example:long received=usb_bulk_read(USBDeviceHandle,0x81,Data,SizeOfData,10); - in Windows libusb.long ret=libusb_bulk_transfer(devh, 2, my_string1, length, &transferred, 0); - in Linux libusb.The function "usb_bulk_read" in Windows for endpoints 0x85 and 0x83 is also executed with an error: "libusb0-dll:err  submitting request failed, win error: The parameter is incorrect". The reason I do not understand. This endpoints is isochronous. Maybe there is an error in windows libusb.The result was a picture in linux and programm:

author: tomas123
author_rank: Frequent Contributor
timestamp: March 13, 2017, 09:01:34 am
content: When I wrote the Linux F1 driver/code I rechecked all USB packages with the great doc "USB in a NutShell"a samplehttp://www.beyondlogic.org/usbnutshell/usb5.shtml#StringDescriptorsMy two cents:I would install a Windows USB protocol sniffer and compare all transfered package bytes with the Linux version.Then you fast find the differencecynfabs usb sniffer was a great help.excerpt from my notes:Code:>grep -A4 bmRequestType f6c*SETUP: 0.00 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0100 type (H) index (L)4 wIndex 005 wLength 00->DATA0: 80 06 00 01 00 00 40 00 dd 94<-DATA1: 12 01 00 02 00 00 00 40 cb 09 96 19 08 01 01 02 03 01 ef bcDevice Descriptor resultOffset Field Value0 bLength = 121 bDescriptorType = 012 bcdUSB = 00024 bDeviceClass = 005 bDeviceSubClass = 006 bDeviceProtocol = 007 bMaxPacketSize0 = 408 idVendor = cb0910 idProduct = 961912 bcdDevice = 080114 iManufacturer = 0115 iProduct = 0116 iSerialNumber = 020317 bNumConfigurations = 01--SETUP: 0.00 bmRequestType = 001 bRequest = 05 SET_ADDRESS2 wValue 004c 0x4c = 764 wIndex 005 wLength 00DATA0: 00 05 4c 00 00 00 00 00 e4 f8--SETUP: 76.00 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0100 type (H) index (L)4 wIndex 005 wLength 00-> DATA0: 80 06 00 01 00 00 12 00 e0 f4<- DATA1: 12 01 00 02 00 00 00 40 cb 09 96 19 08 01 01 02 03 01 ef bcDevice Descriptor resultOffset Field Value0 bLength = 121 bDescriptorType = 012 bcdUSB = 00024 bDeviceClass = 005 bDeviceSubClass = 006 bDeviceProtocol = 007 bMaxPacketSize0 = 408 idVendor = cb0910 idProduct = 961912 bcdDevice = 080114 iManufacturer = 0115 iProduct = 0116 iSerialNumber = 020317 bNumConfigurations = 01--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0002 type (H) index (L)4 wIndex 005 wLength 00-> DATA0: 80 06 00 02 00 00 09 00 ae 04<- DATA1: 09 02 60 00 03 03 04 c0 00 2b 05--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0002 type (H) index (L)4 wIndex 005 wLength 00-> DATA0: 80 06 00 02 00 00 60 00 80 54<- DATA1: 09 02 60 00 03 03 04 c0 00 09 04 00 00 02 ff f0 00 05 07 05 81 02 00 02 00 07 05 02 02 00 02 01 09 04 01 01 00 ff f0 01 06 09 04 01 00 02 ff f0 01 06 07 05 83 02 00 02 00 07 05 04 02 00 02 01 ca ae<-DATA0: 09 04 02 01 00 ff f0 01 07 09 04 02 00 02 ff f0 01 07 07 05 85 02 00 02 00 07 05 06 02 00 02 01 a7 0dDATA1: 09 02 60 00 03 03 04 c0 00 09 04 00 00 02 ff f0 00 05 07 05 81 02 00 02 00 07 05 02 02 00 02 01 09 04 01 01 00 ff f0 01 06 09 04 01 00 02 ff f0 01 06 07 05 83 02 00 02 00 07 05 04 02 00 02 01 09 04 02 01 00 ff f0 01 07 09 04 02 00 02 ff f0 01 07 07 05 85 02 00 02 00 07 05 06 02 00 02 01--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0300 type (H) index (L) type: String Descriptor (0x03) // http://www.beyondlogic.org/usbnutshell/usb5.shtml#StringDescriptors4 wIndex 005 wLength 00DATA0: 80 06 00 03 00 00 ff 00 d4 64-> String Descriptor resultOffset Field Value0 bLength = 041 bDescriptorType = 032 bString 0409--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0302 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 02 03 09 04 ff 00 97 db-> String Descriptor result (FLIR ONE Camera)--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0301 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 01 03 09 04 ff 00 97 e8-> String Descriptor result (FLIR SYSTEMS)--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0303 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 03 03 09 04 ff 00 96 0a-> String Descriptor result (FLIRONEF03F6200xxxx)--0 bmRequestType = 001 bRequest = 09 SET_CONFIGURATION 032 wValue 0003 type (H) index (L)4 wIndex 005 wLength 00DATA0: 00 09 03 00 00 00 00 00 26 c7--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0304 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 04 03 09 04 ff 00 97 bd-> String Descriptor result (SBI BDP Configuration)--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0305 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 05 03 09 04 ff 00 96 6c-> String Descriptor result (iAP Interface)--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0306 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 06 03 09 04 ff 00 96 5f-> String Descriptor result (com.flir.rosebud.fileio)--0 bmRequestType = 801 bRequest = 06 GET_DESCRIPTOR2 wValue 0307 type (H) index (L)4 wIndex 095 wLength 04DATA0: 80 06 07 03 09 04 ff 00 97 8e-> String Descriptor result (com.flir.rosebud.frame)--0 bmRequestType = 011 bRequest = 0b SET_INTERFACE2 wValue 0000 type (H) index (L) Alternate Setting 04 wIndex 02 Interface 25 wLength 00DATA0: 01 0b 00 00 02 00 00 00 c5 40--0 bmRequestType = 011 bRequest = 0b SET_INTERFACE2 wValue 0000 type (H) index (L) Alternate Setting 04 wIndex 01 Interface 15 wLength 00DATA0: 01 0b 00 00 01 00 00 00 c5 04--0 bmRequestType = 011 bRequest = 0b SET_INTERFACE2 wValue 0001 type (H) index (L) Alternate Setting 14 wIndex 01 Interface 15 wLength 00DATA0: 01 0b 01 00 01 00 00 00 c4 d5--[ ] 3.045669 d= 0.000001 [ 4.1 + 96.633] [ 3] IN : 78.1[ ] 3.045669 d= 0.000001 [ 4.1 + 97.150]  DATA0: cc 01 00 00 01 00 00 00 07 02 00 00 77 60 0c bd 7b 22 74 79 70 65 22 3a 22 73 6c 65 64 ......{"type":"sledInformation","data":{"serialNumberBoard":"F03F6200571","partNumberBoard":"21200160201","versionBoard":"C","serialNumberLepton":"355692","versionLepton":"3.1.45","leptonQR":"A0355692","versionRosebudFactoryESW":"0.4.25","versionRosebudOperationalESW":"0.4.26","versionRosebudUpdaterESW":"0.4.26","versionRosebudAPI":"master.26498f5","gitRevision":"master.26498f5","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatinw[ ] 3.045741 d= 0.000001 [ 4.2 + 44.367] [ 3] IN : 78.1[ ] 3.045742 d= 0.000001 [ 4.2 + 44.883] [ 26] DATA1: 67 4d 6f 64 65 22 3a 22 6f 70 65 72 61 74 69 6f 6e 61 6c 22 7d 7d 00 63 74gMode":"operational"}}[ ] 3.152582 d= 0.000000 [111.1 + 1.867] [ 3] OUT : 78.2[ ] 3.152583 d= 0.000000 [111.1 + 2.267] [ 19] DATA0: cc 01 00 00 01 00 00 00 41 00 00 00 f8 b3 f7 00 6b d2[ ] 3.153468 d= 0.000001 [112.0 + 12.600] [ 3] OUT : 78.2[ ] 3.153468 d= 0.000000 [112.0 + 13.000] [ 68] DATA1: 7b 22 74 79 70 65 22 3a 22 6f 70 65 6e 46 69 6c 65 22 2c 22 64 61 74 61 22 3a 7b 22 6d 6f 64 65 22 3a 22 72 22 2c 22 70 61 74 68 22 3a 22 43 61 6d 65 72 61 46 69 6c 65 73 2e 7a 69 70 22 7d 7d 00 9c 80{"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}[ ] 3.159050 d= 0.000001 [117.4 + 94.250] [ 3] OUT : 78.2[ ] 3.159051 d= 0.000000 [117.4 + 94.650] [ 19] DATA0: cc 01 00 00 01 00 00 00 33 00 00 00 ef db c1 c1 bf 77[ ] 3.159582 d= 0.000018 [118.1 + 0.933] [ 3] OUT : 78.2[ ] 3.159582 d= 0.000000 [118.1 + 1.333] [ 54] DATA1: 7b 22 74 79 70 65 22 3a 22 72 65 61 64 46 69 6c 65 22 2c 22 64 61 74 61 22 3a 7b 22 73 74 72 65 61 6d 49 64 65 6e 74 69 66 69 65 72 22 3a 31 30 7d 7d 00 a1 23{"type":"readFile","data":{"streamIdentifier":10}}[ ] 3.162183 d= 0.000001 [120.5 +102.317] [ 3] IN : 78.3[ ] 3.162184 d= 0.000001 [120.5 +102.833] [ 27] DATA0: 10 55 00 00 01 00 00 00 b7 1a 00 00 0a 00 00 00 00 99 9d 5d 2c 91 a3 df 5e 15[ ] 3.166051 d= 0.000001 [124.4 + 94.367] [ 3] IN : 78.3[ ] 3.166051 d= 0.000001 [124.4 + 94.883]  DATA1: 50 4b 03 04 14 00 08 08 08 00 77 7b 15 47 00.....PK zip Datei[ ] 3.166095 d= 0.000001 [124.5 + 13.167] [ 3] IN : 78.3[ ] 3.166095 d= 0.000001 [124.5 + 13.683]  DATA0: 9b e6 28 68 48 b6 71 d0 9a b1 8d 84 ......usw----[ ] 3.171615 d= 0.000001 [130.1 + 33.617] [ 3] OUT : 78.2[ ] 3.171616 d= 0.000000 [130.1 + 34.017] [ 19] DATA0: cc 01 00 00 01 00 00 00 33 00 00 00 ef db c1 c1 bf 77[ ] 3.172186 d= 0.000001 [130.5 +103.600] [ 3] OUT : 78.2[ ] 3.172186 d= 0.000000 [130.5 +104.000] [ 54] DATA1: 7b 22 74 79 70 65 22 3a 22 72 65 61 64 46 69 6c 65 22 2c 22 64 61 74 61 22 3a 7b 22 73 74 72 65 61 6d 49 64 65 6e 74 69 66 69 65 72 22 3a 31 30 7d 7d 00 a1 23{"type":"readFile","data":{"streamIdentifier":10}}[ ] 3.172642 d= 0.000000 [131.1 + 60.300] [ 3] IN : 78.3[ ] 3.172643 d= 0.000001 [131.1 + 60.833] [ 27] DATA1: 10 55 00 00 01 00 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 69 e7 7b b0 e5 ebSDK App sendet keine 2. Anfrage, Rückmeldung ggf für empty--0 bmRequestType = 011 bRequest = 0b SET_INTERFACE2 wValue 0001 type (H) index (L) Alternate Setting 14 wIndex 02 Interface 25 wLength 00--[ ] 3.232393 d= 0.000001 [190.7 + 56.067] [ 3] OUT : 78.2[ ] 3.232393 d= 0.000000 [190.7 + 56.467] [ 65] DATA1: 7b 22 74 79 70 65 22 3a 22 73 65 74 4f 70 74 69 6f 6e 22 2c 22 64 61 74 61 22 3a 7b 22 6f 70 74 69 6f 6e 22 3a 22 61 75 74 6f 46 46 43 22 2c 22 76 61 6c 75 65 22 3a 74 72 75 65 7d 7d 00 3e 5b{"type":"setOption","data":{"option":"autoFFC","value":true}}0x00[ ] 3.233349 d= 0.000001 [191.7 + 12.633] [ 3] IN : 78.1[ ] 3.233350 d= 0.000001 [191.7 + 13.150] [ 85] DATA0: cc 01 00 00 01 00 00 00 42 00 00 00 16 1c 42 12 7b 22 74 79 70 65 22 3a 22 73 65 74 4f 70 74 69 6f 6e 53 74 61 74 75 73 22 2c 22 64 61 74 61 22 3a 7b 22 6f 70 74 69 6f 6e 22 3a 22 61 75 74 6f 46 46 43 22 2c 22 76 61 6c 75 65 22 3a 2d 31 7d 7d 00 89 bd{"type":"setOptionStatus","data":{"option":"autoFFC","value":-1}}// anderer Mitschnitt[ ] 20.832630 d= 0.000018 [231.5 + 0.933] [ 3] OUT : 89.2[ ] 20.832630 d= 0.000000 [231.5 + 1.333] [ 65] DATA1: 7b 22 74 79 70 65 22 3a 22 73 65 74 4f 70 74 69 6f 6e 22 2c 22 64 61 74 61 22 3a 7b 22 6f 70 74 69 6f 6e 22 3a 22 61 75 74 6f 46 46 43 22 2c 22 76 61 6c 75 65 22 3a 74 72 75 65 7d 7d 00 3e 5b{"type":"setOption","data":{"option":"autoFFC","value":true}}[ ] 21.627581 d= 0.000001 [ 2.4 + 14.133] [ 3] IN : 89.1[ ] 21.627582 d= 0.000001 [ 2.4 + 14.650] [ 87] DATA1: cc 01 00 00 01 00 00 00 44 00 00 00 ca 43 29 37 7b 22 74 79 70 65 22 3a 22 73 65 74 4f 70 74 69 6f 6e 53 74 61 74 75 73 22 2c 22 64 61 74 61 22 3a 7b 22 6f 70 74 69 6f 6e 22 3a 22 61 75 74 6f 46 46 43 22 2c 22 76 61 6c 75 65 22 3a 74 72 75 65 7d 7d 00 ab 6b{"type":"setOptionStatus","data":{"option":"autoFFC","value":true}}[ ] 21.637696 d= 0.000001 [ 12.5 + 2.967] [ 3] IN : 89.5[ ] 21.637697 d= 0.000000 [ 12.5 + 3.467]  DATA0: ef be 00 00 01 00 00 00 19 25 02 00 ac 9b 00 00 c8 88 01 00 a5 00 00 00 16 bb 99 10 00 50 7e 7c 9f 09 98 09 b7 09 c8 09 c6 09 c5 09 d4 09 d6 09 de 09 ee 09 ee 09 ff 09 02 0a 09 0a 1b 0a 0a 0a 1f 0a 29 0a 22 0a 29 0a 29 0a 33 0a 2b 0a 39 0a 2f 0a 40 0a 37 0a 40 0a 53 0a 48 0a 47 0a 49 0a 57 0a 53 0a 55 0a 5c 0a 57 0a 5c 0a 5e 0a 6e 0a 6a 0a 6d 0a 67 0a 71 0a 73 0a 67 0a 6f 0a 6d 0a 76 0a 72 0a 6c 0a 77 0a 76 0a 7c 0a 77 0a 77 0a 7a 0a 76 0a 77 0a 7e 0a 82 0a 7e 0a 8d 0a 88 0a 8d 0a 8e 0a 85 0a 7c 0a 8f 0a 8f 0a 8b 0a 82 0a 85 0a 8c 0a 8d 0a 93 0a 8c 0a 7c 0a 8e 0a 91 0a 01 00 a6 66 94 0a 8b 0a 8e 0a 95 0a 8c 0a 93 0a 8b 0a 9a 0a 91 0a 8c 0a 89 0a 8f 0a 8b 0a 8e 0a 99 0a 8b 0a 8b 0a 8a 0a 84 0a 90 0a 82 0a 8b 0a 82 0a 83 0a 83 0a 81 0a 85 0a 75 0a 80 0a 76 0a 73 0a 83 0a 74 0a 81 0a 7d 0a 72 0a 6a 0a 65 0a 75 0a 6c 0a 63 0a 71 0a 67 0a 61 0a 65 0a 5f 0a 61 0a 60 0a 5d 0a 55 0a 55 0a 56 0a 48 0a 46 0a 3f 0a 36 0a 41 0a 42 0a 27 0a 2d 0a 22 0a 2c 0a 31 0a 25 0a 1c 0a 27 0a 18 0a 1c 0a 1a 0a 17 0a 14 0a 06 0a fc 09 f8 09 0b 0a f2 09 eb 09 e7 09 dc 09 d6 09 02 00 f8 6c b2 09 c1 09 cc 09 d0 09 cd 09 da 09 e3 09 f2 09 f1 09 03 0a 04 0a 0b 0a 09 0a 17 0a 23 0a 1a 0a 30 0a 38 0a 37 0a 38 0a 35 0a 43 0a 39 0a 43 0a 41 0a 4b 0a 4c 0a 46 0a 50 0a 4c 0a 56 0a 57 0a 59 0a 6c 0a 6f 0a 5d 0a 6b 0a 66 0a 6a 0a 71 0a 71 0a 77 0a 7d 0a 7f 0a 77 0a 7b 0a 7b 0a 79 0a 82 0a 86 0a 80 0a 7a 0a 7d 0a 88 0a 7e 0a 7f 0a 84 0a 86 0a 89 0a 84 0a 8c 0a 87 0a 87 0a 96 0a 96 0a 95 0a 8c 0a 99 0a 8a 0a 9b 0a 8f 0a 8c 0a 96 0a 92 0a 88 0a 9f 0a 8e a2RAW DatenIt goes on and on and on from here.Quote from: da-nie on March 11, 2017, 05:29:48 amI believe not.You must exact generate the same byte sequence with the same length.

author: da-nie
author_rank: Contributor
timestamp: March 14, 2017, 05:23:14 pm
content: Hm. In Mageia 5 and Raspbian this programm is work.But in XUbuntu 16.10 this programm works poorly. Often occurs LIBUB_ERROR_PIPE! Hm...

author: tomas123
author_rank: Frequent Contributor
timestamp: March 14, 2017, 08:06:46 pm
content: I know:Quote from: tomas123 on December 11, 2015, 10:42:53 pm

author: da-nie
author_rank: Contributor
timestamp: March 17, 2017, 09:45:27 am
content: I'm creating a program for QNX 6.3. The frame is collected in 20 seconds - all other frames are lost. Io-usb does not have time to receive all the data. In addition, Io-usb often ends abnormally. But all the same the program works with the device not with libusb, but with using USBD.Also, CRC is used for the string.Updated!I changed timeout in usbd_io in 0. FPS - 2-3 image per sec!!!Programm updated.Programm for QNX 6.3 SP 3.

author: da-nie
author_rank: Contributor
timestamp: March 20, 2017, 05:24:45 pm
content: New version for QNX 6.3!

author: tomas123
author_rank: Frequent Contributor
timestamp: March 21, 2017, 10:56:14 am
content: GreatYou asked two weeks ago for a Windows XP program.And now I write code for QNX.What is your target device?

author: da-nie
author_rank: Contributor
timestamp: March 21, 2017, 05:03:11 pm
content: Target device - PC.I use QNX 6.3 at work.For Windows the program does not work. Therefore, I tried writing a USB driver for QNX. In parallel, I'm writing on Qt4 a program for Linux. I have decided not to use Windows yet.It is interesting how RAW14 is recalculated in temperature. In the datasheet, I did not find it...

author: tomas123
author_rank: Frequent Contributor
timestamp: March 21, 2017, 11:16:01 pm
content: There are some Flir documents about this.The raw value is linear to radiance.Therefore we only need Plancks Law.see my footer for further informations.

author: tomas123
author_rank: Frequent Contributor
timestamp: March 22, 2017, 04:23:23 pm
content: Quote from: da-nie on March 21, 2017, 05:03:11 pmA good source is the FLIR GEV Demo Source Code:http://80.77.70.144/SwDownload/app/RssSWDownload.aspx?ID=143PvSimpleUISampleDlg.cppthe calibration values and air constants:Code:// Get current measurement parametersPvGenFloat *lR = dynamic_cast<PvGenFloat *>( lGenDevice->Get( "R" ) );PvGenFloat *lB = dynamic_cast<PvGenFloat *>( lGenDevice->Get( "B" ) );PvGenFloat *lF = dynamic_cast<PvGenFloat *>( lGenDevice->Get( "F" ) );// Get gain (J1) and offset (J0)PvGenInteger *lJ0 = dynamic_cast<PvGenInteger *>( lGenDevice->Get( "J0" ) );PvGenFloat *lJ1 = dynamic_cast<PvGenFloat *>( lGenDevice->Get( "J1" ) );// Get spectral responsePvGenFloat *lX = dynamic_cast<PvGenFloat *>( lGenDevice->Get( "X" ) );PvGenFloat *la1 = dynamic_cast<PvGenFloat *>( lGenDevice->Get( "alpha1" ) );PvGenFloat *la2 = dynamic_cast<PvGenFloat *>( lGenDevice->Get( "alpha2" ) );PvGenFloat *lb1 = dynamic_cast<PvGenFloat *>( lGenDevice->Get( "beta1" ) );PvGenFloat *lb2 = dynamic_cast<PvGenFloat *>( lGenDevice->Get( "beta2" ) );and the temperature calculationCode:CTemperature PvSimpleUISampleDlg::imgToTemp(long lPixval){double tmp;CTemperature K;tmp = imgToPow(lPixval);//tmp = clipPow(tmp,pValState);tmp = powToObjSig(tmp);K = objSigToTemp(tmp);return (K);}see my excel sheet RAW2Temp.xls for details:https://www.eevblog.com/forum/thermal-imaging/flir-e4-thermal-imaging-camera-teardown/?action=dlattach;attach=168737the excel sheet and the "FLIR GEV Demo" only use the formulas from this two Flir documents:only Plancks Law:https://www.eevblog.com/forum/thermal-imaging/flir-e4-thermal-imaging-camera-teardown/?action=dlattach;attach=83952with air influence:https://www.eevblog.com/forum/thermal-imaging/flir-e4-thermal-imaging-camera-teardown/?action=dlattach;attach=83950

author: da-nie
author_rank: Contributor
timestamp: March 23, 2017, 06:18:08 pm
content: Thank you, Thomas123! In your program flir8p1c is a function of the temperature calculation. I used it. Now the program for QNX 6.3 is like this.

author: da-nie
author_rank: Contributor
timestamp: March 27, 2017, 07:03:46 pm
content: Preview version! Sometimes works for Windows!I create driver FLIR One Gen 2 for Windows XP with WinDDK!After calibration does not work!Uses:0) Find WdfCoInstaller01009.dll (its not in archive! Big size...)1) Flir One Gen 2 On.2) Wait for green LED.3) Start FlirOneControl.exe.4) In path Image must created files ".tga". ( If everything worked- Does not always work )5) Fun.The program used ReadFile in synchronously mode. After closing the window FlieOneControl in the task manager, close the application if it remains working.

author: da-nie
author_rank: Contributor
timestamp: March 28, 2017, 09:35:55 am
content: Stable version for Windows XP!Note: If device removed, thern restart programm FlirOneControl!

author: frenky
author_rank: Unknown
timestamp: March 28, 2017, 10:44:20 am
content: Good job!

author: tomas123
author_rank: Frequent Contributor
timestamp: March 29, 2017, 03:37:15 pm
content: @da-nieI need some helps for the neccesary steps for running the FlirOneControl.exe (Windows 10).I found a download of WdfCoInstaller01009.dll herehttps://github.com/buaabyl/vmulti/tree/master/sysand put the dll in your folder \FlirOneForWindows\FlirOneControl\Release.Code:> cd FlirOneForWindows\FlirOneControl\Release> md5sum WdfCoInstaller01009.dlla9970042be512c7981b36e689c5f3f9f *WdfCoInstaller01009.dllBut Procmon.exe from Sysinternals doesn't show any access of FlirOneControl.exe to WdfCoInstaller01009.dll.There are three *.inf driver inside "\Driver for FLIR One Gen 2 for XP".Code:flironegen2_fileio.infflironegen2_frame.infflironegen2_iap.infDo I need to install these drivers?

author: da-nie
author_rank: Contributor
timestamp: March 29, 2017, 04:11:18 pm
content: There is a problem. I use WinDDk 7.1.0. This WDK can not create a driver for Windows 10.QuoteWDK 10 i do not have. WDK 10 is integrated withMicrosoft Visual Studio 2015. I not use Microsoft Visual Studio 2015, I use VC 6.and Windows XP ( Yes, I'm retrograde). I can compile the driver for Windows 7. But i unknow, how to make an inf-file for Windows 7.I use example for usb device in WDK 7.1.0. Today I'll try to make an inf for Windows 7 x86.I do not know when I'll try WDK 10. But you can install WDK 10 and compile the driver. Maybe there will not be any changes to the program.QuoteYes, but this inf only XP...

author: da-nie
author_rank: Contributor
timestamp: March 29, 2017, 06:05:12 pm
content: I compile driver for Windows 7 (x86,amd64,ai64). But I can not do inf-file. Does not work. Windows reports that the driver was not found.And Windows does not see three devices! He sees only one device. Maybe that's why I did not install the driver.By the way, WdfCoInstaller01009.dll needs different for different drivers (x86, amd64, ai64)!Maybe someone can install drivers for Windows 7 and write an inf-file...Update!On x64 platforms, a digital signature of the driver is required! Maybe, Therefore, the driver is not installed. On the Internet write that it can be fixed.

author: da-nie
author_rank: Contributor
timestamp: March 30, 2017, 07:43:31 pm
content: In Windows 7 x86 Flir One is "USB Composite Device", but not as three devices (how in XP). How to separate them?I do not know what to do to get three devices.Devices ID:USB\VID_09CB&PID_1996&MI_00 - iAPUSB\VID_09CB&PID_1996&MI_01 - FileIOUSB\VID_09CB&PID_1996&MI_02 - FrameIn Windows 7 devices ID: USB\VID_09CB&PID_1996 -

author: da-nie
author_rank: Contributor
timestamp: April 05, 2017, 06:25:27 pm
content: Updated programm for Windows XP.Windows 7 is not supported...

author: da-nie
author_rank: Contributor
timestamp: April 10, 2017, 05:03:42 pm
content: Updated version for Windows XP.(For Windows the most stable work)

author: joe-c
author_rank: Frequent Contributor
timestamp: April 10, 2017, 09:22:46 pm
content: if i have again a FLIR One i will try that program.

author: Niels2
author_rank: Newbie
timestamp: April 12, 2017, 04:51:53 pm
content: Hello, I know it is a really noob question for you guys, but mayby somebody can help me and tell me how to compile the .c files ? I wanted to use the flir one cam for android on my raspberry pi3 to stream the picture together with a pi cam over wifi, but unfortunalty I don`t have the skills for it... I tried several .c files like the flir8l.c, the flir8l3.c and the flir8p1.c for example. I`m using the preinstalled Geany software on the raspberry. When I want to compile (F8), an error appears for missing the libusb.h.

author: da-nie
author_rank: Contributor
timestamp: April 12, 2017, 05:29:21 pm
content: 1) sudo apt-get install libusb  or sudo apt-get install libusb-1.0-0-dev 2) make  in project "flir...c" directory.

author: Niels2
author_rank: Newbie
timestamp: April 12, 2017, 11:39:42 pm
content: Thanks da-nie, I allready installed the libhub, it seems to work with "make" in Geany (shift+F9) and I guess that I finally understood how to compile in the Linux command line... .

author: Niels2
author_rank: Newbie
timestamp: April 13, 2017, 01:46:14 pm
content: After trying several versions, I think I got the camera somehow running, it looks like the list below. I run flir8l3 atm. But unfortunately I am unable to get a picture on the screen. When I run guvcview I got an error message: no video device found. I can choose between 3 dummy video devices, but when I click on the "ok" button the error message box disappear and nothing happens...Btw., is there something like the "Windows" snipping tool in Rasbian implemented?Quote

author: da-nie
author_rank: Contributor
timestamp: April 13, 2017, 03:17:59 pm
content: Change USB-port for FLIR One and disconnectedalldevices (without keyboard).In Raspberry Pi 3 FLIR One work unstable... libusb error and libusb timeout.Your received data is normal.But this data is part full data.

author: Niels2
author_rank: Newbie
timestamp: April 13, 2017, 08:09:37 pm
content: Thanks again for your fast response da-nie, but this solution seems not working for me. Maybe this helps;Code:pi@raspberrypi:~ $ sudo guvcviewGUVCVIEW: couldn't open /root/.config/guvcview2/video0 for read: No such file or directorylibv4l2: error getting pixformat: Invalid argumentV4L2_CORE: ERROR opening V4L2 interface for /dev/video0V4L2_CORE: Unable to find parent usb device.V4L2_CORE: Unable to find parent usb device.V4L2_CORE: Unable to find parent usb device.libv4l2: error getting pixformat: Invalid argumentV4L2_CORE: ERROR opening V4L2 interface for /dev/video4libv4l2: error getting pixformat: Invalid argumentV4L2_CORE: ERROR opening V4L interface: Invalid argument** (guvcview:13857): WARNING **: Couldn't connect to accessibility bus: Empty address ''Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.pi@raspberrypi:~ $ GUVCVIEW: couldn't open /root/.config/guvcview2/video1 for read: No such file or directorylibv4l2: error getting pixformat: Invalid argumentV4L2_CORE: ERROR opening V4L2 interface for /dev/video0V4L2_CORE: Unable to find parent usb device.V4L2_CORE: Unable to find parent usb device.V4L2_CORE: Unable to find parent usb device.libv4l2: error getting pixformat: Invalid argumentV4L2_CORE: ERROR opening V4L2 interface for /dev/video4V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for deviceV4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for deviceV4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for deviceV4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for deviceV4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for deviceV4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for deviceV4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for deviceV4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for deviceV4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for deviceV4L2_CORE: (libusb) couldn't get deviceGUVCVIEW: no valid file extension for video file (?ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.frontALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rearALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfeALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.sideALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmiALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmiALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modemALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modemALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phonelineALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phonelineALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refusedALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refusedCannot connect to server socket err = No such file or directoryCannot connect to server request channeljack server is not running or cannot be started^Cpi@raspberrypi:~ $

author: tomas123
author_rank: Frequent Contributor
timestamp: April 13, 2017, 11:33:35 pm
content: QuoteDid you run the v4l2loopback kernel driver on your raspberry pi?You need:/dev/video1/dev/video2Code:pi@raspberrypi:~/v4l2loopback $ sudo modprobe videodevpi@raspberrypi:~/v4l2loopback $ sudo insmod v4l2loopback.ko video_nr=0,1,2,3pi@raspberrypi:~/v4l2loopback $ lsmodModule Size Used byv4l2loopback 26994 0configs 32580 0videodev 172779 1 v4l2loopbackmedia 16312 1 videodevbnep 11853 2hci_uart 21122 1btbcm 7885 1 hci_uartbluetooth 365780 22 bnep,btbcm,hci_uartbrcmfmac 201842 0brcmutil 9031 1 brcmfmacsnd_bcm2835 23131 0snd_pcm 95473 1 snd_bcm2835snd_timer 22556 1 snd_pcmcfg80211 500739 1 brcmfmacsnd 68400 3 snd_bcm2835,snd_timer,snd_pcmrfkill 21397 4 cfg80211,bluetoothbcm2835_gpiomem 3759 0bcm2835_wdt 4133 0uio_pdrv_genirq 3718 0uio 10230 1 uio_pdrv_genirqipv6 367697 24

author: Niels2
author_rank: Newbie
timestamp: April 13, 2017, 11:37:29 pm
content: Finally it works!got the flir8k running with the "mjpeg-stream" thats all I wanted. I have still no clue about getting the guvcview working, but after struggeling with the "kernel header things"I`m totaly satisfied! Thank you all for your great work!

author: Niels2
author_rank: Newbie
timestamp: April 13, 2017, 11:47:42 pm
content: Quote from: tomas123 on April 13, 2017, 11:33:35 pmI think sobut for now, it works like I wanted (the livestream via wifi). Next step is to automise everything on start. I hope it will be easierThanks again for your great support!

author: tomas123
author_rank: Frequent Contributor
timestamp: April 14, 2017, 04:31:30 pm
content: the v4l interface is tricky to install on the raspiwith the last raspi firmwareCode:$ uname -aLinux raspberrypi 4.4.50+ #970 Mon Feb 20 19:12:50 GMT 2017 armv6l GNU/Linux.. I got the kernel headers withhttps://github.com/notro/rpi-source/wikisee my terminal logCode:$ sudo apt-get install bc$ sudo apt-get install dkmspi@raspberrypi:~ $ mkdir temppi@raspberrypi:~ $ cd temp/pi@raspberrypi:~/temp $ sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-update--2017-04-09 15:21:32-- https://raw.githubusercontent.com/notro/rpi-source/master/rpi-sourceResolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.HTTP request sent, awaiting response... 200 OKLength: 12670 (12K) [text/plain]Saving to: ‘/usr/bin/rpi-source’/usr/bin/rpi-source 100%[=========================================================================================>] 12.37K --.-KB/s in 0.003s2017-04-09 15:21:32 (4.06 MB/s) - ‘/usr/bin/rpi-source’ saved [12670/12670]pi@raspberrypi:~/temp $ rpi-source*** gcc version check: OK*** Using: /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz*** Latest firmware revision: b51046a2b2bb69771579a549d157205d9982f858*** Linux source commit: e223d71ef728c559aa865d0c5a4cedbdf8789cfd*** Download kernel source--2017-04-09 15:21:52-- https://github.com/raspberrypi/linux/archive/e223d71ef728c559aa865d0c5a4cedbdf8789cfd.tar.gzResolving github.com (github.com)... 192.30.253.113, 192.30.253.112Connecting to github.com (github.com)|192.30.253.113|:443... connected.HTTP request sent, awaiting response... 302 FoundLocation: https://codeload.github.com/raspberrypi/linux/tar.gz/e223d71ef728c559aa865d0c5a4cedbdf8789cfd --2017-04-09 15:21:53-- https://codeload.github.com/raspberrypi/linux/tar.gz/e223d71ef728c559aa865d0c5a4cedbdf8789cfdResolving codeload.github.com (codeload.github.com)... 192.30.253.121, 192.30.253.120Connecting to codeload.github.com (codeload.github.com)|192.30.253.121|:443... connected.HTTP request sent, awaiting response... 200 OKLength: 136303810 (130M) [application/x-gzip]Saving to: ‘/home/pi/linux-e223d71ef728c559aa865d0c5a4cedbdf8789cfd.tar.gz’/home/pi/linux-e223d71ef728c559aa865d0c5a4 100%[=========================================================================================>] 129.99M 1.45MB/s in 77s2017-04-09 15:23:11 (1.68 MB/s) - ‘/home/pi/linux-e223d71ef728c559aa865d0c5a4cedbdf8789cfd.tar.gz’ saved [136303810/136303810]*** Unpack kernel source*** Add '+' to kernel release string*** Create symlink: /home/pi/linux*** Create /lib/modules/<ver>/{build,source} symlinks*** .config*** Module.symvers*** make modules_prepareHOSTCC scripts/basic/fixdepHOSTCC scripts/kconfig/conf.oSHIPPED scripts/kconfig/zconf.tab.cSHIPPED scripts/kconfig/zconf.lex.cSHIPPED scripts/kconfig/zconf.hash.cHOSTCC scripts/kconfig/zconf.tab.oHOSTLD scripts/kconfig/confscripts/kconfig/conf --silentoldconfig KconfigCHK include/config/kernel.releaseUPD include/config/kernel.release...*** ncurses-devel is NOT installed. Needed by 'make menuconfig'. On Raspbian sudo apt-get install libncurses5-dev*** Help: https://github.com/notro/rpi-source/wiki//checkls -al /lib/modules/$(uname -r)/buildlrwxrwxrwx 1 root root 14 Apr 9 15:25 /lib/modules/4.4.50+/build -> /home/pi/linux// weiter mit Treiber$ sudo apt-get install libv4l-dev$ sudo apt-get install gitpi@raspberrypi:~ $ git clone https://github.com/umlaeute/v4l2loopbackCloning into 'v4l2loopback'...remote: Counting objects: 1565, done.remote: Total 1565 (delta 0), reused 0 (delta 0), pack-reused 1565Receiving objects: 100% (1565/1565), 730.30 KiB | 439.00 KiB/s, done.Resolving deltas: 100% (868/868), done.Checking connectivity... done.pi@raspberrypi:~ $ cd v4l2loopback/$ cd v4l2loopback/pi@raspberrypi:~/v4l2loopback $ sudo make cleanrm -f *~rm -f Module.symvers Module.markers modules.ordermake -C /lib/modules/`uname -r`/build M=/home/pi/v4l2loopback cleanmake: Entering directory '/home/pi/linux-e223d71ef728c559aa865d0c5a4cedbdf8789cfd'CLEAN /home/pi/v4l2loopback/.tmp_versionsmake: Leaving directory '/home/pi/linux-e223d71ef728c559aa865d0c5a4cedbdf8789cfd'pi@raspberrypi:~/v4l2loopback $ sudo makeBuilding v4l2-loopback driver...make -C /lib/modules/`uname -r`/build M=/home/pi/v4l2loopback modulesmake: Entering directory '/home/pi/linux-e223d71ef728c559aa865d0c5a4cedbdf8789cfd'CC  /home/pi/v4l2loopback/v4l2loopback.oBuilding modules, stage 2.MODPOST 1 modulesCC /home/pi/v4l2loopback/v4l2loopback.mod.oLD  /home/pi/v4l2loopback/v4l2loopback.komake: Leaving directory '/home/pi/linux-e223d71ef728c559aa865d0c5a4cedbdf8789cfd'pi@raspberrypi:~/v4l2loopback $ sudo make installmake -C /lib/modules/`uname -r`/build M=/home/pi/v4l2loopback modules_installmake: Entering directory '/home/pi/linux-e223d71ef728c559aa865d0c5a4cedbdf8789cfd'INSTALL /home/pi/v4l2loopback/v4l2loopback.koDEPMOD 4.4.50+make: Leaving directory '/home/pi/linux-e223d71ef728c559aa865d0c5a4cedbdf8789cfd'depmod -a `uname -r`pi@raspberrypi:~/v4l2loopback $ find /lib/ -name v4l2loopback.ko 2>/dev/zero/lib/modules/4.4.50+/extra/v4l2loopback.ko/lib/modules/4.4.50/extra/v4l2loopback.ko //BAD//vorher nicht vergessen$ sudo modprobe videodevpi@raspberrypi:~/v4l2loopback $ sudo insmod /lib/modules/4.4.50+/extra/v4l2loopback.ko video_nr=0,1,2,3pi@raspberrypi:~/v4l2loopback $ lsmodModule Size Used byv4l2loopback 26994 0configs 32580 0videodev 172779 1 v4l2loopbackmedia 16312 1 videodevbnep 11853 2hci_uart 21122 1btbcm 7885 1 hci_uartbluetooth 365780 22 bnep,btbcm,hci_uartbrcmfmac 201842 0brcmutil 9031 1 brcmfmacsnd_bcm2835 23131 0snd_pcm 95473 1 snd_bcm2835snd_timer 22556 1 snd_pcmcfg80211 500739 1 brcmfmacsnd 68400 3 snd_bcm2835,snd_timer,snd_pcmrfkill 21397 4 cfg80211,bluetoothbcm2835_gpiomem 3759 0bcm2835_wdt 4133 0uio_pdrv_genirq 3718 0uio 10230 1 uio_pdrv_genirqipv6 367697 24

author: Niels2
author_rank: Newbie
timestamp: April 14, 2017, 10:06:01 pm
content: Thanks for the help tomas123I tried it one more time, but Guvcview is still not working. It isn`t really a problem for me, as long as the stream is running...Here are my check for the right kernel (hope this is the right way to check it):Code:pi@raspberrypi:/ $ uname -aLinux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linuxpi@raspberrypi:/ $ ls -al /lib/modules/$(uname -r)/buildlrwxrwxrwx 1 root root 14 Apr 13 19:12 /lib/modules/4.4.50-v7+/build -> /home/pi/linuxThen I did thisCode:pi@raspberrypi:/ $ sudo modprobe videodevpi@raspberrypi:/ $ cd /home/pi/v4l2loopbackpi@raspberrypi:~/v4l2loopback $ sudo insmod /lib/modules/4.4.50-v7+/extra/v4l2loopback.ko video_nr=0,1,2,3pi@raspberrypi:~/v4l2loopback $ lsmodModule Size Used byv4l2loopback 23431 0videodev 132913 1 v4l2loopbackmedia 11573 1 videodevbinfmt_misc 6388 1bnep 10340 2hci_uart 17943 1btbcm 5929 1 hci_uartbluetooth 326105 22 bnep,btbcm,hci_uartbrcmfmac 186403 0brcmutil 5661 1 brcmfmacevdev 11396 2cfg80211 428871 1 brcmfmacrfkill 16037 4 cfg80211,bluetoothsnd_bcm2835 20447 1snd_pcm 75762 1 snd_bcm2835snd_timer 19288 1 snd_pcmsnd 51908 5 snd_bcm2835,snd_timer,snd_pcmbcm2835_gpiomem 2976 0bcm2835_wdt 3225 0uio_pdrv_genirq 3164 0uio 8000 1 uio_pdrv_genirqi2c_dev 5859 0fuse 84037 3ipv6 347620 66And this was the result:Code:pi@raspberrypi:/ $ sudo guvcviewGUVCVIEW: couldn't open /root/.config/guvcview2/video0 for read: No such file or directorylibv4l2: error getting pixformat: Invalid argumentV4L2_CORE: ERROR opening V4L2 interface for /dev/video0libv4l2: error getting pixformat: Invalid argumentV4L2_CORE: ERROR opening V4L2 interface for /dev/video1libv4l2: error getting pixformat: Invalid argumentV4L2_CORE: ERROR opening V4L2 interface for /dev/video2libv4l2: error getting pixformat: Invalid argumentV4L2_CORE: ERROR opening V4L2 interface for /dev/video3libv4l2: error getting pixformat: Invalid argumentV4L2_CORE: ERROR opening V4L interface: Invalid argumentUnable to init server: Could not connect: Connection refusedGUVCVIEW: (GUI) Gtk3 can't open displayGuvcview error: no video device foundMaybe I`ll try to fix it later...Today I tried to work out an automatised start for the "flir8k" driver and used this:Code:pi@raspberrypi:/ $ sudo /home/pi/Downloads/flir8k/flir8kthis worked fine, but then I tried to start the start1.sh file the same way:Code:pi@raspberrypi:/ $ sudo /home/pi/mjpg-streamer/mjpg-streamer/start1.shcat: ./start1.sh: No such file or directory/home/pi/mjpg-streamer/mjpg-streamer/start1.sh: 3: /home/pi/mjpg-streamer/mjpg-streamer/start1.sh: ./mjpg_streamer: not found/home/pi/mjpg-streamer/mjpg-streamer/start1.sh: 4: /home/pi/mjpg-streamer/mjpg-streamer/start1.sh: ./mjpg_streamer: not foundThat didn`t work.I can only start the stream by entering the folder of the "mjpg-streamer like this:Code:pi@raspberrypi:~/mjpg-streamer/mjpg-streamer $ cd /pi@raspberrypi:/ $ cd /home/pi/mjpg-streamer/mjpg-streamer/pi@raspberrypi:~/mjpg-streamer/mjpg-streamer $ sudo ./start1.shcat ./start1.shexport LD_LIBRARY_PATH=././mjpg_streamer -i "input_file.so -f /mnt/RAMDisk/ -n thermal.jpg" -o "output_http.so -p 8080 -w /usr/local/www" &./mjpg_streamer -i "input_file.so -d 0 -f /mnt/RAMDisk/ -n real.jpg" -o "output_http.so -p 8081 -w /usr/local/www"MJPG Streamer Version: svn rev: 3:172i: folder to watch...: /mnt/RAMDisk/i: forced delay......: 0i: delete file.......: no, do not deletei: filename must be..: real.jpgo: www-folder-path...: /usr/local/www/o: HTTP TCP port.....: 8081o: username:password.: disabledo: commands..........: enabledMJPG Streamer Version: svn rev: 3:172i: folder to watch...: /mnt/RAMDisk/i: forced delay......: 0i: delete file.......: no, do not deletei: filename must be..: thermal.jpgo: www-folder-path...: /usr/local/www/o: HTTP TCP port.....: 8080o: username:password.: disabledo: commands..........: enabled...but couldn`t find a way to autostart it that way...btw. this is how my "start1.sh" file looks like:Code:cat ./start1.shexport LD_LIBRARY_PATH=././mjpg_streamer -i "input_file.so -f /mnt/RAMDisk/ -n thermal.jpg" -o "output_http.so -p 8080 -w /usr/local/www" &./mjpg_streamer -i "input_file.so -d 0 -f /mnt/RAMDisk/ -n real.jpg" -o "output_http.so -p 8081 -w /usr/local/www"

author: tomas123
author_rank: Frequent Contributor
timestamp: April 15, 2017, 03:25:46 pm
content: QuoteI see, you need some Linux beginner tutorialsI good german source for free books is:http://openbook.rheinwerk-verlag.de/shell_programmierung/index.htmhttp://openbook.rheinwerk-verlag.de/linux/

author: da-nie
author_rank: Contributor
timestamp: May 01, 2017, 11:03:00 am
content: My RAW-file analizer.

author: Ben321
author_rank: Frequent Contributor
timestamp: May 03, 2017, 04:34:18 am
content: Quote from: da-nie on April 10, 2017, 05:03:42 pmThis looks awesome! Thanks for making this. However, it has 3 problems.1) It doesn't come with a driver installer (or text file explaining how to install), only the driver files, so I don't know exactly how to install it.2) It is a driver designed only for XP, which doesn't work on newer versions of Windows, including Windows 10. My current PC has Windows 10, and I don't want to downgrade it to XP.3) The software itself is not written in English, and is not written for an English locale, so all the text on user interface is just a bunch of question marks.Here's 3 solutions.1) Create a setup.exe to make sure that it can be installed properly, or at least include a text file with instructions on how to install the driver.2) In addition to the XP driver (don't get rid of it, as some people still use XP), use a newer driver SDK to create a Windows 7 driver, and also a Windows 10 driver.3) Create a separate English language file that I can load, so that all the strings in the program are in English, so that the text actually displays properly on computer's who's locale is set to United States, and so that people who only know English (like myself) can read it.

author: tomas123
author_rank: Frequent Contributor
timestamp: May 03, 2017, 08:00:04 am
content: @Ben321da-nie wrote a special driver for the Flir One, which writes proprietary RAW files.Your problem ist not the russian language the viewer software, rather the connecting of a Flir One with your PC and getting the raw files ;-)Please read the previous posts of da-nie for more informations@da-niethanks for sharing your workSome years ago I wrote a php script, which can transform your RAW images in Flir Radiometric JPG files (for Flir Tools etc.):https://www.eevblog.com/forum/thermal-imaging/flir-e4-thermal-imaging-camera-teardown/msg348715/#msg348715

author: da-nie
author_rank: Contributor
timestamp: May 03, 2017, 09:22:55 am
content: QuoteI don't know, how to do it install.exe for drivers...QuoteSorry, but Windows XP is single Operation System with i can create drivers. In Windows 7 (In Windows 10,i think, also) Flir One Gen 2 not separate for 3 device - drivers not find.QuoteNo problem.I created version for english language.P.S. My RAW-format:Code://RAW-Headerstruct SHeader{unsigned long Width;unsigned long Height;double PlanckR1;double PlanckB;double PlanckF;double PlanckO;double PlanckR2;double TempReflected;double Emissivity;};//RAW-DATAunsigned short RAW14[160*120];

author: Vipitis
author_rank: Frequent Contributor
timestamp: May 07, 2017, 01:40:10 am
content: I wanted to know if the custom tools for four one also work for the cat S60, because it is the same module

author: ruzze
author_rank: Newbie
timestamp: June 24, 2017, 04:10:56 pm
content: Hi everyone,first of all thanks for this beautiful thread about flir one software teardown!For my personal project i needed to disable automatic FFC (shutter) and do FFC only a couple of times a day. I tried to reverse enginnering the command packet and the string for disable automatic FFC through flirone android sdk, but i encountered some troubles and i tried to sniff the packet using USBMON with wireshark plugin. Now i can disableAutomaticFFC and do FFC calibration when i wantIn order to send a command you need to send a command packet and subsequently a string packet (JSON format).For disable automatic shuttering FFC you must send- command packet : CC 01 00 00 01 00 00 00 3F 00 00 00 57 64 17 8b;- string packet: {"type":"setOption","data":{"option":"autoFFC","value":false}}If you want to do a FFC calibration you must send:- command packet: CC 01 00 00 01 00 00 00 3C 00 00 00 B9 CB A2 99- string packet: {"type":"setOption","data":{"option":"doFFC","value":true}}I hope this will be useful to someone

author: da-nie
author_rank: Contributor
timestamp: June 24, 2017, 05:10:21 pm
content: Thank you!

author: tomas123
author_rank: Frequent Contributor
timestamp: June 25, 2017, 01:24:03 pm
content: @ruzzeThank you for clarification.I posted the corresponding code snippets some times ago, but this thread is a bit confusing.Please post your enhanced code here. The original code was a proof of concept and we need some improvements.Thank youQuote from: tomas123 on October 04, 2016, 08:21:48 amCode://--------- write string: {"type":"setOption","data":{"option":"autoFFC","value":false}}length = 16;unsigned char my_string4={0xcc,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x57,0x64,0x17,0x8b};printf("\nEP 0x02 to be sent Hexcode: %i Bytes[",length);for (i = 0; i < length; i++) {printf(" %02x", my_string4);}printf(" ]\n");r = libusb_bulk_transfer(devh, 2, my_string4, length, &transferred, 0);if(r == 0 && transferred == length){printf("\nWrite successful!");}elseprintf("\nError in write! res = %d and transferred = %d\n", r, transferred);strcpy( my_string,"{\"type\":\"setOption\",\"data\":{\"option\":\"autoFFC\",\"value\":false}}");length = strlen(my_string)+1;printf("\nEP 0x02 to be sent %i Bytes: %s", length, my_string);// avoid error: invalid conversion from ‘char*’ to ‘unsigned char*’ [-fpermissive]my_string1 = (unsigned char*)my_string;r = libusb_bulk_transfer(devh, 2, my_string1, length, &transferred, 0);if(r == 0 && transferred == length){printf("\nWrite successful!");printf("\nSent %d bytes with string: %s\n", transferred, my_string);}elseprintf("\nError in write! res = %d and transferred = %d\n", r, transferred);

author: ruzze
author_rank: Newbie
timestamp: June 26, 2017, 12:15:22 pm
content: @tomas123I am pleased to hear your gratitude.This is my implementation of two functionalities..Code:void disableAutomaticFFC(){printf("\ndisable AutomaticFFC \n");time_t now = time(0); // Get the system timeprintf("\n: %s", ctime(&now));int transferred = 0;int r;char stringCommand;//--------- write string: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}}int startCommandLength = 16;unsigned char startCommand = {0xcc, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x57, 0x64, 0x17, 0x8b};printf("\nEP 0x02 to be sent Hexcode: %i Bytes[", startCommandLength);int j;for (j = 0; j < startCommandLength; j++){printf(" %02x", startCommand);}printf(" ]\n");r = libusb_bulk_transfer(devh, 2, startCommand, startCommandLength, &transferred, 0);if (r == 0 && transferred == startCommandLength){printf("\nWrite successful!");}else{printf("\nError in write! res = %d and transferred = %d\n", r, transferred);}strcpy(stringCommand, "{\"type\":\"setOption\",\"data\":{\"option\":\"autoFFC\",\"value\":false}}");startCommandLength = strlen(stringCommand) + 1;printf("\nEP 0x02 to be sent: %s", stringCommand);// avoid error: invalid conversion from ‘char*’ to ‘unsigned char*’ [-fpermissive]unsigned char *stringCommandUns = (unsigned char *)stringCommand;//my_string1 = (unsigned char*)my_string;r = libusb_bulk_transfer(devh, 2, stringCommand, startCommandLength, &transferred, 0);if (r == 0 && transferred == startCommandLength){printf("\nWrite successful!");printf("\nSent %d bytes with string: %s\n", transferred, stringCommandUns);}else{printf("\nError in write! res = %d and transferred = %d\n", r, transferred);}}void doFFC(){printf("\n doFFC \n");time_t now = time(0); // Get the system timeprintf("\n: %s", ctime(&now));int transferred = 0;int r;char stringCommand;int startCommandLength = 16;unsigned char startCommand = {0xcc, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0xB9, 0xCB, 0xA2, 0x99};printf("\nEP 0x02 to be sent Hexcode: %i Bytes[", startCommandLength);int j;for (j = 0; j < startCommandLength; j++){printf(" %02x", startCommand);}printf(" ]\n");r = libusb_bulk_transfer(devh, 2, startCommand, startCommandLength, &transferred, 0);if (r == 0 && transferred == startCommandLength){printf("\nWrite successful!");}elseprintf("\nError in write! res = %d and transferred = %d\n", r, transferred);strcpy(stringCommand, "{\"type\":\"setOption\",\"data\":{\"option\":\"doFFC\",\"value\":true}}");startCommandLength = strlen(stringCommand) + 1;printf("\nEP 0x02 to be sent: %s", stringCommand);// avoid error: invalid conversion from ‘char*’ to ‘unsigned char*’ [-fpermissive]unsigned char *stringCommandUns = (unsigned char *)stringCommand;//my_string1 = (unsigned char*)my_string;r = libusb_bulk_transfer(devh, 2, stringCommandUns, startCommandLength, &transferred, 0);if (r == 0 && transferred == startCommandLength){printf("\nWrite successful!");printf("\nSent %d bytes with string: %s\n", transferred, stringCommandUns);}else{printf("\nError in write! res = %d and transferred = %d\n", r, transferred);}}Now you can call this functions wherever you want in your state machine.If someone else need to discover other functionalities of flirone i can try to help you in my spare time. I owe so much to this thread

author: MDC
author_rank: Newbie
timestamp: August 05, 2017, 07:02:31 am
content: @da-nieI am having trouble getting a thermal image on my PC using FlirOneControl. I am attempting to install the FLIR One for Android on an Acer Aspire One ZG5 Netbook which is running Windows XP SP3. After inserting the FLIR One device in a USB port, each of the 3 drivers required a file WdfCoInstaller01009.dll (link supplied by tomas123; I assume for x86), which I had to place in the "Driver for FLIR One Gen 2 for XP" folder. In Device Manager, under "FlirOne Gen 2 FileIO", there are 3 devices listed and another under "Universal Serial Bus controllers" called "USB Composite Device". In the "Image" folder, I am getting .tga files, but they are blank, because the screen is blank. The FLIR One when fully charged is supposed to run for 30 minutes. When I first turn it on, the power button turns orange, then red, then blinks green, which indicates that it is ready. I have attached an image of the Device Manager and an image of the English version of FlirOneControl. I would appreciate your help.

author: da-nie
author_rank: Contributor
timestamp: August 06, 2017, 07:10:39 am
content: Hm... Images are not collected - data image is lost.Version of the program with saving all data from the Flir One.If data is received, a file is "flir_data.txt" created.

author: da-nie
author_rank: Contributor
timestamp: August 06, 2017, 07:20:36 am
content: Now I connected it to the computer on the front of the system unit - there is also no image. I connected it from the back of the system unit - the image appeared. Try different USB connectors. Try to turn on the program, and then Flir One. Or vice versa. Try another cable (maybe your cable is low-frequency).

author: MDC
author_rank: Newbie
timestamp: August 06, 2017, 09:27:13 am
content: @ Da-nieThanks for your timely response. I tried all 3 USB ports, turning on the FlirOneControl program before and after starting FLIR One (still no image displayed). I only have one cable, so I can't test another (the length is only 5 inches long; I assume the quality is good). I ran your test program "FlirOneControl-english (test).zip" which produced the "flir_data.txt" file attached (I only ran FLIR One for about 1 second to keep the data file under 1MB, because the file grew very quickly). Hopefully you can find a problem in this data file.

author: da-nie
author_rank: Contributor
timestamp: August 06, 2017, 03:23:05 pm
content: CRC in line error. Hm...Here is the program without CRC and your image in .txt file (in file 8 images).By the way, try to change in the BIOS USB 1.0 or USB 2.0 Legacy.Code:00 50 - headerdf 5a - crc=5adfData line:fb 1f fc 1f02 20 fa 1f 05 20 09 20 ff 1f 00 20 04 20 fe 1f0e 20 06 20 0a 20 07 20 0b 20 16 20 11 20 08 2008 20 04 20 08 20 09 20 0d 20 0b 20 0a 20 00 2006 20 02 20 04 20 08 20 10 20 08 20 0d 20 09 2007 20 0b 20 14 20 09 20 0c 20 09 20 08 20 0b 2011 20 0f 20 10 20 ff 1f 0c 20 08 20 0a 20 0e 2004 20 11 20 03 20 0e 20 ff 1f 0b 20 09 20 02 200f 20 06 20 0b 20 02 20 0e 20 0c 20 05 20 05 2003 20 07 20 05 20 06 20 0c 20 08 20 12 20 0d 2011 20 13 20 16 20 13 20 12 20 16 20CRC=f583 (header=0x00 0x00 and CRC in package=0x00 0x00 - in Lepton 3 manual page 39).QuoteCode:unsigned char byte_array={0x00,0x00,//header (with mask 0x0FFF)0x00,0x00,//CRC in package =00xfb,0x1f,0xfc,0x1f,0x02,0x20,0xfa,0x1f,0x05,0x20,0x09,0x20,0xff,0x1f,0x00,0x20,0x04,0x20,0xfe,0x1f,0x0e,0x20,0x06,0x20,0x0a,0x20,0x07,0x20,0x0b,0x20,0x16,0x20,0x11,0x20,0x08,0x20,0x08,0x20,0x04,0x20,0x08,0x20,0x09,0x20,0x0d,0x20,0x0b,0x20,0x0a,0x20,0x00,0x20,0x06,0x20,0x02,0x20,0x04,0x20,0x08,0x20,0x10,0x20,0x08,0x20,0x0d,0x20,0x09,0x20,0x07,0x20,0x0b,0x20,0x14,0x20,0x09,0x20,0x0c,0x20,0x09,0x20,0x08,0x20,0x0b,0x20,0x11,0x20,0x0f,0x20,0x10,0x20,0xff,0x1f,0x0c,0x20,0x08,0x20,0x0a,0x20,0x0e,0x20,0x04,0x20,0x11,0x20,0x03,0x20,0x0e,0x20,0xff,0x1f,0x0b,0x20,0x09,0x20,0x02,0x20,0x0f,0x20,0x06,0x20,0x0b,0x20,0x02,0x20,0x0e,0x20,0x0c,0x20,0x05,0x20,0x05,0x20,0x03,0x20,0x07,0x20,0x05,0x20,0x06,0x20,0x0c,0x20,0x08,0x20,0x12,0x20,0x0d,0x20,0x11,0x20,0x13,0x20,0x16,0x20,0x13,0x20,0x12,0x20,0x16,0x20};int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevstance,LPSTR lpstrCmdLine,int nCmdShow){unsigned short crc=0x0000;unsigned short *ptr=reinterpret_cast<unsigned short*>(byte_array);for(long m=0;m<164/2;m++){unsigned short word=ptr;crc^=word;for(unsigned char n=0;n<16;n++){if (crc&0x8000) crc=(crc<<1)^0x1021;else crc<<=1;}}char str;sprintf(str,"CRC:%04x",crc);MessageBox(NULL,str,"Ok",MB_OK);return(0);}Why your Flir One CRC=f583 and CRC in package=5adf - i don't know.Lepton error?My Flir One CRC is equivalent.

author: MDC
author_rank: Newbie
timestamp: August 06, 2017, 08:18:29 pm
content: @Da-nieThere is no option in BIOS to change the USB version. However, I tried your program "FlirOneControl-english-no_crc.zip", and it works. Excellent job! Thanks for your help. If you need anymore testing, just let me know.

author: da-nie
author_rank: Contributor
timestamp: August 06, 2017, 08:21:18 pm
content: Great!Unknow error CRC...

author: da-nie
author_rank: Contributor
timestamp: August 13, 2017, 08:38:09 am
content: My scanning of Hause.

author: da-nie
author_rank: Contributor
timestamp: September 02, 2017, 07:47:18 pm
content: I create device with STM32F4Discovery board (this board have USB-HOST). Flir One Gen 2 connected with USB. I created project for CubeMX with STM32F407VGT. Flir One connects, reports parameters, completes enumeration, opens pipes, but does not transmit data. Commands for stopping and starting interfaces are not executed.I attached main.c file. Maybe someone will tell me what I did wrong.Thank you.

author: da-nie
author_rank: Contributor
timestamp: September 03, 2017, 09:51:05 am
content: Hm. Flir One FFC control with programm for STM32F4. But no data with restart interface...--------------------------------------------------------------------I am surprised. I read descriptor of interface. bAlternateSetting=1 means that the interface does not have end points! The bAlternateSetting=0 means that there are endpoints.SetConfiguration( bInterfaceNumber=1, bAlternateSetting=0) - EP=0x83, 0x04;SetConfiguration( bInterfaceNumber=1, bAlternateSetting=1) - No EP!!!SetConfiguration( bInterfaceNumber=2, bAlternateSetting=0) - EP=0x85, 0x06;SetConfiguration( bInterfaceNumber=2, bAlternateSetting=1) - No EP!!!But initialize Flir One is:1) SetConfiguration( bInterfaceNumber=1, bAlternateSetting=0)2) SetConfiguration( bInterfaceNumber=2, bAlternateSetting=0)3) SetConfiguration( bInterfaceNumber=2, bAlternateSetting=1) - No EP.4) SetConfiguration( bInterfaceNumber=1, bAlternateSetting=1) - No EP.How can this be?In LinuxQuoteIn STM32F wMaxPacketSize=64.And:Quote

author: da-nie
author_rank: Contributor
timestamp: September 04, 2017, 06:01:30 pm
content: tomas123, please tell me how you intercepted the USB excange?

author: tomas123
author_rank: Frequent Contributor
timestamp: September 04, 2017, 08:09:33 pm
content: Da-nie, currently I don't work with Flir One and Raspberry Pi. All steps for the usb handshakes are documented in our c code. This are the exact replays of the original Flir One App communication.Look there...

author: da-nie
author_rank: Contributor
timestamp: September 05, 2017, 07:14:54 am
content: The device startup sequence is known. I'm curious, how did you intercept the exchange via USB? I want to see what STM32F4 is requesting and what Flir One is responsible for.---------------------------------------------------------------Updated.I change in function OpenPipe 512 ?? 64 byte. I receive data!!!

author: tomas123
author_rank: Frequent Contributor
timestamp: September 06, 2017, 11:35:00 am
content: The usb communication is tricky, because there are some influences of the chipset.So far, I have not understood the logic behind the usb block length of my rapsberry pi.I'm glad about all the incoming data and build the data together.After all there are frequently drops inside the steam (we get a broken frame)

author: da-nie
author_rank: Contributor
timestamp: September 06, 2017, 05:57:10 pm
content: Size of block i know:1) Full Speed and Low Speed = 64 bytes ma.2) High Speed = 512 bytes max.My STM32F4 is Full Speed. => 64 bytes.

author: tomas123
author_rank: Frequent Contributor
timestamp: September 07, 2017, 06:21:48 am
content: yes, this is the buffer size of the "hardware" bufferWhile a bulk read from endpoint you get larger packets from the "usb driver" buffer.I wrote about the packet size from driver buffer...

author: kerio
author_rank: Newbie
timestamp: October 11, 2017, 08:32:24 am
content: Hi, has anyone figured out the exact details on how the MSX algorithm works, at least regarding the coordinate transform between the visible and the thermal? I'm trying to figure out how to go from visible to thermal, and the extracted calib.rsc has a whole bunch of parameters, none of which seems to work fine as a simple scaling factor.

author: tomas123
author_rank: Frequent Contributor
timestamp: October 11, 2017, 07:39:01 pm
content: Look at my footer.There is a php script with two samples for MSX with Imagemagick

author: kerio
author_rank: Newbie
timestamp: October 12, 2017, 05:06:26 am
content: AIUI your script relies on the "raw" thermal data from radiometric jpegs saved with the flir app, is that correct?That raw data is already preprocessed in some way that does alter the geometry of the image, as far as i can tell; which is likely the reason for the 320x240 resolution.

author: tomas123
author_rank: Frequent Contributor
timestamp: October 12, 2017, 07:37:19 am
content: yes, its a workflow for the Flir radiometric jpgsQuote from: tomas123 on May 02, 2016, 09:04:40 am

author: da-nie
author_rank: Contributor
timestamp: October 13, 2017, 04:13:23 pm
content: New version programm for Flir One Control (without drivers in this archive). Added Video!

author: da-nie
author_rank: Contributor
timestamp: October 15, 2017, 10:06:42 am
content: GitHub repository:Flir One Drivers:https://github.com/da-nie/FlirOneDriversFlir One Control:https://github.com/da-nie/FlirOneControlFlir One Raw Analizer:https://github.com/da-nie/FlirOneRAWAnalizer

author: G0MJW
author_rank: Regular Contributor
timestamp: October 15, 2017, 04:36:13 pm
content: Quote from: da-nie on October 15, 2017, 10:06:42 amThis looks rather interesting as there are Windows 7 drivers. Maybe they will work with Windows 10? How are they installed?Mike

author: da-nie
author_rank: Contributor
timestamp: October 15, 2017, 06:15:33 pm
content: No! Windows 7 Drivers can not be installed! These drivers are compiled for Windows 7, but they can not be installed. Only XP...

author: da-nie
author_rank: Contributor
timestamp: October 15, 2017, 06:46:53 pm
content: Flir One Gen 2 and STM32F4Discovery.https://github.com/da-nie/nightvisionDisplay 320x240 with HX8347D controller.Connect:D0-D7 - PE4-PE11CS - PE12RD - PE13RW - PE14RS - PE15RST - PE2Project from Keil 5 with Cube MX. If 3 second not image then microcontroller is restart.STM32F4 and Flir One Gen 2

author: misterno
author_rank: Contributor
timestamp: October 27, 2017, 04:24:54 pm
content: Please i need desperately your expert help.As i didn't manage to work my F1G2 android device, i decided to teardown and check some things.When i connect the device with micro usb-to usb and then to old WIN XP PC, founds a new hardware.I tried to install the xp drivers made by Da-Nie but it doesn't work. The device remains with yellow exclamation mark.Then i supposed that the medium black chip might need re flowing. I did that but no luck again.I 'm ready to re-flow the big Atmel chip also. But before doing this, i ask you help and advice from experts.The device power on and after some orange red light, the green light flashes but my samsung A5 android cannot recognize it.The shutter on off and on again.Any help will be appreciated.TIA

author: da-nie
author_rank: Contributor
timestamp: October 27, 2017, 05:42:29 pm
content: QuoteFound three device?QuoteAll three devices?QuoteThis is correct.Quotemedium black chip???

author: misterno
author_rank: Contributor
timestamp: October 27, 2017, 06:40:58 pm
content: Dear Da-Niethank you for reply.Please let me explain with photo's:The chip i did reflow is the big square oneWin XP founds only ONE UKNOWN device.This is the Atmel chip side.This is the Lepton module from device.I don't know what chip envolves with the Lepton module though.TIA

author: da-nie
author_rank: Contributor
timestamp: October 27, 2017, 06:55:56 pm
content: Quotei.e? This is lepton.

author: misterno
author_rank: Contributor
timestamp: October 27, 2017, 07:04:02 pm
content: Quote from: da-nie on October 27, 2017, 06:55:56 pmYes, this is lepton camera module. I was wondering how this module involves with the other chips like the Atmel. In the worst case, i will take this module and try to do another interface with it.Or i can buy a lepton breakout board and use it. My question is how to test if this module is ok or not? Is it a good idea try to reflow the Atmel chip or it has no interference with the camera module?TIA

author: Fraser
author_rank: Super Contributor
timestamp: October 27, 2017, 07:44:08 pm
content: I have yet to see a LEPTON failure through natural means rather than abuse.Take care if considering a reflow on the micro. It is supported with epoxy and this prevents the IC free floating on the liquid solder balls. Cracked solder balls could actually separate leaving a gap between the IC and PCB pads. You really should remove the securing epoxy and the IC, before re-balling and re-fitting. You could try a simpler approach though.Fraser

author: misterno
author_rank: Contributor
timestamp: October 27, 2017, 08:01:28 pm
content: Quote from: Fraser on October 27, 2017, 07:44:08 pmYes i noticed that. I put hot air at 180 degrees and melt carefully the epoxy. My question though is:If i manage to reflow the Atmel with no harm, will it be the cause of the fault? What does it doing?TIA

author: misterno
author_rank: Contributor
timestamp: October 29, 2017, 07:31:11 pm
content: Today i just finished the reballing of the chip and tomorrow i will try to put it in his place.I also did write down the test points connections with the chip and i will post them for reference here.

author: fnoop
author_rank: Newbie
timestamp: November 11, 2017, 07:49:53 am
content: Hi, I haven't tried this on earlier versions of Raspbian based on debian jessie, but the latest version based on debian stretch is really simple to install working v4l2loopback:sudo apt install raspberrypi-kernel-headers libusb-1.0-0-dev dkms v4l2loopback-utils v4l2loopback-dkmssudo modprobe v4l2loopback video_nr=0,1,2,3If it's OK, as per previous replies a way back, I'll create a git repo with the contents of flir8p1-gpl.tar (unless someone has already done it that I missed?)

author: Uho
author_rank: Frequent Contributor
timestamp: November 11, 2017, 08:35:17 am
content: Quote from: misterno on October 29, 2017, 07:31:11 pmHey. Did you manage to solder the chip? I have Flir One with the same problem. To begin with, I warmed up the atmel a little. The thermal imager worked a week. And again it does not work.

author: fnoop
author_rank: Newbie
timestamp: November 11, 2017, 08:55:34 am
content: Is there any way of keeping the flir one awake, or waking it up through usb? It has a very short timeout where it goes to sleep and then you have to physically press the button. This is no good if it's mounted somewhere (outside of a house, drone, etc)

author: fnoop
author_rank: Newbie
timestamp: November 11, 2017, 12:45:04 pm
content: Initial cleanup and commit to git repo here:https://github.com/fnoop/flirone-v4l2

author: sheepsheep
author_rank: Newbie
timestamp: November 13, 2017, 09:33:04 am
content: Question about the color palettes (*.raw files): How do you create a specific color palette? Is rainbow.raw a standardized file format? Where can I download more color palettes or how can I create more? Is a source code available?

author: misterno
author_rank: Contributor
timestamp: November 13, 2017, 09:59:39 am
content: Unfortunately the device is still in coma!I 'll wait for new equipment and i will try one last time to "revive" it and the i 'll post the results here.C ya!

author: Uho
author_rank: Frequent Contributor
timestamp: November 13, 2017, 10:05:34 am
content: Have you replaced the AT91SAM9X25-CU?

author: misterno
author_rank: Contributor
timestamp: November 13, 2017, 10:27:02 am
content: Quote from: Uho on November 13, 2017, 10:05:34 amNo i didn't manage to do it yet. I 've already order some bga stuff to do the job more precisely.

author: newex
author_rank: Contributor
timestamp: November 16, 2017, 07:28:17 pm
content: Quote from: Uho on November 13, 2017, 10:05:34 amI had the same trouble. Atmel chip reballing does not solve the problem.In my case, the nand flash chip reballing helped. After this device works good.

author: Uho
author_rank: Frequent Contributor
timestamp: November 16, 2017, 07:49:25 pm
content: The nand flash chip - it 6HA98?

author: newex
author_rank: Contributor
timestamp: November 16, 2017, 07:55:17 pm
content: Micron NAND FlashThis is NAND Flash and DDR in one chip.

author: Uho
author_rank: Frequent Contributor
timestamp: November 16, 2017, 08:20:39 pm
content: In my case, after warming up Atmel, the thermal imager worked a week. Now it can only work a few minutes if you heat Atmel. It is glued with a compound and I can not remove it. The thermal imager does not respond to memory heating.

author: newex
author_rank: Contributor
timestamp: November 16, 2017, 08:35:37 pm
content: Ok, try it. I have already passed this way.

author: Uho
author_rank: Frequent Contributor
timestamp: November 29, 2017, 10:28:20 am
content: Help is needed. I decoupled the AT91SAM26 and lost the resistor. Tell me please his resistance. It is connected to the pin F1 - TCLK4

author: Fraser
author_rank: Super Contributor
timestamp: November 29, 2017, 11:53:03 am
content: It is a 10K Ohm resistorJust measured it on one of my units.Fraser

author: Uho
author_rank: Frequent Contributor
timestamp: November 29, 2017, 11:57:04 am
content: Thank you very much!

author: Fraser
author_rank: Super Contributor
timestamp: November 29, 2017, 11:58:43 am
content: When applying heat in the area of that Atmel chip, do be conscious of the components on the other side of the PCB. Whilst an issue may appear to come from the large Atmel chip, heat is also warming the clock oscillator etc on the the other side. It is always worth checking these components before considering a reballing operation on the Atmel.Clock oscillators do fail and sometimes respond to heat.Fraser

author: Fraser
author_rank: Super Contributor
timestamp: November 29, 2017, 12:00:12 pm
content: Uho,No problem. I always have a FLIR One disassembled in case I need to check something on the PCBFraser

author: Uho
author_rank: Frequent Contributor
timestamp: November 29, 2017, 12:12:58 pm
content: Quote from: Fraser on November 29, 2017, 11:58:43 amI tried to heat Clock oscillators. There was no result.

author: Fraser
author_rank: Super Contributor
timestamp: November 29, 2017, 12:27:51 pm
content: It would be great if someone with the available time would reverse engineer the FLIR One G2, at least to the point of a block diagram showing all major components. It may help others to identify helpful test points and likely causes of faults.With a non responsive FLIR One G2, it is always the power supply circuit that should be checked first as I have little confidence in this area of the design. As for the battery.....I owned two FLIR One G2 units from new. One was lightly used and the other sat in its sealed box, untouched. Both sat unused for several months. A fellow forum member wanted to buy my sealed unit and I was concerned whether the battery was OK. As soon as I connected the USB power supply, the camera began to charge normally. After testing, the cameras run time was a healthy 60 minutes. I tested my other FLIR One G2 that I have used. It also charged easily and ran for 60 minutes .I carried out a test on three faulty units that await my attention (no boot) All of them took some coaxing to start their charge cycle. A coincidence or sign that those units have a duff battery or charge controller ? Those units were fully charged only a couple of months ago yet the charge circuit saw the battery as below normal charge initiation point. Hmmmm, something is not right there.Fraser

author: lambcutlet
author_rank: Contributor
timestamp: December 27, 2017, 09:26:02 am
content: hello,its my first post here so please go easy. I'd been reading this forum on and off for about a month now and thought i would have a punt at buying a faulty Flir one gen2 from Ebay.To help others I thought i would share info i have found so far, see attachment.In my case connector J7 the 4pin connector to the USB board had been wedged up breaking a solder joint. Once resoldered it now connected to my phone. However the punter on Ebay I bought the Flir from must also be trying to repair these as he has torn the ribbon cable to the visible camera. So the Flir will connect to the phone I can check the firmware but their is no display. Thinking i had purchased rubbish I then obtained a v1.4 breakout board from digikey in the hope the Lepton3 was as people have mentioned in the forum, bullet-proof. I hooked it up to a raspberry-pi using this, pylepton (branch lepton3)https://github.com/groupgets/pylepton/tree/lepton3and thankfully it worked.Questions:Can anyone identify the visible camera? I need a replacementDoes anyone else use the raspberry-pi with a breakout board and Lepton3? and what software do you use? (off topic sorry)'Charging the battery' to help Frasers previous query. The USB input feeds a BQ24295 which charges the battery and shares power to the system via multiple step-down convertors (markings C1xx, SM33G & SM28G). The BQ24295 can be and is controlled in part by the processor having found the username and password in these forums I poked around and found '/etc/battery.cfg' a file which specifies numerous controlling parameters, such as 'BATT_CHARGING_TIMEOUT_S=14400'.here's the contentsCode:$ cat /etc/battery.cfg# max verbosity 3DEBUG_LEVEL=0# polling interval in msecPOLL_PERIOD_MS=100# number of polling intervals before writing first statusSTATUS_UPDATE_STARTUP_WAIT=100# number of polling intervals between writing statusSTATUS_UPDATE_TICKS=10# number of polling intervals between logging statistics (if enabled)LOG_UPDATE_TICKS=100# number of consecutive polling intervals switch reads low to shut downSHUTDOWN_TICKS=10# time to try charging again after charger signals thermal faultFAULT_RECOVERY_TICKS=600# maximum time for trying to charge own battery:# if battery is still not full after attempting to charge this long,# assume there is a hardware problem and go into fault stateBATT_CHARGING_TIMEOUT_S=14400# grace period for power-down: really turn off if switch stays 'off' this long# special value of '0' disables switch checking (useful for bare boards)POWEROFF_DEBOUNCE_MS=2000# number of voltage readings to average when calculating battery levelNUM_VBATT_READINGS=5# weight for filter used to smooth battery level estimateCHARGE_FILTER_WEIGHT=0.9835# voltage offset when USB5V is connected# (subtracted from voltage reading)USB5V_VOLTAGE_OFFSET=0.04# minimum voltage (in mV) allowed from chargerMINIMUM_INPUT_VOLTAGE_MV=4520# whether to allow iphone charging when own battery is fullENABLE_PHONE_CHARGING=1# timeout for staying phone charge mode if own battery is less than full# (avoids leaving battery partially full after charger chip stole stole# charge to boost current to phone)PHONE_CHARGING_TOPOFF_TIMEOUT_S=1800# whether to force statistics logging on startupAUTO_ENABLE_LOGGING=0# location of logfile (if logging is enabled, via autostart or socket command)LOGFILE_PATH=/var/log/battery_statistics.log## app management when 5V is plugged/unplugged# command to run just usb app for charge-only modeSTART_CHARGE_ONLY_COMMAND=/etc/init.d/userapps charge-only# command to start streaming when switch turns "on"START_STREAMING_COMMAND=/etc/init.d/userapps start#command for system shutdownSHUTDOWN_COMMAND=sync && echo o > /proc/sysrq-trigger# how long after startup should we wait for activity before sleepingDEEP_SLEEP_TIMEOUT_S=120# how long after disconnect should we wait before sleepingPOWER_SAVE_TIMEOUT_S=120# how many ticks between checking for deep sleep or power save statesPOWER_SAVE_CHECK_TICKS=25So charging the battery is not a simple constant current constant voltage system it has smarts for added control and safety in the form of the BQ24295 in conjunction with the processor.And to check 'battery voltage & status' issue this command 'cat /var/log/battery/status'

author: Uho
author_rank: Frequent Contributor
timestamp: December 27, 2017, 09:48:14 am
content: The lack of a video camera does not interfere with getting the battery charge status. Do you see the battery on the phone screen? Yes, without a camera there will not be a thermal image. I also did not find a camera with this kind of connector. I'm now looking for a memory chip.

author: Fraser
author_rank: Super Contributor
timestamp: December 27, 2017, 11:56:43 am
content: Lambcutlet,Very sorry to hear that someone had been inside your F1G2 before you. That is always a worry as you do not know what further damage has been done. The classic 'heat it with a paint stripper' to reflow the chips comes to mindThank you very much for the detail on the charge management. The FLIR i series use similar.I am not a software tech but would like to take a look around inside my faulty F1G2 and DUO R cameras. Can you detail how you wentvabout accessing the file system in the F1G2. I know how to do it with i and E series cameras but not on the F1G2. Many Thanks.Fraser

author: misterno
author_rank: Contributor
timestamp: December 27, 2017, 12:23:25 pm
content: Hi all. Merry Christmas!I have a flir one for android and after many attempts i end up with a damaged CPU. Is it possible though to check if the flir sensor is working even with other interface as well?TIA

author: lambcutlet
author_rank: Contributor
timestamp: December 28, 2017, 06:47:14 am
content: Fraser, how much do you know about linux? below is some basic commands to help you navigate with exampleshardware setup. note: attach micro USB cable otherwise board powers downsolder 3 wires to Tx,Rx & Gnd (see my previous document for locations) using a TTL to USB convertorhttps://shop.clickandbuild.com/cnb/shop/ftdichip?productID=53&op=catalogue-product_info-null&prodCategoryID=296. then using puttyhttp://www.putty.orgto connect to the serial port of the TTL cable using settings 115200, 8n1.so now when you power-up the Flir one you should see the boot sequence ending with a prompt'Welcome to Rosebud (Operational)(none) login:'Code:RomBOOTStart AT91Bootstrap version svn-r5344 ...Init HALF drive strength DDR... BOARD_ConfigureDdram()DDRSDRC->DDRSDRC_LPR: 0x12101Done!Downloading image...Trying to load uboot...nandflash_hw_init()reset_nandflash()AT91F_NandReadID()ManufacturerID: 0x2c DeviceID: 0xa1chip id: 0x2ca1Copy 0x50000 bytes from 0x40000 to 0x23f00000nandflash_cfg_8bits_dbw_init()switch(sNandInfo.uDataNbBytes) 2048:read_nandflash: while (1)read_nandflash: while (1)read_nandflash: while (1)read_nandflash(): return 0;Done!Returning jump to 0x0x23f00000U-Boot 2010.06-svn5344 (Aug 03 2015 - 13:27:27)DRAM: 64 MiBNAND: nand->ecc.bytes 28nand->ecc.steps 1nand->ecc.layout = pmecc_oobinfo_2048host->mm 13host->nn 8191host->tt 4host->sector_size 512host->sector_number 4host->ecc_bytes_per_sector 7host->alpha_to 0x10C000host->index_of 0x108000128 MiB*** Warning - bad CRC or NAND, using default environmentIn: serialOut: serialErr: serialNet: macb0, macb1eth_enable not set, skipping macb init.eth_enable not set, skipping macb init.Watchdog enabled.Hit CTRL-C to stop autoboot: 0Data (writethrough) Cache is ONboot operationalLoading from nand0, offset 0xe00000Image Name: Linux-2.6.39+Image Type: ARM Linux Kernel Image (uncompressed)Data Size: 3358884 Bytes = 3.2 MiBLoad Address: 20008000Entry Point: 20008000Bit flip in data area, byte_pos: 772, bit_pos: 5, 0xbc -> 0x9cBit flip in data area, byte_pos: 192, bit_pos: 4, 0x72 -> 0x62Bit flip in data area, byte_pos: 1503, bit_pos: 4, 0x72 -> 0x62Bit flip in data area, byte_pos: 826, bit_pos: 0, 0x27 -> 0x26Bit flip in data area, byte_pos: 937, bit_pos: 2, 0xbe -> 0xbaBit flip in data area, byte_pos: 104, bit_pos: 3, 0xfc -> 0xf4Bit flip in data area, byte_pos: 1636, bit_pos: 7, 0xc3 -> 0x43Automatic boot of image at addr 0x22000000 ...## Booting kernel from Legacy Image at 22000000 ...Image Name: Linux-2.6.39+Image Type: ARM Linux Kernel Image (uncompressed)Data Size: 3358884 Bytes = 3.2 MiBLoad Address: 20008000Entry Point: 20008000Verifying Checksum ... OKLoading Kernel Image ... OKOKStarting kernel ...Uncompressing Linux... done, booting the kernel.[ 0.025000] AT91: CM rev B and higher[ 0.037000] AT91: EK rev B and higherStarting watchdog...donemounting jffs2 READ-ONLY...donestart battery charge controlStarting battery_charge: OKdoneFormatting /tmp/versions: OK[ 1.666000] lepton_init[ 1.672000] lepton_probe: using 16-bit SPI widthWelcome to Rosebud (Operational)(none) login:now enter the username and password to gain accessCode:Welcome to Rosebud (Operational)(none) login: rootPassword:login: root login on ‘ttyS0‘-sh: id: not foundsh: bad number-sh: id: not found-sh: /bin/hostname: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found-sh: alias: not found$you now have a root prompt.type 'ls' to show what's in your directorytype 'pwd' to show where you areCode:$ lsRBTest.sh shared_files$$ pwd/root$you are in directory '/root'now 'cd' to change directory, example 'cd shared_files/'then 'ls' to show contentsCode:$ cd shared_files/$ lsCameraFiles.zip lepton_info.txt version_dv.txtbatteryvoltages.txt manufacturing_data.txt version_op.txtconnector_type version.txt version_up.txt$to view the contents of regular files use 'cat' for example 'cat batteryvoltages.txt'Code:$ cat batteryvoltages.txt764762765762765$use 'cd ..' to move up a directory levelCode:$ pwd/root/shared_files$ cd ..$ pwd/root$using the above commands you can now navigate by changing directories, view the contents of that directory and view file contents.so now on to more interesting locations the root of the linux system 'cd /' and perform 'ls'Code:$ cd /$ lsbin home linuxrc proc sys vardev init mnt root tmp version.txtetc lib opt sbin usr$this is the root of the systemthis may help as a general guide to explain folder contentshttp://www.thegeekstuff.com/2010/09/linux-file-system-structure/location of log files '/var/log/'location of config files '/etc/'other helpful commands:type 'reboot' to reboot the Flir one processortype 'poweroff'' to powerdown and disconnect

author: lambcutlet
author_rank: Contributor
timestamp: December 28, 2017, 06:54:19 am
content: misterno, I used a lepton breakout boardhttps://www.digikey.co.uk/products/en/development-boards-kits-programmers/evaluation-boards-sensors/795?k=leptonand a raspberry pi to check the thermal sensor, like thishttps://learn.sparkfun.com/tutorials/flir-lepton-hookup-guide

author: Fraser
author_rank: Super Contributor
timestamp: December 28, 2017, 03:29:54 pm
content: @Lambcutlet,Many thanks for the excellent guide to accessing the file system. That is really helpful to me. I am no Linux guru but I will study the Linux command set and work on gaining a better knowledge of it. My previous experience has only been with Knoppix !I believe my FLIR PM series cameras also run Linux so I shall have to access their engineering serial port and do some digging around in them as well.Many thank againFraser

author: misterno
author_rank: Contributor
timestamp: December 29, 2017, 09:40:58 am
content: Quote from: lambcutlet on December 28, 2017, 06:54:19 amThank you for immediate reply. I mention that my PCB is in good condition. Is it any chance to order a new empty CPU and do the programming later?If that happens i would be very pleased.

author: tomas123
author_rank: Frequent Contributor
timestamp: December 30, 2017, 01:28:25 pm
content: @lambcutletFthanks for sharing the information, how to debug the F1G2

author: mahony
author_rank: Regular Contributor
timestamp: December 30, 2017, 05:01:39 pm
content: Hi lambcutlet,very nice Infos!Do you have pictures of your wiring setup?Did you just connect the TTL to USB to the original USB pins?Regards

author: Fraser
author_rank: Super Contributor
timestamp: December 30, 2017, 06:24:24 pm
content: Mahoney,The wiring points are shown on the open office text document that was provided but it needs to be viewed by an Open Office capable program. I converted it to PDF using an on line converter.Fraser

author: lambcutlet
author_rank: Contributor
timestamp: January 04, 2018, 10:15:21 pm
content: misterno,I have never programmed an Atmel CPU but I suspect replacing a broken CPU with a blank version will not solve your problem. There has to be some embedded code programmed into the device to make it function.Maybe others with more programming experience of these devices could help.

author: Uho
author_rank: Frequent Contributor
timestamp: January 08, 2018, 12:29:55 pm
content: I got two not working thermal imager. The first one has problems with calibration. The second thermal imager does not turn on. 1.The shutter does not work. This problem arises from the poor quality of conductive paste. This paste is connected to the conductive paths in Lepton. Replace the paste with a good conductive coating. I make it from copper dust and nail polish. The main thing that a wife or daughter did not notice the loss of lacquer. 2. The thermal imager does not turn on. After connecting the dipstick of the oscillograph to quartz, it began to work. It works a few seconds or minutes well. Then the image freezes. The LED flashes. Shutter is working. The calibration button does not work. I checked the generation on quartz. Again there is no signal. There are three possible causes of failure. Quartz is defective. Defective capacitors next to it. Defective controller. I will look for quartz for replacement. maybe I'm lucky. Photo signals and voltages that should be. Maybe for someone it's useful.P.S. I changed the quartz. Nothing changed.

author: Uho
author_rank: Frequent Contributor
timestamp: January 14, 2018, 12:57:04 pm
content: lambcutlet,If you did not find the webcam, then you can try to connect an external one.1. Remove the SN9C270A.2. Connect the DM and DP of the external USB camera to the leads 29 and 30.3. Feed 5v and ground wire connect to the USB connector of the thermal imager.If the webcam 640x480 then it should work.

author: in.Vitro
author_rank: Regular Contributor
timestamp: January 19, 2018, 07:20:25 am
content: Quote from: Uho on January 14, 2018, 12:57:04 pmthis will not work for the iOS Version, right?

author: Uho
author_rank: Frequent Contributor
timestamp: January 19, 2018, 07:57:49 am
content: I do not know that. But Seek is only a connector. I changed the plug and the thermal imager worked on the android. I did not repair Flir one ios. Therefore, I can not say exactly whether they are the same.

author: newex
author_rank: Contributor
timestamp: January 19, 2018, 02:50:18 pm
content: There are two board revisions. The difference between them in the presence of a single chip. Both work on android or iOS. They are absolutely identical functionally. I put a board from the iOS version into the case for the android and it worked.

author: kazik151
author_rank: Newbie
timestamp: March 02, 2018, 11:22:29 pm
content: Hello,I have read about all amazing things that you've done with F1G2 and I'd like to ask you for advice. My Flir One is totally down. When I plug the battery, it sends part of boot sequence to the serial port:Code:RomBOOTStart AT91Bootstrap version svn-r5344 ...Init HALF drive strength DDR... BOARD_ConfigureDdram()DDRSDRC->DDRSDRC_LPR: 0x12101Done!Downloading image...Trying to load uboot...nandflash_hw_init()reset_nandflash()AT91F_NandReadID()ManufacturerID: 0x2c DeviceID: 0xa1chip id: 0x2ca1Copy 0x50000 bytes from 0x40000 to 0x23f00000nandflash_cfg_8bits_dbw_init()switch(sNandInfo.uDataNbBytes) 2048:read_nandflash: while (1)read_nandflash: while (1)read_nandflash: while (1)read_nandflash(): return 0;Done!Returning jump to 0x0x23f00000RomBOOTStart AT91Bootstrap version svn-r5344 ...Init HALF drive strength DDR... BOARD_ConfigureDdram()DDRSDRC->DDRSDRC_LPR: 0x12101Done!Downloading image...Trying to load uboot...nandflash_hw_init()reset_nandflash()AT91F_NandReadID()ManufacturerID: 0x2c DeviceID: 0xa1chip id: 0x2ca1Copy 0x50000 bytes from 0x40000 to 0x23f00000nandflash_cfg_8bits_dbw_init()switch(sNandInfo.uDataNbBytes) 2048:read_nandflash: while (1)read_nandflash: while (1)read_nandflash: while (1)read_nandflash(): return 0;Done!Returning jump to 0x0x23f00000Then nothing happens for the next 17 seconds when the orange light blinks once and then it starts all over again. So it is a kind of boot loop. Do you know is there anything that I can do to make it work?

author: wb0gaz
author_rank: Frequent Contributor
timestamp: March 07, 2018, 11:13:12 pm
content: I am trying to duplicate the installation on linux mint 17.3 described by tomas123 in reply 110 on December 31, 2015, 01:50:14 AM. Although the post was made over 2 years ago, it provides a solution that I seek: My goal is to get my Flir ONE G2 for Android running on a generic Linux machine.I am unable to complete the procedure, as I get stuck building the v4l2loopback module.I am running the same version of linux mint 17.3, but as a virtual machine (virtualbox guest.) This is the main (only?) difference between the procedure I am following and the procedure in the reply above.I am unable to complete install of the v4l2loopback module which is compiled from source per the instructions.In cd v4l2loopback/make works fine, however, when I issue the commandsudo make installto prepare v4l2loopback.ko, I receive an error about a missing key (presumably a cryptographic key).Here is the result of sudo make install:------------------------------------------------sudo make installmake -C /lib/modules/`uname -r`/build M=/home/dgf/v4l2loopback modules_installmake: Entering directory `/usr/src/linux-headers-3.19.0-32-generic'INSTALL /home/dgf/v4l2loopback/v4l2loopback.koCan't read private keyDEPMOD 3.19.0-32-genericmake: Leaving directory `/usr/src/linux-headers-3.19.0-32-generic'-------------------------------------------------As I cannot complete "make install", I cannot perform sudo modprobe v4l2loopback video_nr=1,2.I originally was trying this procedure with Ubuntu 16.04, but ran into the same (cryptographic key) problem, and as I didn't see mention of a key in reply 110 above, I thought I would be OK using Linux Mint 17.3, but that is not the case.While I have long ago successfully built kernel modules, I have not done this in quite some time, so the process of requiring inclusion of a cryptographic key is new to me. While I can find quite a bit of information on how to install linux with (or without) secure UEFI boot, I cannot find a clear explanation of how to build a kernel that involves a key.Any help/pointer very much appreciated!Dave

author: tomas123
author_rank: Frequent Contributor
timestamp: March 09, 2018, 09:02:03 am
content: Linux kernel driver are a pain andgoogleis your friend ;-)QuoteGoogle foundhttps://github.com/slavrn/gm12u320/issues/7and a german post with the same error message under Linux Mint by compiling a keyboard kernel driver:https://www.linuxmintusers.de/index.php?topic=33630.msg469267#msg469267Code:Can't read private keyDEPMOD 3.19.0-32-genericmake: Verzeichnis »/usr/src/linux-headers-3.19.0-32-generic« wird verlassenafter the last post in this thread it works after unbind/bind some driver and change the path...see this scripthttps://github.com/CMoH/lg4l/blob/master/rebind

author: yokoAC
author_rank: Newbie
timestamp: March 23, 2018, 06:15:17 pm
content: HeyI'm trying to use the FlirOne onWindows10My approach:- use the code you presented for Linux (based on libusb)- use Zadig ("Zadig is a Windows application that installs generic USB drivers, such as WinUSB, libusb-win32/libusb0.sys or libusbK, to help you access USB devices."): at the moment I'm using 'libsubK'Actually the interface 0x81 is working! E.g. I get log messages like the following one (I'm sorry, not at my working computer...copied this log msg from the forum, but I get quasi the same msg)Code:{"type":"sledInformation","data":"serialNumberBoard":"F03XXXXXXX","partNumberBoard":"21222222201","versionBoard":"D","serialNumberLepton":"32333331","versionLepton":"3.1.46","leptonQR":"A0777781","versionRosebudFactoryESW":"0.4.27","versionRosebudOperationalESW":"0.4.27","versionRosebudUpdaterESW":"0.4.27","versionRosebudAPI":"master.015ede4","gitRevision":"master.015ede4","automaticShutter":"Y","formFactor":"dongle","thermalHeight":"120","thermalWidth":"160","bigEndianThermal":"0","operatingMode":"operational"}}or some stuff about the battery status.My problem is, that 0x83 and 0x85 is not working. Using libusb_bulk_transfer() on these interfaces always returnsLIBUSB_ERROR_NOT_FOUNDDid anyone get this error? Maybe there is someone getting the same error while trying to get run the FlirOne on Windows10.I think there is maybe a problem how USB communication is done on Windows10 (...but why is 0x81 working?!). Sorry, I'm entirely new to this topicThanks!

author: yokoAC
author_rank: Newbie
timestamp: April 06, 2018, 05:16:53 pm
content: HeyIs there nobody who wants to get the FlirOne running on Windows10?I attached my FlirOne.cpp and the corresponding output.I tried to uselibusb_set_interface_alt_settinginstead oflibusb_control_transferto start/stop the interfaces 1 and 2 (not sure, if this is okay..).Now I get anLIBUSB_ERROR_IOerror on the endpoints 0x83 and 0x85 (instead of usinglibusb_control_transfer, where I would get theLIBUSB_ERROR_NOT_FOUNDerror).Corresponding to the OutputFile, the interfaces 1 and 2 have two alternate settings (0 and 1). Using 1 results inLIBUSB_ERROR_IOand using 0 results inLIBUSB_ERROR_NOT_FOUND.Maybe the approach usinglibusb_set_interface_alt_settingis completely wrong. Hopefully there is somebody with an idea how to connect to the endpoints 0x83 and 0x85.Thanks!

author: Ben321
author_rank: Frequent Contributor
timestamp: April 09, 2018, 11:26:48 am
content: Quote from: da-nie on March 27, 2017, 07:03:46 pmIf you use the program Zadig to install the WinUSB driver for the FLIR One device, then it should be possible to write a program using the WinUSB interface to control the FLIR One. In this way, you won't need to write a dedicated driver for FLIR One. WinUSB is available on all Windows systems, from XP all the way to Windows 10. Therefore, once you wrote your program and posted it to the internet, anybody could download it and use it. They would just need one extra step, and that is to download Zadig, and use it to install the WinUSB driver for FLIR One. Once they did that, your program would work to control the FLIR One.You could even include a copy of Zadig with your download of your FLIR One app, and include instructions in a text file explaining how to use Zadig to install the WinUSB driver for the FLIR One device.The nice thing about the WinUSB driver is that it is very generic, and can be installed for any device using Zadig. Once it is installed, if you know the USB commands that the device is expecting, you can use the WinUSB interface to send those commands to the device. The WinUSB interface is part of the Windows API. It's just a set of DLL functions that let you control any device that currently has the WinUSB driver installed.

author: yokoAC
author_rank: Newbie
timestamp: April 09, 2018, 07:55:00 pm
content: Hey guysActually, I have also tried using WinUSB (see attached file: sorry for inappropriate programming, I'm new to this windows stuff and just put different code examples together).I get the device and can receive some descriptors, but I'm not sure how to communicate with the device. I cannot change the alternate settings or the configuration.I think there is some bad windows stuff...e.g. WinUSBcannotset the configuration (configuration 3 is needed as you can see in the files which are running on Linux) as described inhttps://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/selecting-the-configuration-for-a-multiple-interface--composite--usb-d:QuoteThis could be the reason why it's running on Linux and not on Windows. The following 'project' tries to avoid this problem by using a so calledlower-level filter driver(https://nadavrub.wordpress.com/2014/10/16/winusb-with-non-default-configuration/). Too bad, that I do not get this one runningAll in all, maybe developing a driver might be the only chanceRemark: if anyone wants to monitor his USB output, I can recommend "Device Monitoring Studio". The first 14 days are for free.

author: da-nie
author_rank: Contributor
timestamp: April 13, 2018, 03:10:34 pm
content: QuoteI created the driver. But in Windows 7 and later it can not be installed. And Windows 7 and older does not see the Flir One.

author: yokoAC
author_rank: Newbie
timestamp: April 14, 2018, 11:52:15 am
content: Quote from: da-nie on April 13, 2018, 03:10:34 pmHey, are you talking about the three drivers you developed before? Or did you develop a 'one-driver' solution in the meantime, where no single driver installation for each interface is necessary?

author: da-nie
author_rank: Contributor
timestamp: April 14, 2018, 01:45:21 pm
content: I'm talking about the driver for each interface. There are three.

author: yokoAC
author_rank: Newbie
timestamp: April 16, 2018, 12:21:55 pm
content: Quote from: wb0gaz on March 07, 2018, 11:13:12 pmDid you get anything running on your virtual machine?I'm trying to use a virtual machine (VMware, Linux Mint 17.3) as well, but I cannot connect to the Flir..Actually all installation steps are successful, but when I start the flir8g-mint.c code I just get the following:Successfully find the Flir One G2 devicelibusb_set_configuration error -99Does anyone have this problem as well? Could this be related to my virtual machine?

author: tomas123
author_rank: Frequent Contributor
timestamp: April 19, 2018, 08:52:56 pm
content: I also had no success with vmware and usb (flir one).Quote from: tomas123 on December 29, 2015, 04:43:54 pm

author: budhafoo
author_rank: Newbie
timestamp: April 27, 2018, 01:59:16 am
content: This thread is awesome!I have not read all, but I felt like writing something.My flir one for android (2nd gen I believe) just died.The unit is blinking orange when charged, opened it, unplug the batt, tried all sort of things.When I manage to get the green light blinking, the unit is recognized using the app, but shows only blank/black screen.I havent opened the copper tape shielding to do some measurements, but unit surely gets really hot when the orange light is blinking, current from charger when plugged is around 500mA.If anyone can point me what can start to read/do that will be great.-B

author: careyer
author_rank: Contributor
timestamp: May 17, 2018, 01:58:42 pm
content: First of all thank you@tomas123&@cynfabfor the brilliant work!I am using the "flir8p1-gpl" Driver (11/2016) in conjunction withEZ-Wifibroadcaston a Reconnaissance & Inspection drone project. The FlirOneG2 is connected to a Raspberry Pi0 which is mounted to the drone.The Pi0 running EZ-Wifibroadcast streams a digital HD-Video feed and the FlirOneG2 Thermalvideo wirelessly to the Ground where it can be displayed via HDMI (or on a tablet). The same WiFi link (bi-directional) is also used to control the drone.The range is up to 8km. #mind-bogglingIt was excessive work to get everything working but finally I succeeded.However some minor problems (P) and questions (Q) remain and I hope I can get some help and guidance hereP1.)I noticed that quite often I get the "reset buffer because of bad Magic Byte" error. The system will continue working but that feels somehow uncomfortable (and I think it also drops some frames?)P2.)The FCC shutter is quite annoying during Air operations. Is there a parameter on the driver how to disable this calibration or at least do it less often?(everytime the video freezes for a sec the pilots heart almost stops)now for the questions:Q1.)Is "flir8p1-gpl.tar" (as from 11/2016) the latest version of the driver? User rbalint wanted to publish it on GitHub after tomas123 & cynfab gave their okay for the license.(However rbalint never wrote again or publsihed the GitHub link? - do i miss anything?)Q2.) Is it possible to get more then the ~9fps from the camera? I noticed that the linux password for the camera has been revealed. Has there been any attempt to remove this limitation or is the 9fps limitation hardware wise?Q3.) Is there a way to change the color-palette without restarting the Driver?Thank you so much for your help and terrific work.BTW: That's how my little project (codename: Predator) looks like... It is used for good ( saving fawns during harvest season)

author: cynfab
author_rank: Regular Contributor
timestamp: May 18, 2018, 02:16:41 am
content: Thanks for the nice words.Since the Flir One-G2 is no longer available other than used from e-bay I have not done too much with the code since 2016. The Flir One G3 is somewhat of a disappointment.So on to your problems & questions.P1, yes I have seen that error message, I have no clue as to what it means and the system does seem to continue running. I think it may have to do with Flir's USB stack, but it doesn't seem to cause any problems.P2, Yes the FFC is a PITA for airborne operations, I believe there is a command to stop the automatic FFC and another to do a manual FFC, but I have not investigated.Q1, the latest code I had anything to do with is flir8p1. Someone else may have done more with it. My primary goal was to run flir8 on a 3DR Solo on it's iMx6 companion computer. I got this to work, but found that the iMx6 was somewhat underpowered for the job. It took a lot of work to figure out how to recompile u-boot and the kernel, Also the 3.10.17 kernel really needs updating to a much more recent version to allow running gstreamer 1.0, and that proved to be more than I was willing to put any more time into.It is still an interesting project and the potential for S&R, inspections is really great. The cost of one Flir Vue or Flir DUO is more than several 3DR Solo's + Flir One G2's.Q2, to do that one would have to tweak the Lepton 3 as well as the code in the onboard ARM processor. a) this may not be a good idea for ITAR/Wassamer reasons, b) the onboard ARM processor may not be able to process more than 9fps. 3) your external processor would have to process a lot more data too, which may be beyond it's capabilities, the Solo's iMx6 is almost out of it's league at 9fps, any more would require an auxiliary processor, if you could get the first two parts to work, IMHO, financially it would make more sense to by some other camera.Q3, not with the flir8 code, it's open source, have at it, and best of luck.I like your Predator!! Fawn + John Deere => "Bad Things(tm) happening to Bambi"Quote from: careyer on May 17, 2018, 01:58:42 pm

author: careyer
author_rank: Contributor
timestamp: May 18, 2018, 07:52:47 am
content: Quote from: cynfab on May 18, 2018, 02:16:41 amThank you cynfab for quickly coming back to me!I am aware that the FlirOneG2 is end of life and not available for purchase anymore. However from time to time you can make a good deal buying a used one off ebay. (or like Fraser likes to do: revive a dead one). Like you already pointed out: For the price of a FLIR VUE Pro you can get a whole bunch of them plus some neat drone equipment on top.(And when it comes to the FlirOneG3 I totally agree: It's a total rip-off: Flir compensates for all the repair- and support costs they had with dying batteries and corrupted firmewares on the G2 model by shipping a less capable product (G3 Std) for the same price -or- in case of the Pro model: slightly vamped up but with almost same G2 performance for a much higher price tag). So at the end of the day the G2 is still the better G3Pro!As forP2.)the auto FFC thing - I think the solution was describedhereby tomas123 (Yes I did read the whole thread!). However I have no clue at all when it comes to programming. It is almost like an extra terrestrial language to me. I was hoping that you guys might be willing and able to help out here? That would be awesome and so much appreciated.Q2.)Yes I understand. The ITAR thing is quite obvious. The inernal ARM processor might be a bottleneck as well. However the Processor on the Pi0 has plenty off number crunching power left. Moreover I make use of its' hardware H264 encoder to process the thermal frames, i.e. -> no additional load for the CPU at all. I'd be more than happy to share if you are interested and still into flying (and building) drones. It should suit your solution (3DR Solo) well since EZ-Wifibroadcast uses MavLink.Q3.)same extra terrestrial thing you know...(Ahhhh!!!...)Have a great day! Cheers!Thomas

author: tomas123
author_rank: Frequent Contributor
timestamp: May 18, 2018, 09:11:40 am
content: Hi careyer,you are the second Bambi lifesaver in this threadI love your workQuote from: faboaic on May 30, 2016, 04:38:00 pmI wrote the code as proof of concept. Therefore the code is raw and the error correction algorithm is half-baked.A drop in the packets from USB interface results in a "Reset buffer because of bad Magic Byte!"I think, my last version was flir8l3.zipQuote from: tomas123 on January 19, 2016, 11:26:11 pmhttps://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/?action=dlattach;attach=195140In April 2017 I ran this code in a test environments 19 days non-stop (F1G2 with a Raspberry Pi0).After 14.877.155 frames I cancelled the test, because I was worried about the shutter hardware and the overloaded battery.Code:: Sat Apr 29 10:30:46 2017#14877155 84/10 fps:{"shutterState":"ON","shutterTemperature":314.989990234375,"usbNotifiedTimestamp":1178763464.53319,"usbEnqueuedTimestamp":1178763464.53469,"ffcState":"FFC_VALID_RAD"}Unfortunately, there has never been anyone in this forum who has improved my C code (proof oc concept) for USB communication with the camera.Your queastions:(P1) See above. I know, there is a big potential for a stable connection.(P2) from my notesfirstdisable Auto FFC (autoFFC:false)Code://--------- write string: {"type":"setOption","data":{"option":"autoFFC","value":false}}length = 16;unsigned char my_string4={0xcc,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x57,0x64,0x17,0x8b};printf("\nEP 0x02 to be sent Hexcode: %i Bytes[",length);for (i = 0; i < length; i++) {printf(" %02x", my_string4);}printf(" ]\n");r = libusb_bulk_transfer(devh, 2, my_string4, length, &transferred, 0);if(r == 0 && transferred == length){printf("\nWrite successful!");}elseprintf("\nError in write! res = %d and transferred = %d\n", r, transferred);strcpy( my_string,"{\"type\":\"setOption\",\"data\":{\"option\":\"autoFFC\",\"value\":false}}");length = strlen(my_string)+1;printf("\nEP 0x02 to be sent %i Bytes: %s", length, my_string);// avoid error: invalid conversion from ‘char*’ to ‘unsigned char*’ [-fpermissive]my_string1 = (unsigned char*)my_string;r = libusb_bulk_transfer(devh, 2, my_string1, length, &transferred, 0);if(r == 0 && transferred == length){printf("\nWrite successful!");printf("\nSent %d bytes with string: %s\n", transferred, my_string);}elseprintf("\nError in write! res = %d and transferred = %d\n", r, transferred);and trigger if required amanual FCC (doFFC:true)Code:unsigned char my_string2={0xcc,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0xb9,0xcb,0xa2,0x99};r = libusb_bulk_transfer(devh, 2, my_string2, length, &transferred, 0);if(r == 0 && transferred == length)printf("\nWrite successful!");elseprintf("\nError in write! res = %d and transferred = %d\n", r, transferred);char my_string;transferred = 0;strcpy(my_string, "{\"type\":\"setOption\",\"data\":{\"option\":\"doFFC\",\"value\":true}}");length = strlen(my_string)+1;unsigned char *my_string1 = (unsigned char*)my_string;transferred = 0;r = libusb_bulk_transfer(devh, 2, my_string1, length, &transferred, 0);if(r == 0 && transferred == length){printf("\nWrite successful!");printf("\nSent %d bytes with string: %s\n", transferred, my_string);}elseprintf("\nError in write! res = %d and transferred = %d\n", r, transferred);(Q1) see my comments above. The last versions in this thread are "only" improvements in code structure for palette and calibrations values. Unfortunately not for communications to F1G2.My proposal:Learn the basics for C programming and you can self change the code for your needs.This is not as hard as compiling kernel drivers(Q2) The lepton datasheet gives as 8.7 Hz. I can't hack the frame rate.(Q3) This is only a minor code customizing. See (Q1)

author: tomas123
author_rank: Frequent Contributor
timestamp: May 18, 2018, 09:26:20 am
content: Hello cynfab,two years later it's nice to hear from you in this thread.It was a great piece of work together.

author: careyer
author_rank: Contributor
timestamp: May 18, 2018, 09:35:25 am
content: Hi tomas123,thanks man for your awesome and detailed reply.I am happy to hear that despite to the error message the connection between F1G2 and Pi0 seems to be rock solid. That is brilliant news!I have already tried to have a look to the c Sources but I am somewhat too dump to do it. It has been years and years since I did some Java coding (back then at university) but somewhat my brain is not made for coding - c in particular scares the death out of me . That is a major drawback I haveI really would not ask for help if I could somehow manage to do it myself.It would be a dream come true to have a version that allows at runtime for:manual FFCchange color paletteMaybe the two of you (cynfab and you) can team up again to add this final step and make it perfect?So much thanks in advance from me and the BambisCheers!ThomasP.S: That is how the integration into EZ-WifiBroadcast looks like! Man I can't thank you enough for making this driver reality.(Looks like the Pi is connected to the TV in this video but it is not. It transmits wireless to a 2nd Pi which is behind the TV ;-)) BTW - My wife was incredibly pissed off that she could not watch her Sex and the City DVD for days and days of debugging. haha

author: cynfab
author_rank: Regular Contributor
timestamp: May 18, 2018, 01:05:31 pm
content: Hi tomas123!Good to hear from you as well, I read this forum every day (almost), but too many other projects lead to less attention to each ;>((I wish I could find half of the "good deals" that Fraser finds, he as a talent for sniffing out some of the best thermal camera bargains there are.I know I posted the link to my 3DR Solo with Flir One G2, but here it is again in case anyone didn't see it:caryer, I'l like more details on your drone setup, FC, frame, flight time carrying capacity etc. it looks like s nice one.It's never too late to learn more coding...Quote from: tomas123 on May 18, 2018, 09:26:20 am

author: careyer
author_rank: Contributor
timestamp: May 18, 2018, 01:33:32 pm
content: @cynfabYour side-by-side integration into the Solo-App looks sweet man!here are a few basic data about the "Predator" drone as requested. It has been a 2year DIY project.Frame:folding frame milled from aircraft grade aluminum and carbon, retractable landing gear (completely DIY, collapses down to the size of a Phantom when folded)Propulsion System:DJI E1200 Pro, 17" Props (max 4,8kW, combined 16kg Thrust)FC:3DR PixhawkControlsystem:EZ-Wifibroadcast (modified, bidirectional 2,4Ghz Link: FullHD-Video + Thermal Downlink, Control Uplink via MavLink/Serial,Range ~8km - no boosters, no directional antennae, no tracking required) - so to say DJI Lightbridge 2 for a budget! (and more versatile)Camera: Raspberry Camera with switchable IR-Filter + FlirOne G2Battery:6S 20.000mAh (2,4kg)AUW:4,6kgLifting capacity:plenty!(but 5kg weight limit in Germany, oh man...)Flighttime:approx. 45-50minvery silent in flight and absolutely robust against wind gusts and outside influencesSure! It's never too late to learn coding. I tried several times (Java and Java ME) but when it comes to C i miserably failed - I tried more than once.(Obviously I'm more of a craftsman).Therefore any help from you guys would be greatly appreciated - really!In exchange I can get you kick started with the EZ-Wifibroadcast integration if that is of any interest to you - or donate some beer!?

author: Fraser
author_rank: Super Contributor
timestamp: May 18, 2018, 04:12:16 pm
content: Confab,You will be pleased to hear that I am no longer actively hunting thermal cameras 🙂If there are any bargains out there, you will not have me competing with you to buy them 👍I actually sold some of my collection and more will follow I feel sure. I hit saturation point !Best WishesFraser

author: da-nie
author_rank: Contributor
timestamp: May 26, 2018, 07:17:53 pm
content: I developed a thermal imager based on stm32f407vgt6. Dysplay with hx8347d controller 320x240. Flir Lepton 3 unit. Flir lepton board.Connecting Display Contacts:D0 - PD14D1 - PD15D2 - PD0D3 - PD1D4 - PE7D5 - PE8D6 - PE9D7 - PE10CS - PD7 (FSMC_NE1)RW - PD5 (FSMC_NWE)RD - PD4 (FSMC_NOE)RS - PD11 (FSMC_A16)RESET - PE1Connecting lepton board Contacts:SCK - PA5MISO - PA6MOSI - GNDCS - GNDSCL - PB6SDA - PB7Programm for Keil 5 and Cube MX:https://github.com/da-nie/STM32F407VGT6AndFlirLepton3

author: careyer
author_rank: Contributor
timestamp: May 28, 2018, 08:17:42 am
content: @da-nie: Looks awesome!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.

author: da-nie
author_rank: Contributor
timestamp: May 28, 2018, 02:29:18 pm
content: QuoteI want to make a night vision device.

author: alromh87
author_rank: Newbie
timestamp: September 11, 2018, 04:10:23 am
content: @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 FFCchange color paletteUnfurtunately 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

author: careyer
author_rank: Contributor
timestamp: September 14, 2018, 01:16:54 pm
content: @alromh87 : You have a PM

author: McBryce
author_rank: Super Contributor
timestamp: October 01, 2018, 10:51:27 am
content: @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.

author: da-nie
author_rank: Contributor
timestamp: October 01, 2018, 04:51:03 pm
content: I write on different forums and update the results.The program with lepton-3 and stm32 is updated onhttps://github.com/da-nie/STM32F407VGT6AndFlirLepton3

author: reddypragnya
author_rank: Newbie
timestamp: February 17, 2019, 03:05:06 pm
content: if any one is struggling with building of kernel headers,Find the kernel version byuname -a.And build the kernel as instructed in rasbian site :https://www.raspberrypi.org/documentation/linux/kernel/building.md

author: dROb
author_rank: Newbie
timestamp: February 22, 2019, 07:51:38 am
content: 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?

author: a1b2c3d4e5f6
author_rank: Newbie
timestamp: March 20, 2019, 10:33:25 am
content: 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

author: da-nie
author_rank: Contributor
timestamp: March 22, 2019, 07:32:41 am
content: You need to write the driver yourself. Ready probably not.

author: reddypragnya
author_rank: Newbie
timestamp: April 26, 2019, 08:01:58 am
content: 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.

author: gusisin
author_rank: Newbie
timestamp: July 09, 2019, 11:52:36 am
content: 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 isRaw temp - 273.15 = Deg C.Using a laser spot meter I get the followingMeasured temp (Laser) Two Byte raw value Kelvin Centigrade(seems to be missing some resolution)20.5 3387 338.7 640 (Ice) 2236 223.6 -5037.2 (my mouth :-) 3757 375.7 101As 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?ThanksGus

author: gusisin
author_rank: Newbie
timestamp: April 11, 2020, 07:06:45 am
content: @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 advanceGus

author: aund
author_rank: Newbie
timestamp: May 15, 2020, 04:34:03 pm
content: Hi @gusisinHaving 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.

author: Inflex
author_rank: Regular Contributor
timestamp: May 16, 2020, 05:55:09 am
content: @aundAny 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.

author: aund
author_rank: Newbie
timestamp: May 16, 2020, 08:31:14 am
content: Thanks for replying Inflex. Unfortunately following a reboot on two different devices I'm getting the following when trying to start ffmpeg on bothCode: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:1234results inCode:[video4linux2,v4l2 @ 0x14822b0] ioctl(VIDIOC_G_FMT): Invalid argument/dev/video3: Invalid argumentThe 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!

author: Inflex
author_rank: Regular Contributor
timestamp: May 16, 2020, 08:54:39 am
content: Sounds like your V4L2 device names have moved around.What does the following command give you?v4l2-ctl --list-devicesI'm not sure which source code you're using, but you might have to tweak/change it to suite the new v4l2 loopback numbers?Quote from: aund on May 16, 2020, 08:31:14 am

author: aund
author_rank: Newbie
timestamp: May 16, 2020, 09:23:11 am
content: 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

author: Inflex
author_rank: Regular Contributor
timestamp: May 16, 2020, 09:49:35 am
content: Quote from: aund on May 16, 2020, 09:23:11 amYou 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 itCode:uint32_t FrameSize = g->buf85[ 8] + (g->buf85[ 9] << 8) + (g->buf85 << 16) + (g->buf85 << 24);uint32_t ThermalSize = g->buf85 + (g->buf85 << 8) + (g->buf85 << 16) + (g->buf85 << 24);uint32_t JpgSize = g->buf85 + (g->buf85 << 8) + (g->buf85 << 16) + (g->buf85 << 24);uint32_t StatusSize = g->buf85 + (g->buf85 << 8) + (g->buf85 << 16) + (g->buf85 << 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);}}

author: Inflex
author_rank: Regular Contributor
timestamp: May 16, 2020, 09:52:24 am
content: 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

author: aund
author_rank: Newbie
timestamp: May 16, 2020, 12:10:39 pm
content: 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.cCode:uint32_t StatusSize = buf85 + (buf85 << 8) + (buf85 << 16) + (buf85 << 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 chunkreturn;}// 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 statust1=t2;and this is what I got outCode:Frame size is: 80412Buffer is: 148308FrameSize= 80540 (+28=80568), ThermalSize 10332, JPG 70040, StatusSize 168, Pointer 28FrameSize= 80540 (+28=80568), ThermalSize 10332, JPG 70040, StatusSize 168, Pointer 10360FrameSize= 80540 (+28=80568), ThermalSize 10332, JPG 70040, StatusSize 168, Pointer 80568Frame size is: 80540Buffer is: 148308FrameSize= 80683 (+28=80711), ThermalSize 10332, JPG 70184, StatusSize 167, Pointer 28FrameSize= 80683 (+28=80711), ThermalSize 10332, JPG 70184, StatusSize 167, Pointer 10360FrameSize= 80683 (+28=80711), ThermalSize 10332, JPG 70184, StatusSize 167, Pointer 80711Frame size is: 80683Buffer is: 148308FrameSize= 80484 (+28=80512), ThermalSize 10332, JPG 69984, StatusSize 168, Pointer 28FrameSize= 80484 (+28=80512), ThermalSize 10332, JPG 69984, StatusSize 168, Pointer 10360^Croot@raspberrypi:/home/pi/temp/flir8p1-gpl# ls -lrt frame.data---------x 1 root root 0 May 16 12:45 frame.data

author: Inflex
author_rank: Regular Contributor
timestamp: May 16, 2020, 12:14:29 pm
content: My bad, the open() call is slightly wrong, should have been;fo = open("frame.data", O_CREAT|O_WRONLY, 0644);

author: aund
author_rank: Newbie
timestamp: May 16, 2020, 12:23:18 pm
content: Awesome,Got some data now

author: Inflex
author_rank: Regular Contributor
timestamp: May 16, 2020, 12:23:37 pm
content: QuoteJust 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 :\

author: Inflex
author_rank: Regular Contributor
timestamp: May 16, 2020, 12:34:34 pm
content: 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.

author: aund
author_rank: Newbie
timestamp: May 16, 2020, 12:38:52 pm
content: 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?

author: Inflex
author_rank: Regular Contributor
timestamp: May 16, 2020, 12:40:05 pm
content: Quote from: aund on May 16, 2020, 12:38:52 pmYes, it'll be a very small output frame (80x60 + 8 at the bottom if you want the text, and only 13 characters).

author: aund
author_rank: Newbie
timestamp: May 17, 2020, 01:28:39 pm
content: It is indeed the LT model.I've tried a few things now to get up and running1) Changing the VIDEO_DEVICE2 resolutions to matchCode:#define VIDEO_DEVICE2 "/dev/video3" // colorized thermal image#define FRAME_WIDTH2 80#define FRAME_HEIGHT2 60This 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.

author: Inflex
author_rank: Regular Contributor
timestamp: May 17, 2020, 01:57:53 pm
content: 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)

author: aund
author_rank: Newbie
timestamp: May 17, 2020, 02:17:11 pm
content: 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.

author: Inflex
author_rank: Regular Contributor
timestamp: May 17, 2020, 04:29:07 pm
content: Quote from: aund on May 17, 2020, 02:17:11 pmAll 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.

author: Mowj
author_rank: Newbie
timestamp: May 19, 2020, 04:36:00 pm
content: 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: 0xFFFFFFFFFor 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.

author: da-nie
author_rank: Contributor
timestamp: May 20, 2020, 05:36:26 pm
content: 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.).

author: mojpismonosa
author_rank: Newbie
timestamp: June 03, 2020, 11:43:01 pm
content: Hi everyone!Thanks for hard work in enabling this little thermal cam to be used on systems other than the manufacturer itself cared to!I've been using the 'clean code' version from github (https://github.com/fnoop/flirone-v4l2), been stuck on "invalid argument" thing for a while, and got it that it is a thing of the v4l2loopback kernel module, not the code itself. After compiling latest version likehttps://www.dpin.de/nf/thermal-camera-on-linux-flir-one-pro/did (fromhttps://github.com/umlaeute/v4l2loopback/releases) and running the ./flirone as superuser (sudo or root user, couldn't get it to work otherwise using udev rules no matter what) on kernel 5.x, Ubuntu 18.04, it's been working flawlessly!The question I have is -Is the some way one could trigger the Non-uniform-calibration (NUC) as Android app (the stock one from FLIR) can? Or, at least detect (from frames) when the NUC is happening or did happen?Thank you very much!

author: victorffs
author_rank: Newbie
timestamp: June 16, 2020, 04:23:06 am
content: Hi guys!Firs I would like to congratulate everyone that helped on this post. That's an amazing initiative and you are awesome!I'm would like to know if someone could get the Flir One Pro LT version working with Linux.I'm trying to use the Pro LT with an raspberry Pi 4 but i'm having some issues. Here is some comments about:1 - The Pro LT didnt work with the V4L on RPI4 but I could workaround using the MJPEG Streamer as suggested by @thomas123 before2 - The normal camera (real.jpg) is working fine, but I cant get the image from the thermal camera (thermal.jpg). I get the same issues that some guys replied here before, an image with some colored glitches:(obs. I've covered the thermal camera with my fingers and noticed some changes on the glitches patterns, so probably the image is being received but need to be correctly decoded)3 - I've tried to change the the references for resolution on the source code from 160x120 to 80x60 but still getting the same issue.I've saw that @aund could put the Pro LT version to work, but I cant do the same here.Is there any other changes that I should do beyond the resolution?Please, someone could help me?Thank you in advance!

author: aund
author_rank: Newbie
timestamp: June 16, 2020, 03:30:11 pm
content: Hi Victorffs,I actually gave up on trying to change the source code to fit the dimensions of the FLIR1 as I simply don't have enough knowledge of how the video stream is put together (coupled with not being a C programmer).@Inflex might be able to give you some pointers as he very kindly pointed me in the right direction with some of this.I only got as about as far as you are now, sorry I couldn't be more help and good luck!

author: victorffs
author_rank: Newbie
timestamp: June 17, 2020, 05:13:58 pm
content: Thanks for your answer @aund!I'm considering change my version LT to the PRO, but its more expensive and isn't available for now at my distributor (he said that probably on 1th july will be available)So, I'll try to keep using the LT until july, if not works I will try to change the camera.@Inflex do you have some suggestions to make the LT work?Regards!

author: Propretor
author_rank: Regular Contributor
timestamp: December 03, 2020, 08:12:35 am
content: Guys, and who has not tried to run the Flir One Pro Gen3 without a battery?First, supply power to Type-C and connect to a smartphone without a battery.If everything is OK, then you can make one connection internally between the Type-C charger and micro-USB / Type-C data.Alteration will make a siktermal out of flirI haven't used flirting for about a year and the battery has completely run out. Now the flir cannot even charge the built-in battery to 100% - the green LED does not stop blinking for 6 hours, and then the orange one turns on. Nevertheless, there is still 10-20 percent of the previous capacity in the battery. And the thermal imager does not work for long.The question is in the vandal-free analysis of the subject.Is there a parsing order in pictures or videos?

author: soumitra.kbc@gmail.com
author_rank: Newbie
timestamp: August 29, 2021, 06:43:44 pm
content: Could obtain the stream (both Thermal & Visual) from FLIR Pro for Android to the Raspberry Pi following the blog. Thanks all for the contribution. But how to obtain the temperature matrix for further analysis of the obtained Thermal images?

author: luporl
author_rank: Newbie
timestamp: May 19, 2022, 04:38:13 pm
content: Hello,I was trying to make a Flir One Gen3 camera work on Linux and I ended up finding this forum thread and the code inhttps://github.com/fnoop/flirone-v4l2.Unfortunately it didn't work and I got results similar to those that tried to use it with the Pro LT version.But after spending some time experimenting with the code, I've managed to get a version that works with the Flir One Gen3 camera, that have a sensor with 80x60 resolution.As this is the same resolution of the Pro LT models, maybe it will work with them too.So, if anyone wants to try it out, here it is:https://github.com/luporl/flirone-v4l2Best regards!

author: anthonymg
author_rank: Newbie
timestamp: October 14, 2022, 09:05:26 pm
content: Hi,Thanks for that @luporl, I was also trying to adapt the code to work with the FLIR ONE GEN 3. However, I still have a persistent problem. Some of the frames in the transmission appear similar to the attached image and consequently the temperature values are nan values or incorrect values. Currently, I am stuck on this. In your adaptation have you been able to overcome this problem?

author: anthonymg
author_rank: Newbie
timestamp: October 25, 2022, 02:46:28 pm
content: Hi,After a few weeks trying to find the bug. I have noticed that inside the loop where libusb_bulk_transfer is called to get the data in the buffer the information is sometimes not complete. The complete data that should be received should be of the size 28 + FrameSize where FrameSize = ThermalSizer + JpgSize + StatusSize. However, when gathering the information from the data that comes in the buffer, it seems that some information was lost and they do not complete this ideal size. Or on other occasions it seems that the information that was lost was from the next header and the size of the information between two headers is much larger than it should be.I'm using the code fromhttps://github.com/fnoop/flirone-v4l2, with modifications from @luporl for a flir one gen 3 , compiling it on a raspberry pi 3 model bWhat could I do to solve this problem?

author: luporl
author_rank: Newbie
timestamp: December 01, 2022, 05:34:08 pm
content: Hi @anthonymg,I haven't seem the issues you mention, about nan or incorrect temperature values.I saw something similar with the original code, that is for cameras with higher resolutions, then with flir one gen 3 less data would be read and the remaining bytes in buf85[] would be garbage.But I've only tested it on an x86 laptop, haven't tried it on any raspberry pi boards.The ThermalSize should always be the same. JpgSize varies, because of compression.And buf85pointer should always start counting, and be reset, after the 4 magic bytes are found.I guess you're running using RPi 3 in little-endian mode, right? If not, then the lines that get the sizes from buf85[] would have to be changed.Other than that, it's hard to know what could be the problem. Maybe you're not reading fast enough from usb or some usb frames are being lost?

author: YacineBrahim
author_rank: Newbie
timestamp: February 26, 2023, 03:20:36 pm
content: Any one can help please to provide a clean software to run FLIR ONE PRO camera on Linux Machine. That will be very much appreciated. Thanks