Bluefruit scanner BLE Callback hanging after 5 minutes

Found it, and it was not what I was expecting. Running for 3 hours + and still going.

In the Loop I was cleaning up the packet values using memset() once finished.

      if (sensorBLEPacket.deviceNameLength > 0)
      {
        packetCheck(sensorBLEPacket);
      }

      memset(&packet, 0, sizeof(packet));
      memset(&packet2, 0, sizeof(packet2));
      memset(&sensorBLEPacket, 0, sizeof(sensorBLEPacket));

Replacing memset() with a copy of an empty packet value solved the problem.

      packet = emptyPacket;          // Clear the packet
      packet2 = emptyPacket;         // Clear the packet
      sensorBLEPacket = emptyPacket; // Clear the packet

A better programmer than me will need to explain why this worked, but it does.

Thanks for your help.

I will create a new post explaining my jlink issues, if would be great if you have any thoughts on that.

Thanks
Dave