-
Notifications
You must be signed in to change notification settings - Fork 62
Description
Description
When using the "Find a printer" feature, the app enters an indefinite search state if Bluetooth is turned off or if the user denies Bluetooth permissions. This happens even when a Star Micronics TSP100IIIU printer is physically connected via a USB-to-iOS cable.
The USB-connected printer only appears and is recognised if Bluetooth is enabled or if the user grants Bluetooth access — which should not be a requirement for wired printer discovery.
Your device where the bug occurs
- Device:
iPad 10th gen - OS:
iOS 18.1 - Version
1.10.0
Your printer
- Model Names:
TSP100IIIU - Firmware Version:
Unknown - Interface:
Usb
Your development environment
react-native run-ios --device "iPad"
react-native run-ios --device "iPad" --mode Release
To Reproduce
export enum InterfaceType {
Unknown = 'Unknown',
Lan = 'Lan',
Bluetooth = 'Bluetooth',
BluetoothLE = 'BluetoothLE',
Usb = 'Usb'
}
static async portDiscovery(type: Array<InterfaceType>) {
try {
const printers: Array<{ id: string; name: string }> = [];
const manager = await StarDeviceDiscoveryManagerFactory.create(type);
manager.discoveryTime = 1000;
manager.onPrinterFound = (printer: StarPrinter) => {
printers.push({
id: `${printer.connectionSettings.identifier}|${printer.connectionSettings.interfaceType}`,
name: printer.information?.model || "Unknown Printer",
});
};
await new Promise<void>((resolve) => {
manager.onDiscoveryFinished = () => {
resolve();
};
manager.startDiscovery();
});
return printers;
} catch (error) {
console.debug(`Error initialising printer discovery: ${String(error)}`);
throw new Error("Unable to find any printers. Please try again");
}
}
Steps:
- Connect the TSP100IIIU printer via USB to iPad.
- Open the app and navigate to the "Find a printer" screen.
- When prompted for Bluetooth access, choose "Don't Allow".
Alternatively, disable Bluetooth in iOS settings before launching the app. - Observe: the discovery process hangs indefinitely and does not list the USB printer.
Expected behavior
The USB-connected TSP100IIIU printer should be discovered and returned in the array, regardless of Bluetooth state or permission.
Screenshots
Video A – Demonstrating the issue
https://github.com/user-attachments/assets/210cdbbe-dfbb-4458-8c20-b10e1755ad3f
Screenshot A – Expected result
