#mauliks_code

1 messages ¡ Page 1 of 1 (latest)

inland mothBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1231934409360543896

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

pastel plazaBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

shy surge
#

hi there!

#

do you mean the call to didUpdateDiscoveredReaders timed out and returned an error?

hardy elm
#

no that method called once it found the reader. My app then show that reader in the list

#

I have set time out for 15 seconds. and after that app shows alert of time out

#

but the app still show alert even if app founds the reader and already connected because discoverReaders did not stop after finding the reader

#

should not the discoverReaders method stop as soon a reader found?

shy surge
#

so it's the call to discoverReaders() that times out and return an error?

hardy elm
#

yes

shy surge
#

I'm confused. you said that you did found a reader and connected to it, so how can you get a timeout when calling discoverReaders()?

hardy elm
#

sorry to make you confuse let me explain again

#

SCPBluetoothScanDiscoveryConfigurationBuilder *builder = [SCPBluetoothScanDiscoveryConfigurationBuilder new];
[builder setTimeout:15];
[builder stimulated:NO];

SCPBluetoothScanDiscoveryConfiguration *config = [builder build:&error];
if (error) {
    NSLog(@"Error building discovery configuration");
}
                           
self.discoverCancelable = [[SCPTerminal shared] discoverReaders:config delegate:self completion:^(NSError *error)
{}
#

This is my setup to discover reader

#

[builder setTimeout:15]; so this will timeout after 15 seconds correct?

#

before that - (void)terminal:(SCPTerminal *)terminal didUpdateDiscoveredReaders:(NSArray<SCPReader *> *)readers this gives me a reader and app shows in the list to connect with.

#

now discoverReaders method still running and after 15 seconds it ends with time out

shy surge