Wifi Stream fails with error LJM_NO_RESPONSE_BYTES_RECEIVED | LabJack
 

Wifi Stream fails with error LJM_NO_RESPONSE_BYTES_RECEIVED

28 posts / 0 new
Last post
eashaw
eashaw's picture
Wifi Stream fails with error LJM_NO_RESPONSE_BYTES_RECEIVED

I'm testing out wifi streaming in C# and it seems like around 5 minutes after starting the stream it fails with the error message in the Subject. This is puzzling, because everything seems like it should be working optimally. I'm getting -20 RSSI, so there should be no issue with signal strength. This is even happening with the sample rate set to 1 Hz, and the behavior doesn't seem to change if I set the sample rate up to 100 Hz. Other things that I tried was to set the LJM_STREAM_RECEIVE_TIMEOUT_MS to 10000 and the same thing happened. I'm guessing that I can somehow handle this error, so that I can continue the stream dropping a sample, but it doesn't seem like it should fail like this every 5 minutes.

LabJack Support
labjack support's picture
LJM_NO_RESPONSE_BYTES

LJM_NO_RESPONSE_BYTES_RECEIVED is the expected error that happens when the device loses connectivity.

Are you using Kipling?

After looking into it, I found that hitting Refresh Devices on the Device Selector tab in Kipling causes the problem to occur if you have the WiFi box checked (it probably also happens if you simply open Kipling with WiFi checked). I'm looking into why this is the case.

eashaw
eashaw's picture
Yeah, I get this with Kipling

Yeah, I get this with Kipling, but the main thing I want to fix is this happening with the code below. It is basically a slightly modified version of one of the c# streaming examples. I also got the same behavior with a python version of the code below. I doubt the device should be losing connectivity within an hour of starting the stream, because the signal strength is very good and it is sitting a couple feet away from a dedicated router. If that is what's happening, is there a good way to reconnect a stream? As long as I'm externally trigging, reconnecting and losing a couple of samples shouldn't be a big issue if the program doesn't crash for weeks. I'm trying to use this as a slow daq that samples every second and stays synced with the main DAQ card. The external trigger I have setup is running at 1 Hz currently. 

using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LabJack;

namespace SlowDAQ
{
    class StreamBasic
    {
        static void Main(string[] args)
        {
            StreamBasic sb = new StreamBasic();
            sb.performActions();
        }

        public void showErrorMessage(LJM.LJMException e)
        {
            Console.Out.WriteLine("LJMException: " + e.ToString());
            Console.Out.WriteLine(e.StackTrace);
        }

