bufferUntil() only defines the byte to detect before calling the serialEvent() callback.
I think you have to read the data in a buffer by chunks, perhaps accumulating all of it in a bigger buffer, and analyze the result to detect the separator pattern. Keep indexes on the start and the end, so you can extract the sequence of data after detecting this separator.
I think you have to read the data in a buffer by chunks, perhaps accumulating all of it in a bigger buffer, and analyze the result to detect the separator pattern. Keep indexes on the start and the end, so you can extract the sequence of data after detecting this separator.