protected function findFirstPacketOffset()
    {
        // This is quite ugly because it will parse the entire buffer whatever it's size is
        // TODO Rewrite this in a more clever way
        $positions = $this->findall($this->buffer, 'G');
        while (count($positions) > 0) {
            $position = array_shift($positions);
            for ($i = 1; $i <= $this->consecutivePacketsBeforeLock; $i++) {
                if (!in_array($position + 188 * $i, $positions)) {
                    break;
                }
                return $position;
            }
        }
        return false;
    }