# capacitor-rfid-plugin-ox

> rfid read-write

Latest version **0.5.0** (published 2026-08-23) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install capacitor-rfid-plugin-ox
pnpm add capacitor-rfid-plugin-ox
yarn add capacitor-rfid-plugin-ox
bun add capacitor-rfid-plugin-ox
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2026-08-23 |
| First published | 2023-11-01 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 129.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ox-system |
| Maintainers | akramjon |
| Keywords | capacitor, plugin, native |

## Links

- npm: https://www.npmjs.com/package/capacitor-rfid-plugin-ox
- Repository: https://github.com/Akramjon2658/capacitor-rfid-plugin-ox
- Homepage: https://github.com/Akramjon2658/capacitor-rfid-plugin-ox#readme
- Issues: https://github.com/Akramjon2658/capacitor-rfid-plugin-ox/issues
- npm.io page: https://npm.io/package/capacitor-rfid-plugin-ox

## Recent versions

- 0.5.0 (latest) — 2026-08-23
- 0.4.0 — 2026-08-23
- 0.3.5 — 2024-05-20
- 0.3.4 — 2024-05-19
- 0.3.3 — 2024-05-16
- 0.3.2 — 2024-05-16
- 0.3.1 — 2024-05-15
- 0.3.0 — 2024-05-15
- 0.2.1 — 2023-11-21
- 0.2.0 — 2023-11-17
- 0.1.1 — 2023-11-15
- 0.1.0 — 2023-11-15
- 0.0.11 — 2023-11-02
- 0.0.10 — 2023-11-02
- 0.0.9 — 2023-11-02
- … 8 more at https://npm.io/package/capacitor-rfid-plugin-ox/versions

## README

# capacitor-rfid-plugin-ox

rfid read-write

## Install

```bash
npm install capacitor-rfid-plugin-ox
npx cap sync
```

## API

<docgen-index>

