Tulpar-Yazilim / tp-react-native-bluetooth-printer

React-Native plugin for the bluetooth ESC/POS printers. This plugin is fork of react-native-bluetooth-escpos-printer
MIT License
36 stars 33 forks source link

Bluetooth Conection (ios only) #27

Open Rajesh-hashmedia opened 9 months ago

Rajesh-hashmedia commented 9 months ago

i'm using this package to connect my bluetooth printer with ios device, So i'm using this methos for pair device BluetoothManager.connect(rowData?.address). So which address i pass to connect printer?

getting response from bluetooth

{ "_manager": { "_activePromises": {

},
"_activeSubscriptions": {

},
"_errorCodesToMessagesMapping": {
  "0": "Unknown error occurred. This is probably a bug! Check reason property.",
  "1": "BleManager was destroyed",
  "100": "BluetoothLE is unsupported on this device",
  "101": "Device is not authorized to use BluetoothLE",
  "102": "BluetoothLE is powered off",
  "103": "BluetoothLE is in unknown state",
  "104": "BluetoothLE is resetting",
  "105": "Bluetooth state change failed",
  "2": "Operation was cancelled",
  "200": "Device {deviceID} connection failed",
  "201": "Device {deviceID} was disconnected",
  "202": "RSSI read failed for device {deviceID}",
  "203": "Device {deviceID} is already connected",
  "204": "Device {deviceID} not found",
  "205": "Device {deviceID} is not connected",
  "206": "Device {deviceID} could not change MTU size",
  "3": "Operation timed out",
  "300": "Services discovery failed for device {deviceID}",
  "301": "Included services discovery failed for device {deviceID} and service: {serviceUUID}",
  "302": "Service {serviceUUID} for device {deviceID} not found",
  "303": "Services not discovered for device {deviceID}",
  "4": "Operation was rejected",
  "400": "Characteristic discovery failed for device {deviceID} and service {serviceUUID}",
  "401": "Characteristic {characteristicUUID} write failed for device {deviceID} and service {serviceUUID}",
  "402": "Characteristic {characteristicUUID} read failed for device {deviceID} and service {serviceUUID}",
  "403": "Characteristic {characteristicUUID} notify change failed for device {deviceID} and service {serviceUUID}",
  "404": "Characteristic {characteristicUUID} not found",
  "405": "Characteristics not discovered for device {deviceID} and service {serviceUUID}",
  "406": "Cannot write to characteristic {characteristicUUID} with invalid data format: {internalMessage}",
  "5": "Invalid UUIDs or IDs were passed: {internalMessage}",
  "500": "Descriptor {descriptorUUID} discovery failed for device {deviceID}, service {serviceUUID} and characteristic {characteristicUUID}",
  "501": "Descriptor {descriptorUUID} write failed for device {deviceID}, service {serviceUUID} and characteristic {characteristicUUID}",
  "502": "Descriptor {descriptorUUID} read failed for device {deviceID}, service {serviceUUID} and characteristic {characteristicUUID}",
  "503": "Descriptor {descriptorUUID} not found",
  "504": "Descriptors not discovered for device {deviceID}, service {serviceUUID} and characteristic {characteristicUUID}",
  "505": "Cannot write to descriptor {descriptorUUID} with invalid data format: {internalMessage}",
  "506": "Cannot write to descriptor {descriptorUUID}. It's not allowed by iOS and therefore forbidden on Android as well.",
  "600": "Cannot start scanning operation",
  "601": "Location services are disabled"
},
"_eventEmitter": {
  "_nativeModule": [
    Object
  ]
},
"_scanEventSubscription": {
  "remove": [
    Functionremove
  ]
},
"_uniqueId": 0

}, "id": "03C82533-9897-62C1-E8A6-05B0A1AC6F65", "isConnectable": true, "localName": "Q198E3280410039", "manufacturerData": "AAD0Y9W6pys=", "mtu": 23, "name": "Q198E3280410039", "overflowServiceUUIDs": null, "rssi": -32, "serviceData": null, "serviceUUIDs": [ "0000af30-0000-1000-8000-00805f9b34fb" ], "solicitedServiceUUIDs": null, "txPowerLevel": null }

Saifrazzaq1 commented 7 months ago

same here

jasbir-codeparking commented 7 months ago

Which type of printer you are using @Saifrazzaq1

matheusbento commented 3 months ago

Does this library supports iOS?