        public void performActions()
        {
            const int FIRST_AIN_CHANNEL = 0;  //0 = AIN0
            const int NUMBER_OF_AINS = 14;

            int handle = 0;
            int devType = 0;
            int conType = 0;
            int serNum = 0;
            int ipAddr = 0;
            int port = 0;
            int maxBytesPerMB = 0;
            string ipAddrStr = "";
            string[] aNames;
            double[] aValues;
            int errorAddress = -1;

            try
            {
                //Open first found LabJack
                LJM.OpenS("ANY", "WIFI", "ANY", ref handle);
                //LJM.OpenS("T7", "ANY", "ANY", ref handle);  // T7 device, Any connection, Any identifier
                //LJM.OpenS("T4", "ANY", "ANY", ref handle);  // T4 device, Any connection, Any identifier
                //LJM.Open(LJM.CONSTANTS.dtANY, LJM.CONSTANTS.ctANY, "ANY", ref handle);  // Any device, Any connection, Any identifier

                LJM.GetHandleInfo(handle, ref devType, ref conType, ref serNum, ref ipAddr, ref port, ref maxBytesPerMB);
                LJM.NumberToIP(ipAddr, ref ipAddrStr);
                Console.WriteLine("Opened a LabJack with Device type: " + devType + ", Connection type: " + conType + ",");
                Console.WriteLine("Serial number: " + serNum + ", IP address: " + ipAddrStr + ", Port: " + port + ",");
                Console.WriteLine("Max bytes per MB: " + maxBytesPerMB);
                //Sets to LJM_STREAM_SCANS_RETURN_ALL
                LJM.WriteLibraryConfigS("LJM_STREAM_SCANS_RETURN", 1);
                //Sets timeout to 10 seconds
                LJM.WriteLibraryConfigS("LJM_STREAM_RECEIVE_TIMEOUT_MS", 10000);

                //When streaming, negative channels and ranges can be
                //configured for individual analog inputs, but the stream has
                //only one settling time and resolution.

                try
                {
                    if (devType == LJM.CONSTANTS.dtT4)
                    {
                        //T4 configuration

                        //Configure the channels to analog input or digital I/O
                        //Update all digital I/O channels.
                        //b1 = Ignored. b0 = Affected.
                        double dioInhibit = (double)0x00000;  //b00000000000000000000
                        //Set AIN0-AIN3 and AIN FIRST_AIN_CHANNEL to
                        //FIRST_AIN_CHANNEL+NUMBER_OF_AINS-1 as analog inputs (b1),
                        //the rest as digital I/O (b0).
                        double dioAnalogEnable = ((int)(Math.Pow(2, NUMBER_OF_AINS) - 1) << FIRST_AIN_CHANNEL) | 0x0000F;
                        aNames = new string[] { "DIO_INHIBIT", "DIO_ANALOG_ENABLE" };
                        aValues = new double[] { dioInhibit, dioAnalogEnable };
                        LJM.eWriteNames(handle, aNames.Length, aNames, aValues, ref errorAddress);

                        //Configure the analog input ranges.
                        double rangeAINHV = 10.0;  //HV channels range (AIN0-AIN3)
                        double rangeAINLV = 2.5;  //LV channels range (AIN4+)
                        aNames = new string[NUMBER_OF_AINS];
                        aValues = new double[NUMBER_OF_AINS];
                        for (int i = 0; i < NUMBER_OF_AINS; i++)
                        {
                            aNames[i] = "AIN" + (FIRST_AIN_CHANNEL + i) + "_RANGE";
                            aValues[i] = ((FIRST_AIN_CHANNEL + i) < 4) ? rangeAINHV : rangeAINLV;
                        }
                        LJM.eWriteNames(handle, aNames.Length, aNames, aValues, ref errorAddress);

                        //Configure the stream settling times and stream resolution index.
                        aNames = new string[] {
                            "STREAM_CLOCK_SOURCE",
                            "STREAM_EXTERNAL_CLOCK_DIVISOR",
                            "STREAM_SETTLING_US",
                            "STREAM_RESOLUTION_INDEX"
                        };
                        aValues = new double[] {
                            2,
                            1,
                            10.0,
                            1
                        };  //0 (default), 0 (default)
                        LJM.eWriteNames(handle, aNames.Length, aNames, aValues, ref errorAddress);
                    }
                    else
                    {
                        //T7 and other devices configuration

                        //Ensure triggered stream is disabled.
                        LJM.eWriteName(handle, "STREAM_TRIGGER_INDEX", 0);

                        //Enabling internally-clocked stream.
                        LJM.eWriteName(handle, "STREAM_CLOCK_SOURCE", 0);

                        //Configure the analog input negative channels, ranges,
                        //stream settling times and stream resolution index.
                        aNames = new string[] {
                            "AIN_ALL_NEGATIVE_CH",
                            "AIN_ALL_RANGE",
                            "STREAM_CLOCK_SOURCE",
                            "STREAM_EXTERNAL_CLOCK_DIVISOR",
                            "STREAM_SETTLING_US",
                            "STREAM_RESOLUTION_INDEX"
                        };
                        aValues = new double[] {
                            LJM.CONSTANTS.GND,
                            10.0,
                            2,
                            1,
                            10.0,
                            1
                        };  //single-ended, +/-10V, 0 (default), 0 (default)
                        LJM.eWriteNames(handle, aNames.Length, aNames, aValues, ref errorAddress);
                    }

                    //Stream Configuration
                    int scansPerRead = 1;  //# scans returned by eStreamRead call
                    //Scan list names to stream. AIN(FIRST_AIN_CHANNEL) to
                    //AIN(NUMBER_OF_AINS-1).
                    string[] aScanListNames = new string[NUMBER_OF_AINS];
                    for (int i = 0; i < aScanListNames.Length; i++)
                        aScanListNames[i] = "AIN" + (FIRST_AIN_CHANNEL + i).ToString();
                    const int numAddresses = NUMBER_OF_AINS;
                    int[] aTypes = new int[numAddresses];  //Dummy
                    int[] aScanList = new int[numAddresses];  //Scan list addresses to stream.
                    LJM.NamesToAddresses(numAddresses, aScanListNames, aScanList, aTypes);
                    double scanRate = 10;  //Scans per second

                    Console.WriteLine("\nStarting stream. Press a key to stop streaming.");
                    System.Threading.Thread.Sleep(1000);  //Delay so users can read message

                    //Configure and start stream
                    LJM.eStreamStart(handle, scansPerRead, numAddresses, aScanList, ref scanRate);

                    UInt64 loop = 0;
                    UInt64 totScans = 0;
                    //# of samples per eStreamRead is
                    //scansPerRead * numAddresses.
                    double[] aData = new double[scansPerRead * numAddresses];
                    UInt64 skippedTotal = 0;
                    int skippedCur = 0;
                    int deviceScanBacklog = 0;
                    int ljmScanBacklog = 0;
                    Stopwatch sw = new Stopwatch();

                    Console.WriteLine("Starting read loop.");
                    sw.Start();
                    while (!Console.KeyAvailable)
                    {
                            LJM.eStreamRead(handle, aData, ref deviceScanBacklog, ref ljmScanBacklog);
                            totScans += (UInt64)scansPerRead;

                            //Count the skipped samples which are indicated by -9999
                            //values. Missed samples occur after a device's stream
                            //buffer overflows and are reported after auto-recover
                            //mode ends.
                            skippedCur = 0;
                            foreach (double d in aData)
                            {
                                if (d == -9999.00)
                                    skippedCur++;
                            }
                            skippedTotal += (UInt64)skippedCur;
                            loop++;
                            Console.WriteLine("\neStreamRead " + loop);
                            Console.WriteLine("  1st scan out of " + scansPerRead + ":");
                            for (int j = 0; j < numAddresses; j++)
                            {
                                Console.WriteLine("    " + aScanListNames[j] +
                                    " = " + aData[j].ToString("F4"));
                            }
                            Console.WriteLine("  numSkippedScans: " +
                                (skippedCur / numAddresses) +
                                "  totalSkippedScans: " + 
                                (skippedTotal / numAddresses) + 
                                ", deviceScanBacklog: " +
                                deviceScanBacklog +
                                ", ljmScanBacklog: " +
                                ljmScanBacklog);
                    }
                    sw.Stop();

                    //Doing this to prevent Enter key from closing the program
                    //right away.
                    Console.ReadKey(true);

                    Console.WriteLine("\nTotal scans: " + totScans);
                    Console.WriteLine("Skipped scans: " +
                        (skippedTotal / numAddresses));
                    double time = sw.ElapsedMilliseconds / 1000.0;
                    Console.WriteLine("Time taken: " + time + " seconds");
                    Console.WriteLine("LJM Scan Rate: " +
                        scanRate + " scans/second");
                    Console.WriteLine("Timed Scan Rate: " +
                        (totScans / time).ToString("F2") + " scans/second");
                    Console.WriteLine("Sample Rate: " +
                        (totScans * numAddresses / time).ToString("F2") +
                        " samples/second");
                }
                catch (LJM.LJMException e)
                {
                    showErrorMessage(e);
                }
                Console.WriteLine("Stop Stream");
                LJM.eStreamStop(handle);
            }
            catch (LJM.LJMException e)
            {
                showErrorMessage(e);
            }

            LJM.CloseAll();  //Close all handles

            Console.WriteLine("\nDone.\nPress the enter key to exit.");
            Console.ReadLine();  // Pause for user
        }
    }
}

