> For the complete documentation index, see [llms.txt](https://docs.mosip.io/1.2.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mosip.io/1.2.0/mosip-docs-1.1.5/modules/registration-client/device-integration-specifications.md).

# Device Integration Specifications

This document detailed out the design approach to integrate with the list of devices used in the MOSIP platform.

Interface approach has been taken to implement the integration with external devices.\
The interface should have the required method to communicate with the external devices.\
An Abstract class has been defined to implement the common functionality and it should be extended by Vendor specific implementation class. The device vendor's specific implementation class should extend the Abstract class and implement the required methods using available libraries.

### Devices:

1. Scanner
2. Printer
3. GPS

#### Scanner:

***

**Interface: IMosipDocumentScannerService**

1. public Boolean isConnected() - to check the scanner connection availability.
2. public BufferedImage scan() - to scan the document from the scanner device.

**Abstract Class: DocumentScannerService**

1. public byte\[] asPDF(List bufferedImages) - to convert the captured scanned document files into pdf format.
2. public byte\[] asImage(List bufferedImages) - to convert the captured scanned document files into image format.
3. public byte\[] getImageBytesFromBufferedImage(BufferedImage bufferedImage) - to get the byte\[] from BuffredImage object.
4. public List pdfToImages(byte\[] pdfBytes) - to convert the pdf document to image format in order to show in the document preview.

#### Printer:

***

Use the JavaFx provided print functionality to interact with printer directly from UI layer. No additional interface is required. javafx.scene.web.WebView\.getEngine().print(PrinterJob)

#### GPS:

***

**Interface:IMosipGPSService**

1. public String getComPortGPSData (String comPortNo, int portReadWaitTime) - it returns GPS signal in standard format.

**Abstract Class:IMosipGPSServiceImpl**

1. public GPSPosition sigalParser(String line) Inputs: gps signal (Ex: $GPRMC,055218.000,A,1259.4845,N,08014.7602,E,0.07,120.70,171018,,,A\*64)
   * returns the latitude and longitude from the GPS signal.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mosip.io/1.2.0/mosip-docs-1.1.5/modules/registration-client/device-integration-specifications.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
