A method for providing an optical interface with at least one optical
coupling structure for a packaged optical device is described. The at
least one optical coupling structure may be, for example, wave-guides
and/or microlenses. The packaged optical device includes an external
alignment structure. The external alignment structure has a support means
with at least one hole and at least one alignment feature. The method
includes providing optical encapsulate material in the hole of the
support means. Optical coupling structures, such as wave-guides or
microlenses, may be provided into the encapsulation at a well-defined
position relative to the at least one alignment feature of the external
alignment structure. By providing the optical coupling structures
directly in the material comprised in the encapsulation, a high degree of
alignment accuracy is obtained.