LabJack Support
labjack support's picture
It seems like what's

It seems like what's happening is that Kipling's Refresh Devices causes the WiFi chip on the T7 to crash if it's currently performing stream. Thus the problem probably no not due to losing Wifi signal, but instead due to the device not being able to send packets temporarily.

To verify this is what's happening, you can:

1. Open LJLogM via USB and begin logging WIFI_STATUS

2. Open LJStreamM via WiFi and begin streaming

3. Open Kipling or do Refresh Devices

4. Check the LJLogM output to see the altered WIFI_STATUS state. The only successful WIFI_STATUS is 2900, so if it changed at all, the Wifi chip had to rejoin the network.

There are some immediate workarounds and a couple of ways to fix it.

Workarounds:

1. You can can try using Ethernet (or USB)

2. You could try not using Kipling (or unchecking Kipling's WiFi box).

3. You could set LJM_LISTALL_UDP_WIFI to false in ljm_startup_configs.json. I haven't tested this yet.

Solutions:

1. LJM could gracefully handles the situation, such that when the wifi chip crashes, LJM will continue to be able to stream. This requires LJM to account for possible lost data.

2. Kipling could be made to be more friendly such that it doesn't crash the wifi chip.

3. The T7 could possibly filter out the extra broadcast packets so the wifi chip does not crash.

eashaw
eashaw's picture
Oh wait, I think I

Oh wait, I think I misunderstood. It doesn't look like I'm having any issues with the Device Selector tab in Kipling. This problem just seems to be happening when running the code. For my application the wifi streaming capabilities are necessary, otherwise there wouldn't be any advantage in using the labjack. Do you still think this could be the Wifi chip crashing? The solutions you mentioned sound like what I would need to make this work. I'll try changing LJM_LISTALL_UDP_WIFI, but it sounds like your troubleshooting suggestions were focused on debugging the error happening in Kipling.

LabJack Support
labjack support's picture
Yes, it seems like it could

Yes, it seems like it could still be the Wifi chip crashing even without using Kipling. To check this, you could use LJLogM to log the WIFI_STATUS. That would help us to know sooner whether you're seeing the same problem we're seeing.

At the moment, we're investigating having an option to turn off Wifi UDP to prevent the crash. (Stream is essentially always done via TCP.)

I'll update this thread when we have something to share.

eashaw
eashaw's picture
Ok, so I was able to log

Ok, so I was able to log things with LJLogM. I tested this twice and it seems like WIFI_STATUS changes from 2900 to 2909 for a couple of seconds and then returns to 2900. Is this what you expect for the Wifi chip crashing?

LabJack Support
labjack support's picture
Yes, that indicates the Wifi

Yes, that indicates the Wifi chip is crashing.

If you leave a test running overnight when there is less network activity, does it happen as often?

eashaw
eashaw's picture
Yeah, one of the tests was

Yeah, one of the tests was when less people were at the lab aroung 6 pm and it crashed in a little over 5 minutes. I can test it again tonight at a later time when nobody is around.

LabJack Support
labjack support's picture
Please do. We've been able to

Please do. We've been able to see instances where someone walking down the hall has caused the RSSI to drop due to physically blocking the signal. Please avoid using any other LabJack software during the test, since that will eliminate one variable from the test.

Also, at the moment, Kipling's Refresh Devices does not cause the problem. I will investigate further.

LabJack Support
labjack support's picture
I've written a stream read

I've written a stream read loop that restarts stream if LJM_eStreamRead returns an error. If an error occurs, it stops stream then starts it with the same parameters. As simplified C code, the loop looks like this:

    while (reading) {
        err = LJM_eStreamRead(...);

        if (err == LJME_NOERROR) {
            // Process or output valid stream data
        }
        else {
            int count = 0;
            while (count++ < 20) {
                err = LJM_eStreamStop(handle);
                if (err == LJME_NOERROR) {
                    break;
                }
                MillisecondSleep(500);
            }
            if (err) { exit(err); }
            count = 0;
            while (count++ < 20) {
                err = LJM_eStreamStart(...);
                if (err == LJME_NOERROR) {
                    break;
                }
                MillisecondSleep(500);
            }
            if (err) { exit(err); }
            printf("Stream restarted.\n");
        }
    }

The full .c example is attached. It's based off of stream_basic.c. I'll be running this to see what happens. So far it's running fine unless I cause the Wifi chip to crash as described below.

I found that by overloading my network with lots of calls to LJM_ListAll, I can cause the Wifi chip to crash. (My test was hundreds of calls spaced out by 5 ms, each as part of a separate process to ensure that there were overlapping calls.)

File Attachment: 
eashaw
eashaw's picture
I ran it late at night and it

I ran it late at night and it crashed in the same way. I tried to implement something like your c code in c#, but it didn't seem to change the behavior on my end.

        LJM.LJMERROR err = LJM.eStreamRead(handle, aData, ref deviceScanBacklog, ref ljmScanBacklog);

        if (err == LJM.LJMERROR.NOERROR)
        {
            totScans += (UInt64)scansPerRead;

            //Count the skipped samples which are indicated by -9999
            //values. Missed samples occur after a device's stream
            //buffer overflows and are reported after auto-recover
            //mode ends.
            skippedCur = 0;
            foreach (double d in aData)
            {
                if (d == -9999.00)
                    skippedCur++;
            }
            skippedTotal += (UInt64)skippedCur;
            loop++;
            Console.WriteLine("\neStreamRead " + loop);
            Console.WriteLine("  1st scan out of " + scansPerRead + ":");
            for (int j = 0; j < numAddresses; j++)
            {
                Console.WriteLine("    " + aScanListNames[j] +
                    " = " + aData[j].ToString("F4"));
            }
            Console.WriteLine("  numSkippedScans: " +
                (skippedCur / numAddresses) +
                "  totalSkippedScans: " +
                (skippedTotal / numAddresses) +
                ", deviceScanBacklog: " +
                deviceScanBacklog +
                ", ljmScanBacklog: " +
                ljmScanBacklog);
        }
        else
        {
            int count = 0;
            int total_count = 0;
            while (count++ < 20)
            {
                err = LJM.eStreamStop(handle);
                if (err == LJM.LJMERROR.NOERROR)
                {
                    break;
                }
                Thread.Sleep(500);
            }
            count = 0;
            while (count++ < 20)
            {
                err = LJM.eStreamStart(handle, scansPerRead, numAddresses, aScanList, ref scanRate);
                if (err == LJM.LJMERROR.NOERROR)
                {
                    break;
                }
                Thread.Sleep(500);
            }
            Console.WriteLine("Stream restarted.");
        }
    }

