def read_packet

      pkts = []
      if wait_for_byte(BT_SYNC) and wait_for_byte(BT_SYNC)
        plen = getbyte
        if plen and plen < BT_SYNC
          pkts = read_payload(plen)
        else
          $stderr.puts "Invalid packet size: #{plen} bytes" if @verbose
        end
      end
      pkts
    end
def read_packet

      pkts = []
      if wait_for_byte(BT_SYNC) and wait_for_byte(BT_SYNC)
        plen = getbyte
        if plen and plen < BT_SYNC
          pkts = read_payload(plen)
        else
          $stderr.puts "Invalid packet size: #{plen} bytes" if @verbose
        end
      end
      pkts
    end
=begin rdoc
Return an Array of Packet objects.
Note: this will perform a blocking read on the serial device.
=end