def receive(bytes)
      response = ""
      loop do
        if bytes <= @receive_buffer.bytesize
          array = @receive_buffer.bytes.to_a
          response = array[0..(bytes - 1)].pack('c*')
          @receive_buffer = array[(bytes)..-1].pack('c*')
          break
        end

        chunk = @connection.read_data
        if chunk.bytesize > 0
          @receive_buffer += chunk
        else
          sleep(0.1)
        end
      end
      @logger.debug("RX: #{unpack(response).inspect}")

      response
    end
def receive(bytes)
      response = ""
      loop do
        if bytes <= @receive_buffer.bytesize
          array = @receive_buffer.bytes.to_a
          response = array[0..(bytes - 1)].pack('c*')
          @receive_buffer = array[(bytes)..-1].pack('c*')
          break
        end

        chunk = @connection.read_data
        if chunk.bytesize > 0
          @receive_buffer += chunk
        else
          sleep(0.1)
        end
      end
      @logger.debug("RX: #{unpack(response).inspect}")

      response
    end
Public: Waits and receives the specified number of packets from the
 dongle.

 bytes - The number of bytes to read.

 Returns a binary string containing the response.