eashaw
eashaw's picture
Hello, could you possibly

Hello, could you possibly send me an executable for the c code? I'm having trouble compiling things, because not familiar with compiling c on windows. I'm trying to compile with MinGW with gcc -o stream_basic stream_basic.c -I"C:\Program Files (x86)\LabJack\Drivers", but it has a bunch of undefined references to LJM calls for some reason.

eashaw
eashaw's picture
Nevermind I got it to compile

Nevermind I got it to compile with:

gcc -o stream_basic stream_basic.c -I"C:\Program Files (x86)\LabJack\Drivers" -L"C:\Program Files(x86)\LabJack\Drivers" -lLabJackM

I'm trying this out just to make sure we're testing the same thing. There could be some issue with the c# wrapper.

LabJack Support
labjack support's picture
The LJM C examples have

The LJM C examples have Visual Studio project files. Try copying my code into the .c file for visual_studio_2008\more\stream\stream_basic\stream_basic.vcproj

The LJM C examples are here:

https://labjack.com/support/software/examples/ljm/c

I've attached basically what's attached as a .c above. You'll need to unzip then probably rename it. It's an x64 debug exe.

File Attachment: 
eashaw
eashaw's picture
So, by compiling your code

So, by compiling your code with MinGW and running it I still get the LJME_NO_RESPONSE_BYTES_RECEIVED error after a short period of time. But this code does actually handle restarting the Stream gracefully while my c# code doesn't. I'll try out the executable you sent as well.

