Sub Ble_PrinterFound(Name As String, ID As String)
LabelInfo.Text=$"Found printer: ${Name}"$
if Name.Contains("NameyourPrinter") then
Ble.connect(ID)
else
'Search Again
Ble.ScanPrinter
End if
End Sub
Is it not possible to display the list of devices and select the user? In this case, the Ble.Scan command must be called until the desired print is found
Sub Ble_PrinterFound(Name As String, DeviceID As String)
Dim PrinterMap As Map
PrinterMap.Put(Name,DeviceID)
' List of printer
For Each Device As String In PrinterMap.Keys
Log($"DeviceName: ${Device} DeviceID:${PrinterMap.Get(Device)}"$)
Next
End Sub