* [`getCapabilities()`](#getcapabilities)
* [`getConnectionState()`](#getconnectionstate)
* [`listReaderPorts()`](#listreaderports)
* [`selectReaderPort(...)`](#selectreaderport)
* [`isConnected()`](#isconnected)
* [`startScan()`](#startscan)
* [`stopScan()`](#stopscan)
* [`clearData()`](#cleardata)
* [`getScanData()`](#getscandata)
* [`getOutputPower()`](#getoutputpower)
* [`setOutputPower(...)`](#setoutputpower)
* [`getRange()`](#getrange)
* [`setRange(...)`](#setrange)
* [`getQueryMode()`](#getquerymode)
* [`setQueryMode(...)`](#setquerymode)
* [`getReaderType()`](#getreadertype)
* [`getFirmwareVersion()`](#getfirmwareversion)
* [`writeEpc(...)`](#writeepc)
* [`writeEpcString(...)`](#writeepcstring)
* [`startSearch(...)`](#startsearch)
* [`stopSearch()`](#stopsearch)
* [`addListener('onConnectionState', ...)`](#addlisteneronconnectionstate-)
* [`addListener(string, ...)`](#addlistenerstring-)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### getCapabilities()

```typescript
getCapabilities() => Promise<ReaderCapabilities>
```

Capabilities of the connected Reader.

Implementations that predate this method reject. That is a signal, not a
failure: the caller treats a rejection as a handheld Mobile Reader.

**Returns:** <code>Promise&lt;<a href="#readercapabilities">ReaderCapabilities</a>&gt;</code>

--------------------


### getConnectionState()

```typescript
getConnectionState() => Promise<ReaderConnectionState>
```

Connection state for the first render. The stream of later changes comes
from the `onConnectionState` listener — "not responding" is only found out
after a timeout, so it cannot be a return value.

A reader is an exclusive resource, so its state is only knowable while it
is held: an implementation that is not connected may start an attempt here
and answer `connecting`, with the outcome arriving on the listener.

Implementations that predate this method reject. The caller then hides the
indicator instead of guessing.

**Returns:** <code>Promise&lt;<a href="#readerconnectionstate">ReaderConnectionState</a>&gt;</code>

--------------------


### listReaderPorts()

```typescript
listReaderPorts() => Promise<{ ports: ReaderPort[]; }>
```

The readers plugged in right now, newest listing every call — a port that
was there a minute ago may be gone.

Only readers, not every serial port: what the caller does with this list
is offer it as a choice, and a Bluetooth port is not a choice.

Implementations that predate this method reject. The caller then keeps
whatever the driver picks on its own.

**Returns:** <code>Promise&lt;{ ports: ReaderPort[]; }&gt;</code>

--------------------


### selectReaderPort(...)

```typescript
selectReaderPort(options: { path: string; }) => Promise<void>
```

Use this reader from now on. Reconnects when another port is open.

The choice itself is not stored here: the driver is restarted with the
app, and where a choice belongs is the caller's question. The caller
remembers the path and says it again on the next start.

Rejects when the path is not in the current `listReaderPorts()` — a
remembered reader that was unplugged has to be chosen again, not opened
blindly.

| Param         | Type                           |
| ------------- | ------------------------------ |
| **`options`** | <code>{ path: string; }</code> |

--------------------


### isConnected()

```typescript
isConnected() => Promise<{ connected: boolean; }>
```

**Returns:** <code>Promise&lt;{ connected: boolean; }&gt;</code>

--------------------


### startScan()

```typescript
startScan() => Promise<void>
```

--------------------


### stopScan()

```typescript
stopScan() => Promise<void>
```

--------------------


### clearData()

```typescript
clearData() => Promise<void>
```

--------------------


### getScanData()

```typescript
getScanData() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

--------------------


### getOutputPower()

```typescript
getOutputPower() => Promise<{ value: number; }>
```

**Returns:** <code>Promise&lt;{ value: number; }&gt;</code>

--------------------


### setOutputPower(...)

```typescript
setOutputPower(options: { power: number; }) => Promise<{ value: number; }>
```

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ power: number; }</code> |

**Returns:** <code>Promise&lt;{ value: number; }&gt;</code>

--------------------


### getRange()

```typescript
getRange() => Promise<{ value: number; }>
```

**Returns:** <code>Promise&lt;{ value: number; }&gt;</code>

--------------------


### setRange(...)

```typescript
setRange(options: { range: number; }) => Promise<{ value: number; }>
```

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ range: number; }</code> |

**Returns:** <code>Promise&lt;{ value: number; }&gt;</code>

--------------------


### getQueryMode()

```typescript
getQueryMode() => Promise<{ value: 0 | 1 | 2 | 3; }>
```

**Returns:** <code>Promise&lt;{ value: 0 | 1 | 2 | 3; }&gt;</code>

--------------------


### setQueryMode(...)

```typescript
setQueryMode(options: { queryMode: 0 | 1 | 2 | 3; }) => Promise<{ value: number; }>
```

| Param         | Type                                          |
| ------------- | --------------------------------------------- |
| **`options`** | <code>{ queryMode: 0 \| 1 \| 2 \| 3; }</code> |

**Returns:** <code>Promise&lt;{ value: number; }&gt;</code>

--------------------


### getReaderType()

```typescript
getReaderType() => Promise<{ value: number; }>
```

**Returns:** <code>Promise&lt;{ value: number; }&gt;</code>

--------------------


### getFirmwareVersion()

```typescript
getFirmwareVersion() => Promise<{ value: string; }>
```

**Returns:** <code>Promise&lt;{ value: string; }&gt;</code>

--------------------


### writeEpc(...)

```typescript
writeEpc(options: { epc: string; password?: string; }) => Promise<{ value: number; }>
```

| Param         | Type                                             |
| ------------- | ------------------------------------------------ |
| **`options`** | <code>{ epc: string; password?: string; }</code> |

**Returns:** <code>Promise&lt;{ value: number; }&gt;</code>

--------------------


### writeEpcString(...)

```typescript
writeEpcString(options: { epc: string; password?: string; }) => Promise<{ value: number; }>
```

| Param         | Type                                             |
| ------------- | ------------------------------------------------ |
| **`options`** | <code>{ epc: string; password?: string; }</code> |

**Returns:** <code>Promise&lt;{ value: number; }&gt;</code>

--------------------


### startSearch(...)

```typescript
startSearch(options: { searchableTags: string[]; playSound: boolean; }) => Promise<void>
```

| Param         | Type                                                           |
| ------------- | -------------------------------------------------------------- |
| **`options`** | <code>{ searchableTags: string[]; playSound: boolean; }</code> |

--------------------


### stopSearch()

```typescript
stopSearch() => Promise<void>
```

--------------------


### addListener('onConnectionState', ...)

```typescript
addListener(eventName: 'onConnectionState', listener: (state: ReaderConnectionState) => void) => Promise<PluginListenerHandle>
```

Every connection state change. Fires only on a change, not on a poll.

| Param           | Type                                                                                        |
| --------------- | ------------------------------------------------------------------------------------------- |
| **`eventName`** | <code>'onConnectionState'</code>                                                            |
| **`listener`**  | <code>(state: <a href="#readerconnectionstate">ReaderConnectionState</a>) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

--------------------


### addListener(string, ...)

```typescript
addListener(eventName: string, listenerFunc: (...args: any[]) => any) => Promise<PluginListenerHandle>
```

| Param              | Type                                    |
| ------------------ | --------------------------------------- |
| **`eventName`**    | <code>string</code>                     |
| **`listenerFunc`** | <code>(...args: any[]) =&gt; any</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

--------------------


### Interfaces


#### ReaderCapabilities

What the connected Reader can do. Mode gating comes from here, not from the
reader type — a desktop reader that can write must not be gated like one
that cannot.

| Prop             | Type                                                        | Description                                                           |
| ---------------- | ----------------------------------------------------------- | --------------------------------------------------------------------- |
| **`canWrite`**   | <code>boolean</code>                                        | Reader can write an EPC to a tag (Generate & Set mode depends on it). |
| **`hasRssi`**    | <code>boolean</code>                                        | Reader reports RSSI (Find mode depends on it).                        |
| **`isHandheld`** | <code>boolean</code>                                        | Reader is a handheld terminal rather than a desk device.              |
| **`power`**      | <code>{ min: number; max: number; default: number; }</code> | Output power range in dBm. The power slider renders this range.       |


#### ReaderConnectionState

| Prop         | Type                                                                      | Description                                                                                                                                                                                         |
| ------------ | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`status`** | <code><a href="#readerconnectionstatus">ReaderConnectionStatus</a></code> |                                                                                                                                                                                                     |
| **`reason`** | <code><a href="#readerconnectionreason">ReaderConnectionReason</a></code> |                                                                                                                                                                                                     |
| **`detail`** | <code>string</code>                                                       | Driver text: the port list, the command code, the OS error. This is the one field allowed to talk about the wiring, because nothing branches on it — it is shown as-is for support, not translated. |


#### ReaderPort

One reader the driver could talk to.

`path` is the identity — `COM3` on Windows, `/dev/cu.usbserial-110`
elsewhere. Two identical CH340 adapters carry no serial number of their own,
so the path is all that separates them.

The caller treats it as **opaque**: it compares, stores and hands it back,
and never reads meaning out of it. A driver for a device that is not a
serial port puts its own identity here.

| Prop            | Type                | Description                                                              |
| --------------- | ------------------- | ------------------------------------------------------------------------ |
| **`path`**      | <code>string</code> |                                                                          |
| **`label`**     | <code>string</code> | What the OS calls the device. For the operator to read, not to match on. |
| **`vendorId`**  | <code>string</code> |                                                                          |
| **`productId`** | <code>string</code> |                                                                          |


#### PluginListenerHandle

| Prop         | Type                                      |
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |


### Type Aliases


#### ReaderConnectionStatus

The four states an operator can act on.

`isConnected()` is too coarse for this: a reader that is plugged in but
silent answers `false` the same way a missing one does, and the operator
needs a different move in each case. `isConnected()` stays as it is.

<code>'connecting' | 'connected' | 'not-found' | 'not-responding'</code>


#### ReaderConnectionReason

Why the reader is unusable. The status alone does not say what to do next:
a busy reader needs another program closed, a missing one needs the
connection checked. The UI picks its message from the reason when there is
one.

These name what happened to the *reader*, never how it is wired. A driver
for a device with no serial port has to be able to answer in this
vocabulary too, and the operator has to be told the truth either way —
so nothing here says "COM port" or "USB". The device-specific sentence
belongs in `detail`.

<code>'busy' | 'not-detected' | 'disconnected' | 'no-answer' | 'not-chosen'</code>

</docgen-api>

---
_Source: https://npm.io/package/capacitor-rfid-plugin-ox · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