eashaw
eashaw's picture
So, I have some updates. The

So, I have some updates. The executable you gave me behaved in the same way as the stuff I compiled with MinGW. I thought maybe there could be some issue with the placement of the labjack, so I plugged it in far away from the router. It doesn't have a good line of sight to the router and the signal is something like -40 dB, but the stream_basic.c code has run for 4 hours today without throwing that error. I'll let you know how reliable things seem after testing this more over the weekend.

eashaw
eashaw's picture
So, that unusually long time

So, that unusually long time wasn't actually an indication that moving the labjack far away solved the issue. The wifi chip crashed multiple times for the rest of friday. It sounds like you aren't able to reproduce this frequent wifi chip crash unless you really hammer the chip in a specific way, so are there other reasons besides the software this could be happening for me. Like using a particular OS or maybe faulty hardware on my labjack? Currently all this is running on a pc with windows 7.

LabJack Support
labjack support's picture
We can RMA the unit if you

We can RMA the unit if you would like, but nothing seems to point to a hardware problem at this time.

 

Please run the test discussed here: https://labjack.com/forums/t7/t7-pro-wi-fi-disconnections#comment-4920

 

Another thing to try is to change the channel on your wireless network.

eashaw
eashaw's picture
No I don't think a RMA is

No I don't think a RMA is necessary. We have a couple of T7 Pros and I was able to reproduce the problem on another one, so I think you are right. I find it strange that this would be an issue with the wifi, if the only thing that is going wrong is the wifi chip crashing. Can you give me more information on how that would work? I can imagine some rf pickup causing the chip to crash directly. Or I guess some interference could garble the signals sent to the T7, which could somehow lead to a crash. I'll try some different wifi channels and see if I notice a big difference. What is special about that test that I haven't tried?

