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

nRF51822 Beacon SW1 and SW2 buttons

Hello, I want to be able to perform actions in my app based on the tactile buttons being pressed on the beacon. When I bought it I was under the impression that the service would be able to intercept the button presses, but I can't find any example for that in the service demo and in the app.

Are those buttons not used as a trigger which the beacon transmits once they are pushed?

Parents
  • No, the default beacon kit and code is configured for the beacon to broadcast a specific UUID, minor and major value. These values can be searched for by an app on a smart phone or similar and could trigger events on the smart phone. Beacons are designed to only send data from the beacon to the smart phone.

    The buttons on the kit are used to put the beacon kit into different modes of operation. If SW1 is pushed when you put in the battery, the chip will enter DFU (Device Firmware Upgrade) mode and be able to receive new application FW. SW2 will put the chip into beacon config mode and you can connect to it and modify the UUID, minor and major value for the chip. The DFU and config mode is not a part of normal beacon mode, but only there for debugging and development.

    However, you could have the button pushes to change the content of the advertising/broadcasting if you wanted and different content could trigger different events on the phone side.

Reply
  • No, the default beacon kit and code is configured for the beacon to broadcast a specific UUID, minor and major value. These values can be searched for by an app on a smart phone or similar and could trigger events on the smart phone. Beacons are designed to only send data from the beacon to the smart phone.

    The buttons on the kit are used to put the beacon kit into different modes of operation. If SW1 is pushed when you put in the battery, the chip will enter DFU (Device Firmware Upgrade) mode and be able to receive new application FW. SW2 will put the chip into beacon config mode and you can connect to it and modify the UUID, minor and major value for the chip. The DFU and config mode is not a part of normal beacon mode, but only there for debugging and development.

    However, you could have the button pushes to change the content of the advertising/broadcasting if you wanted and different content could trigger different events on the phone side.

Children
No Data
Related