is it possible? about ble beacon and scan.

hi devzon.

a few days ago,  I successed what I want using ble_app_blinky and ble_app_blinky_c

- when press the button1 of server nrf52 dk board, and then the led1 of client nrf52dk board is turned on.

nest, specifically, I want to make light switch(peripheral) and light receiver(central) using ble beacon and beacon scanner.

and then what I want is as follows.

no.1. light receiver is always powered on and maintain "scan mode" 

no.2. light switch(transmitter, peripheral) is always powerd off, and when I turned on the switch, it is powered on at a moment and powered off right away.

no3. as soon as ilight switch is powered on, it start advertising and light receiver scan that and execute something like turning on led

the reason why the light switch maintain powerd off state is that it has no battery. That is my reseach subject.

so I think I should use beacon example. But.. as you know, nordic sdk v17.1 doesn't have beacon scanner example like ble_app_beacon_c.

How can I do? please help me to study about beacon and beacon scan.

and I'm gonna use nRF52832 chip and module.

Parents
  • Hi,

    Making just a simple scanner is quite simple. You can refer to this post, or alternatively use the SoftDevice directly without any helper libraries (which are not really that helpful in such a simple case). For that,  you can refer to the slightly outdated project from this post (this does active scanning though, which is probably not relevant for you, so you can remove the few lines of code related to that).

  • hi, Einar Thorsrud.

    first... I don't understand " alternatively use the SoftDevice directly without any helper libraries (which are not really that helpful in such a simple case)."

    softdevice? without helper libraries? How can I do that? would you please hint for me?

    and then.. I have another question.

    as I told you that,  I have tried to make beacon as peripheral. and I don't have to put the code in about application(android or ios).

    but ble_beacon example and other ble examples including ble_central and ble_peripheral has a lot of code about app. 

    so it makes me really confused;

    then I don't know where and what and how I put the code in which execute turning on the led1 on client board as soon as beacon(periphral board) power on.

    even though that question is very easy for you..... it' really really hard and difficult for me to solve.

    please help me

  • Hi,

    pail said:
    softdevice? without helper libraries? How can I do that? would you please hint for me?

    The SoftDevice is the Bluetooth LE stack we provide. The SDK also use a number of libraries (like the scanning module). For a simple scanner you do not need these libraries. So for a simple scanner I suggest you look at the ble_active_scanner_sdk__15.2.zip. This only needs minor adjusments to work with nRF5 SDK 17.1.0.

    If the SoftDevice is an unknown concept that tells me that you are very new to the nRF5 SDK, so it might be a good idea to spend a little bit of time reading documentation and playing with some examples to better understand how the platform works.

    pail said:
    as I told you that,  I have tried to make beacon as peripheral. and I don't have to put the code in about application(android or ios).

     I am not sure what you are looking for here? iOS and Android is a different matter, though those can also scan for advertisment packets (beacons if you like).

    pail said:
    but ble_beacon example and other ble examples including ble_central and ble_peripheral has a lot of code about app. 

    Many examples explain how you can test with an app on a phone or similar, but that is normally not needed. Bluetooth is standardized, so ther eis no probelm communicationg between embedded devices.

    pail said:
    then I don't know where and what and how I put the code in which execute turning on the led1 on client board as soon as beacon(periphral board) power on.

    For that refer to an example that uses LEDs. Implementing this is up to you.

Reply
  • Hi,

    pail said:
    softdevice? without helper libraries? How can I do that? would you please hint for me?

    The SoftDevice is the Bluetooth LE stack we provide. The SDK also use a number of libraries (like the scanning module). For a simple scanner you do not need these libraries. So for a simple scanner I suggest you look at the ble_active_scanner_sdk__15.2.zip. This only needs minor adjusments to work with nRF5 SDK 17.1.0.

    If the SoftDevice is an unknown concept that tells me that you are very new to the nRF5 SDK, so it might be a good idea to spend a little bit of time reading documentation and playing with some examples to better understand how the platform works.

    pail said:
    as I told you that,  I have tried to make beacon as peripheral. and I don't have to put the code in about application(android or ios).

     I am not sure what you are looking for here? iOS and Android is a different matter, though those can also scan for advertisment packets (beacons if you like).

    pail said:
    but ble_beacon example and other ble examples including ble_central and ble_peripheral has a lot of code about app. 

    Many examples explain how you can test with an app on a phone or similar, but that is normally not needed. Bluetooth is standardized, so ther eis no probelm communicationg between embedded devices.

    pail said:
    then I don't know where and what and how I put the code in which execute turning on the led1 on client board as soon as beacon(periphral board) power on.

    For that refer to an example that uses LEDs. Implementing this is up to you.

Children
No Data
Related