LabJack Support
labjack support's picture
When referring to the wifi

When referring to the wifi chip the term "Crash" was used loosely. It could mean the chip was overwhelmed with broadcast packets or that is was no longer getting responses from the gateway. If the gateway is not responding to ping requests then the module will disconnect and attempt to rejoin (an ~5s process). Being knocked off a wireless network is very common. When a laptop or phone gets knocked off it takes a few extra seconds to load a webpage, when a data acquisition system gets knocked off many data points go missing. So wireless DAQs are more sensitive and require more effort to get running well.

 
The test provides us a baseline to compare our own tests against and to track changes to your setup.
ISIT
ian@isit.net.au's picture
I think your onto something

I think your onto something there with the chip being overwhelmed with broadcast packets.  When the T7 drops off the network it stops responding to pings.

I was having the same issues with WIFI, where the hardware worked randomly and intermittently.  I was attempting to read the device at a rate of about 7-8 cycles per second.  When connected over WIFI I noticed the device to be capable of a lot more than this, but only once the device was successfully connected.

On some occasions the device would connect for a moment, and then subsequently drop out after one of two successful device reads.

I was using a static IP, and have tried by using Wireless to an access point and also to a laptop directly using Adhoc wireless hotspot hosting.

I believe the issue is in the code sample supplied, on which I have based my code.  The process of reading the T7 should not initiate a broadcast event if the unit is in the process of connecting. 

