Currently the Capacitor implemention doesn't support name and service filtering like RequestDeviceOptions on bluetooth_impl.ts.
If you're open to it, I'd like to work on a PR to add these filters to capacitor_ble_impl.ts.
capacitor_ble_impl.ts:
export interface NiimbotCapacitorBleClientConnectOptions {
/**
* Skip device picker dialog and connect to given device ID.
*
* On **Android** this is the BLE MAC address.
*
* On **iOS** and **web** it is an identifier.
*/
deviceId?: string;
}
https://github.com/MultiMote/niimbluelib/blob/main/src/client/capacitor_ble_impl.ts#L10C1-L19C2
bluetooth_impl: https://github.com/MultiMote/niimbluelib/blob/main/src/client/bluetooth_impl.ts#L40C25-L45C7
I'd also like to add deviceId to ConnectionInfo, to facilitate automatically connecting to the same device on future runs of the capacitor app.
const result: ConnectionInfo = {
deviceName: device.name,
result: this.info.connectResult ?? ConnectResult.FirmwareErrors,
};
https://github.com/MultiMote/niimbluelib/blob/main/src/client/capacitor_ble_impl.ts#L81
I'll be doing this work for my project regardless, and would love to pass my work back to your excellent project!
Currently the Capacitor implemention doesn't support name and service filtering like
RequestDeviceOptionsonbluetooth_impl.ts.If you're open to it, I'd like to work on a PR to add these filters to
capacitor_ble_impl.ts.capacitor_ble_impl.ts:https://github.com/MultiMote/niimbluelib/blob/main/src/client/capacitor_ble_impl.ts#L10C1-L19C2
bluetooth_impl: https://github.com/MultiMote/niimbluelib/blob/main/src/client/bluetooth_impl.ts#L40C25-L45C7
I'd also like to add
deviceIdtoConnectionInfo, to facilitate automatically connecting to the same device on future runs of the capacitor app.https://github.com/MultiMote/niimbluelib/blob/main/src/client/capacitor_ble_impl.ts#L81
I'll be doing this work for my project regardless, and would love to pass my work back to your excellent project!