This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't I connect to device that hasn't been discovered yet?? (but with Address)

Can't I connect to device that hasn't been discovered yet??

I'm trying to connect one device(A) to another device(B) which ADDRESS is known but never discovered yet.

The reason why it isn't discovered is, the target device that I want to connect is turned on later.

In this situation, If I try A dev -> B dev by Address, It keeps fails to connect. B device is on Advertising mode, but It's been never discovered by 'A`.

Is there any solution that I can connect to a device that I've been never scanned before??...

I'm using nRF51422, s130, sdk12.2.0

  • What do you mean by "discovered"? In Broadcasting/Scanning phase there is only that: advertising and scanning (aka listening). Until one side is properly scanning and the second properly broadcasting then listener should "find" the broadcaster sooner or later, there is no hidden catch in it (beside timing - where obviously better scanning "duty" cycle and faster advertising makes it more probable - and things like directed advertisement with certain white list etc.) Then if Broadcasting device is connectable then you should be able to issue CONNECT_REQ from Scanner's side and they will become GAP Peripheral and Central. Yes, Peripheral can terminate the link any time, you also can have collision or other error on CONNECT_REQ and so you would need to retry (after both sides recover from the situation by some timeouts or similar mechanisms).

Related