Being constrained by having to use the supplied DLL for comminications instead of having access to the direct communications protocol for the device means that as a developer our ability to write code that can inteligently handle the connection/handshake, acknowledging stable comms etc, before hammering it for data is non existent.

The same code I have written to communicate to the device works flawlessly over USB.  A method of using direct and Static IP comms that negates the need for broadcast would be useful.  While I believe this is possible I have not been able to work that out from the limited documentation on this that exists.  I develop in Delphi XE10 and lack of documentation and sample code seems to be typical that platform.

I believe Labjack need top open up the protocol to allow developers to write their own communication handler for the device, or alternatively get a much better WIFI chip in newer versions.  

 

LabJack Support
labjack support's picture
The T4 and T7 can be

The T4 and T7 can be communicated to via Modbus_TCP. Details here: https://labjack.com/support/software/api/modbus/protocol-details

That is the same protocol that the driver uses, so all features of the device are available when not using the driver.

 

 

 

 

eashaw
eashaw's picture
So, I've checked every wifi

So, I've checked every wifi channel and seen the same behavior. I also got rid of outside sources of interference and still saw the issue. As far as my environment goes it should be as clean as possible. The network only has the pc connected via ethernet to the router and the labjack itself. The only other thing I can think of is putting the router and labjack in a metal box. I'd be surprised if the code itself is the issue, and I'm not going to go about writing code to communicate with the labjack to debug this, though it is awesome that your documentation seems to make it possible to do that. The only way I'd work on debugging code is if the provided driver was open source, but I understand there are good reasons for not doing that. My money on what is wrong would be the wifi chip itself. This may improve with later firmware releases. What kind of testing have you done on the wifi chip directly? Some wifi chips can be flakey in their communications with the board and wifi transmissions. Delays and even dropping communications is something that can happen and can be addressed with a more reliable chip or improved firmware.

eashaw
eashaw's picture
So, we have a couple of these

So, we have a couple of these and I decided to open one up and found that the wifi chip RN171-I/RM. Looking into the chip I found this thread about the different versions of the chip https://www.microchip.com/forums/m797334.aspx. Apparently, they were having issues with the RN171-I/RM, but not with older versions of the RN171. Have you used different versions of this chip as well?

eashaw
eashaw's picture
Ok, so I actually tried

Ok, so I actually tried putting the labjack in a box wrapped with aluminum foil and it looks like the executable stream_with_restart.exe has run without having to restart overnight. This kind of proves that it is interference of some kind. I'll get back to you with more information about reliability. One thing I want to test is whether it is pickup at the antenna or on the hardware itself. It could be that adding some metal parts to the case would resolve this issue. Also, in my use case the labjack itself will be isolated from interference and we'll run an antenna out of the apparatus, so it might turn out that if we had just installed the labjack where we intended to put it we wouldn't have had any issues.

LabJack Support
labjack support's picture
We use SPI firmware with the

We use SPI firmware with the RN171.  Almost everyone else uses UART (asynchronous) firmware, so it will be tough to take much from what you see on the mentioned forum.  We will certainly read through it, though.

Your foil test sounds interesting.  We will try similar, but the general thought here is that you might be able to improve data recovery rate, but still with wireless it is tough to expect 100% without brief interruptions over too long of a time.

Another general concept is that for higher performance WiFi you can use the Ethernet connection on the T7-Pro, and then use an external COTS ethernet-wifi converter (i.e. bridge):

https://labjack.com/support/app-notes/convert-ethernet-to-wifi

 

eashaw
eashaw's picture
So, I tried shielding with

So, I tried shielding with aluminum foil and letting the antenna stick out. That worked for about 5 hours, which is unusually long. I decided to retry completely isolating it with aluminum foil again. Over night it crashed twice. This seems like it is still a better result than I've seen before and I certainly haven't seen it last overnight with the labjack outside of the aluminum foil. What this suggests is that the interference is higher frequency than the wifi signal, because it would have to be attenuated more than the wifi signal itself to make a difference.