0

I am transmitting a custom beacon format. To transmit, I set up beacon parser. In the layout, it says that the power byte is a required field. Why is it a required field? Can I transmit a packet without power byte?

Also how is power byte in packet different from the txPowerLevel we set in BeaconTransmitter? Thanks

Parth Parekh
  • 123
  • 11

1 Answers1

1

Power is a required field because if the library encounters this beacon it needs to know how to get a reference value for distance estimates. The library has no way of disabling these distance estimates, so making it required was a design decision.

That said, if you really don't want to have a power value in the custom beacon format, you can always specify any byte offset you want to be the power field E.g. p:0-0, and the library will gladly accept that. But since that field won't actually contain the reference RSSI measurement at 1 meter, then the distance estimates for any beacons parsed with this layout will be completely wrong. That's fine, though -- just don't use the distance estimates, and don't be surprised that they return crazy values.

Nicolas Guillaume
  • 8,160
  • 6
  • 35
  • 44
davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • Can you also give some insights about the second part of the post? how is power byte in packet different from the txPowerLevel we set in BeaconTransmitter? – Parth Parekh Aug 07 '17 at 18:36
  • 1
    The txPowerLevel in the beacon transmitter indicates how much energy should be sent to the radio when sending out the signals. The txPower byte in the packet communicates the reference power level (in RSSI) that should be expected if the transmitter is 1 meter away. This is used for distance estimates. The two are related. If you increase the transmitter txPowerLevel, the RSSI at 1 meter will be higher and you will need to increase the value of txPower sent in the packet to this new value for proper distance estimates. – davidgyoung Aug 07 '17 at 21:28