# btPrinterPortList

## Description

Returns a list of all the bluetooth printer ports.

## Input / Parameter

N/A

## Output

N/A

## Callback

### callback

The function to be executed if the printer ports are returned successfully.

### errCallback

The function to be executed if the printer ports are not returned successfully, or when 'btPrinterPortList error: bluetoothClassicSerial plugins not found' is returned.

## Video

Coming Soon.

## Example

The user wants to connect to view the list of printers available.

### Steps

1. Call the function `btPrinterPortList` in a button component.
2. Call the function `setComboOptions` in the callback and `infoDialog` in the errCallback of the `btPrinterPortList` function.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-a55751e2b0e0abe4436aa8f602c58921f8a9411d%2FbtPrinterPortList-step-1.png?alt=media)

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-8df1e9ac67ce0e0fbb2b8c593977a299ca3a43f6%2FbtPrinterPortList-step-2.png?alt=media)

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-4a0c5ad65a7adeb4e1a2b0095633222e424496a0%2FbtPrinterPortList-step-3.png?alt=media)

### Result

1. Press the Generate Printer List button.
2. If the printer list is generated, the printers will be shown in the combobox. If the printer list is not generated, the error dialog will appear.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-1e76374054278d516128e7d4ec6f1cf9fb6bf092%2FbtPrinterPortList-result-1.jpg?alt=media)

## Links
