0

I'm not a ble guru, I worked on some modules to expose some simple service with pairing and bla bla :9 One of our customer ask me if it possible to control mcu gpio, with a beacon service running. For what I know beacon standard is only a lighthouse to check the proximity (streaming simple packet uuid, signal strength etc etc), and the only way to do something like this is to expose a new service running concurrently with beacon ( in practice send multi type of packets). I don't want pairing (beacon<->device app) and don't worry about race condition, if multi devices set/reset a gpio, it's not my business.

I found something similar https://community.estimote.com/hc/en-us/articles/217429867-What-is-GPIO-How-to-set-it-up-, what you think about?

There are libraries or eddystone's extensions to do that? Some project on github?

We prefer to work with Nordic ble module, but if you know solution based on other mcu, you are welcome.

Thanks for your help

sukoy
  • 11
  • 1
  • 3
  • Can you describe a little more about the use case you are trying to solve beyond: "One of our customer ask me if it possible to control mcu gpio"? If I understand correctly, you want the gpio to be an output, and you want to control the voltage on an output line based on an event triggered by an external device communicating with the beacon. Is this correct? It may be helpful to describe the situation where you would do this. Since beacons are normally transmit only, this use case sounds like it might require an atypical implementation. – davidgyoung Apr 05 '16 at 13:19
  • Correct. The customer would like to control some leds attached to the beacon board, however in theory there should be a lot of device controlled by the gpio beacon board. The question is simple, how to put a beacon in receive mode and how can I send data from device to the beacon? – sukoy Apr 05 '16 at 13:39

1 Answers1

3

Standard beacons (iBeacon, Eddystone, AltBeacon) are transmit only devices. They simply send out advertisements at a fixed rate with a unique identifier. Some manufacturers expose proprietary configuration interfaces as read-write Bluetooth LE GATT Services. But there is no standard GATT Service that does this, and the manufacturer-specific schemes are designed specifically to set beacon identifiers and other operating parameters.

I don't think there are beacon-specific libraries or extensions that will help with this, beyond standard Bluetooth LE SDKs for iOS and Android. In order to accomplish this goal with a Nordic BLE module you would need to build your own custom system:

  1. Write custom Nordic firmware (that sits alongside beacon transmission firmware) that exposes a new Bluetooth LE GATT Service. The service would expose a writable GATT Attribute that would control the GPIO pin.

  2. Write custom mobile app code that connects to this GATT Service (CoreBluetooth on iOS and android.bluetooth on Android), and writes to the GATT attribute to control the pin.

One thing you must be careful of is that connecting to to a GATT Service will typically stop a Bluetooth Peripheral from advertising (meaning it won't transmit as a beacon). So you may wish to drop the connection quickly to prevent mobile devices or other Bluetooth Centrals from stoping the beacon transmissions.

davidgyoung
  • 63,876
  • 14
  • 121
  • 204