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

Control output wihout connection

Hi,

Is it possible to control the ouputs without connecting?

I mean something like this:

I have a nRF51DK. And I would like to detect if there are bluetooth devices in the area. If yes it should turn on a LED.

I dont want to use an application. It should automaticly detect the device, when it turns on the bluetooth.

And I would like to know if there is something like a unique bluetooth adress? Or is it possible to check the BD_ADDR adress?

So only predifened bluetooth adresses would turn the LED on

  • I don't entirely understand what you're asking.

    You can scan for any bluetooth device which is advertising, that's it, there's no other built-in functionality which allows you to find devices which aren't advertising. If a device isn't broadcasting at all (ie it's doing nothing or it's scanning) there's no way to detect it, I suppose technically if a device was in a connection broadcasting packets you could possibly discover it by writing lots and lots and lots of custom radio code which could scan all the available channels and try to find broadcasting devices, but that would be fairly hard.

    So you can start a scan and discover advertising devices. That's pretty much it.

    I don't either understand "I don't want to use an application". What do you mean by that? You have to write some code to put on the nrf51 at least to do the scanning, that's an application is it not?

    As for addresses - there's lots of different types of addresses, some resolvable, some not, some which require a previous bond before they can be resolved. Those are all documented in various BTLE books.

  • With I dont want to use an application i mean I dont want to use an appalication on the mobile device. Of course I want to write an application for the nRF51 DK. Sorry for unclear writing. My Goal is that the nRF51 board can detect all devices which have turned the bluetooth on. And for every detected device it should lit a LED. So if I scan with the nRF51 and turn on the bluetooth on my mobile device, is the mobile device visible for the nRF51? Or other question: If I turn on the bluetooth, is the mobile device advertising?

  • Answers to your two questions in the end are: No (unless you have some specific background application which detests BT start and uses mobile API to start broadcasting - and this must be supported by particular OS API, should be on iOS but not sure about Android and others). In addition: are you mixing classical BT BR/EDR (1.0/2.0/3.0+) and BT Smart aka Bluetooth Low Energy (4.0+)? Because turning Bluetooth interface on mobile usually means enabling BT BR/EDR and BLE (if chip and mobile FW supports it) but you cannot detect with nRF51 any activity done by classical BT (unless you would use chip as raw scanner over 2.4GHz band which might be even impossible HW wise).

  • So I have to use an application on the mobile device which will advertising. Without an appliaction it will not be possible to detect the device on the nRF51 DK

  • I covered that in my original answer. You can only detect a device which is transmitting for a start - just having bluetooth 'turned on' means nothing. It could be on and idle, or scanning, if it's not transmitting, there's nothing to detect.

    If a device is advertising you can detect it. Doesn't matter WHAT it's advertising (leaving the discussion about directed advertising aside) if it's advertising you can scan for it. But that's a pretty limited case. The last possibility is that it's in connection with another device - theoretically if you wrote lots of code you could find such devices eventually but there's nothing in the BTLE stack to help you.

    So basically you can't just detect a device because it happens to have BTLE turned on, you can detect devices with BTLE on advertising something, and the something doesn't matter. Else, you can't.

Related