Beacon advertisement zephyr

Hello,

I would like to create my beacon application to publish periodically (e.g. 10sec) data related to three temperature sensor.

What're the possible solution to implement it? Eddystone-TLM? Multi-advertisement? Single- advertisement?

Do you have some suggestion?

Where can I find documentation?

Thank in advance 

Parents
  • Hello Hieu,

    Thank you very much for your detailed suggestion.

    I followed the webinar that It was very clear and useful. Thank you again.

    Choosing which format and implementation to use will be dependent on your overall system design. Some example concerns are:
    - Which device do you want to observe that data, and how?
    - Which device do you want to not observe that data?
    - How do you acquire the data from the sensor? One beacon device reading all three sensors, or one beacon device each sensor?

    - Device that has to obverse data is an Android Smartphone that should be also update the advertising data package period (this point is low priority)

    - There isn't limitation on the device that can be observe (of course I'm very curious to know, how I can limitat the access to a specif Android device for example)

    - One beacon device read data from three sensor and transmit the package.

    Which solution can be applicable?

    Of course Eddystone-TLM is more readable but If I want obscure the real data, I think that single or multiple advertising will be more useful.

    For documentation on BLE Advertising and Beacon, you can look at:
    - Sample: Bluetooth: Beacon
    - Sample: Bluetooth: Periodic Advertising
    - Sample: Bluetooth: Scan & Advertise
    - BLE Advertising APIs are included in: Generic Access Profile (GAP)

    I tried to compile and execute examples suggested but I countered some issue (I think related to the network layer or some incompatibility ) that I reported here. I will appreciate if you can help me.

    Thank you in advance.

  • Hi,

    Given your requirements, here are some information/recommendation with some technical keywords for you to research on.

    • If your phone device has to send command or any data to the sensor-reading device, then you probably want a connection.
      In a connection setup, your sensor-reading device should be be a GAP Peripheral, most likely a GATT Server. Your phone device should be a GAP Central, most likely a GATT Client.
      A relevant sample: Bluetooth: Peripheral ESP

    • If you have multiple phone-devices requiring access to the sensor-reading device, then you can go with either connection or advertising.
      A relevant sample for one peripheral connecting to multiple centralsBluetooth: Peripheral Bond Management Service (BMS)
      I believe you are already trying plenty of advertising samples.

      One immediate advantage of using connection over scan/advertise is power consumption: The phone reading the data will have to continuously scan for advertising data.

    • If you want to obscure data in a connection, you will want Pairing with Security.
      Relevant samples: Also the BMS sample linked above

    • If you want to obscure data in an advertising packet, you will want to encrypted the advertising data. In this case you should use the Manufacturer Data data field. 
      I am unfortunately not well versed in encryption features. Here are some samples I found: Cryptography samples

    Please keep in mind the above are just quick start recommendations.

    Once you get more familiar with the technology, there are more things you can choose from. Perhaps a different protocol, like Thread or Bluetooth Mesh. Perhaps a custom GATT Profile, even.

    Of course, the more features/advanced technologies you add on a device, the more work it will be.

    You will need some balancing between your requirement, timeline and resources.


    Continuing this conversation will most probably divert from the original topic about getting started with advertising. If you don't mind, shall we verify my previous reply as the answer and have new Q&A for your follow-up questions?

    Finally, about your new ticket  Zephyr set periodic advertising parameters (err -134), unfortunately it has been assigned to a different team. But I believe you will be in good hands.

    Best regards,

    Hieu

Reply
  • Hi,

    Given your requirements, here are some information/recommendation with some technical keywords for you to research on.

    • If your phone device has to send command or any data to the sensor-reading device, then you probably want a connection.
      In a connection setup, your sensor-reading device should be be a GAP Peripheral, most likely a GATT Server. Your phone device should be a GAP Central, most likely a GATT Client.
      A relevant sample: Bluetooth: Peripheral ESP

    • If you have multiple phone-devices requiring access to the sensor-reading device, then you can go with either connection or advertising.
      A relevant sample for one peripheral connecting to multiple centralsBluetooth: Peripheral Bond Management Service (BMS)
      I believe you are already trying plenty of advertising samples.

      One immediate advantage of using connection over scan/advertise is power consumption: The phone reading the data will have to continuously scan for advertising data.

    • If you want to obscure data in a connection, you will want Pairing with Security.
      Relevant samples: Also the BMS sample linked above

    • If you want to obscure data in an advertising packet, you will want to encrypted the advertising data. In this case you should use the Manufacturer Data data field. 
      I am unfortunately not well versed in encryption features. Here are some samples I found: Cryptography samples

    Please keep in mind the above are just quick start recommendations.

    Once you get more familiar with the technology, there are more things you can choose from. Perhaps a different protocol, like Thread or Bluetooth Mesh. Perhaps a custom GATT Profile, even.

    Of course, the more features/advanced technologies you add on a device, the more work it will be.

    You will need some balancing between your requirement, timeline and resources.


    Continuing this conversation will most probably divert from the original topic about getting started with advertising. If you don't mind, shall we verify my previous reply as the answer and have new Q&A for your follow-up questions?

    Finally, about your new ticket  Zephyr set periodic advertising parameters (err -134), unfortunately it has been assigned to a different team. But I believe you will be in good hands.

    Best regards,

    Hieu

Children
Related