I have an application in mind where an argon adversities a ble beacon. It does this in Ultra low power mode. Then a phone application, when in range of the beacon then will send a small data packet to the argon. A few bytes is all. At this point, the agon wakes up, triggers a GPIO then goes back to sleep.
From what I have read so far it looks like ble beacons are really meant to be a one way low power communication. However, is there any reason I cannot implement something like this since I control the hardware and the software and the iphone app?
I have read and read but have not really figured out how to do this or if its feasable.
Does anyone have any suggestions or articles I can read to help understand this more?
I am very new to ble and still learning so thanks for the help.
After I posted this I did end up finding this.
I am still trying to understand this but I think this might be what i am looking for.
The iBeacon is one-way. However, you can continuously BLE advertise from the Argon, which is what beacons do. You can use a custom payload so your phone app can identify your custom beacons. In addition to advertising, you can also be a BLE peripheral, which allows your phone app to send data to it. In this mode, you don’t need to do any complicated pairing, the phone app will just be able to send it data, then disconnect. The Argon can then activate the GPIO.
This sounds like exactly what I am looking for. Do you know of any example code / projects like this? Again I am still learning about ble. Sorry if this is obvious.
One other thing, if the device is in ulp mode can it “wake up” based off of the data sent from the phone to the peripheral?
I don’t think there’s an example of exactly what you are looking to do, but it should be feasible.
When you use the ble() wake mode from sleep, it does two things:
- When advertising, it micro-wakes to advertise. Your firmware doesn’t run during these periods, it just wakes the BLE radio up to send the beacon-like data then goes back to sleep.
- When in peripheral mode, it completely wakes the device so you can handle the connection from your code. That’s where you’d handle the data received and update the GPIO before going back to sleep.