@@ -48,9 +48,9 @@ A professional-grade React Native module providing seamless USB serial communica
4848> ** Android Only:** This package only works on Android devices. It will not function on iOS.
4949
5050``` bash
51- npm install react-native-usb-serial
51+ npm install @rejaul/ react-native-usb-serial
5252# or
53- yarn add react-native-usb-serial
53+ yarn add @rejaul/ react-native-usb-serial
5454```
5555
5656### Android Configuration
@@ -70,7 +70,7 @@ Add USB permissions to your `AndroidManifest.xml`:
7070import {
7171 getDeviceList ,
7272 type UsbDevice ,
73- } from ' react-native-usb-serial' ;
73+ } from ' @rejaul/ react-native-usb-serial' ;
7474
7575// Get all connected USB devices
7676const devices: UsbDevice [] = getDeviceList ();
@@ -90,7 +90,7 @@ import {
9090 requestUsbPermission ,
9191 connect ,
9292 disconnect ,
93- } from ' react-native-usb-serial' ;
93+ } from ' @rejaul/ react-native-usb-serial' ;
9494
9595async function connectToDevice(device : UsbDevice ): Promise <void > {
9696 try {
@@ -128,7 +128,7 @@ import {
128128 offReadInterval ,
129129 type RawReadConfig ,
130130 NativeEventEmitter ,
131- } from ' react-native-usb-serial' ;
131+ } from ' @rejaul/ react-native-usb-serial' ;
132132
133133// Configure reading parameters
134134const readConfig: RawReadConfig = {
@@ -158,7 +158,7 @@ subscription.remove();
158158### Writing Data to Serial Port
159159
160160``` typescript
161- import { write , isConnected } from ' react-native-usb-serial' ;
161+ import { write , isConnected } from ' @rejaul/ react-native-usb-serial' ;
162162
163163async function sendCommand(command : string ): Promise <void > {
164164 try {
@@ -181,7 +181,7 @@ await sendCommand('AT+RST\r\n');
181181### Manual Serial Reading
182182
183183``` typescript
184- import { read } from ' react-native-usb-serial' ;
184+ import { read } from ' @rejaul/ react-native-usb-serial' ;
185185
186186async function readSerialData(): Promise <void > {
187187 try {
@@ -210,7 +210,7 @@ import {
210210 type SoilSensorConfig ,
211211 type SoilData ,
212212 NativeEventEmitter ,
213- } from ' react-native-usb-serial' ;
213+ } from ' @rejaul/ react-native-usb-serial' ;
214214
215215// Configure modbus soil sensor
216216const soilConfig: SoilSensorConfig = {
@@ -251,7 +251,7 @@ subscription.remove();
251251### Get Currently Connected Device
252252
253253``` typescript
254- import { getConnectedDevice } from ' react-native-usb-serial' ;
254+ import { getConnectedDevice } from ' @rejaul/ react-native-usb-serial' ;
255255
256256const device = await getConnectedDevice ();
257257if (device ) {
@@ -289,7 +289,7 @@ soilSub.remove();
289289## Error Handling
290290
291291``` typescript
292- import { connect , type UsbDevice } from ' react-native-usb-serial' ;
292+ import { connect , type UsbDevice } from ' @rejaul/ react-native-usb-serial' ;
293293
294294async function safeConnect(device : UsbDevice ): Promise <void > {
295295 try {
0 commit comments