• ## BEACON

2019-10-24 16:22:14
BEACON
• ## Beacon

2019-05-05 11:15:00
1、Beacon技术指的是通过使用低功耗蓝牙技术（Bluetooth Low Energy，也就是Bluetooth 4.0或者Bluetooth Smart），Beacon基站便可以自动创建一个信号区域，当设备进入该区域时，相应的应用程序便会提示用户是否需要...

1、Beacon技术指的是通过使用低功耗蓝牙技术（Bluetooth Low Energy，也就是Bluetooth 4.0或者Bluetooth Smart），Beacon基站便可以自动创建一个信号区域，当设备进入该区域时，相应的应用程序便会提示用户是否需要接入这个信号网络。通过能够放置在任何物体中的小型无线传感器和低功耗蓝牙技术，用户便能使用智能设备来传输数据。
2、Beacon 设备本身只向外发射信号，无法向手机推送消息，也无法接收消息。既然 Beacon 设备无法推送消息，那前面说的推送消息是如何实现的呢？这就得靠安装在手机上的 APP 了。比如有个顾客安装了商场的 APP，商家在数码专柜的角落部署了一个 Beacon，当顾客靠近数码专柜时， APP 在后台检测到你距离数码专柜不到 5 米，这时 APP 发起一个通知，你点开后弹出了最新的数码产品介绍和优惠信息。检测与 Beacon 之间的距离，并发起通知，全都由 APP 本身控制。
3、SkyBeacon是由SKYLAB研发团队针对SKYLAB Beacon设备进行配置的一款手机应用。使用这款手机应用就能把手机和“SKYLAB Beacon”进行连接并且进行参数修改，如：UUID, Major, Minor, Beacon名称等。 这些参数在广播模式开启后会进行广播信息，因此被大型商场用作商品促销！
4、作为Beacon设备放在室内的某个固定位置，被设置成广播模式，上电后即进行广播，不能和任何低功耗蓝牙主机进行连接。
5、蓝牙beacon比较常见的应用是一下几个方面：
（1）信息推送（商场、景区、博物馆）
（2）蓝牙beacon室内导航（会展、图书馆、博物馆、酒店、机场、校园、医院、监狱、商业CBD）
（3）beacon和微信摇一摇结合，可以开展新的营销和互动方式，比如摇关注、摇签到、摇投票、摇导航、摇互动

转载于:https://www.cnblogs.com/yeshenmeng/p/10811953.html
展开全文
• 一款可以模拟BLE蓝牙的beacon信号的APP。 Beacon Simulator This app transforms your Android device into a virtual BLE beacon advertiser and transmitter. You can create your own collection of beacon ...
• Android使用android-beacon-library接收beacon
• beacon-web The "Beacon Standard Edition" distribution Beacon 介绍 这是一个PHP快速开发框架,轻量级简单高效安全的 CMF 框架。 文档会在有空的时间陆续更新.... 加星是我的动力。 如果有问题可以 issues 我。 ...
• 这是Android开发Beacon应用的一个例子，使用的是android-beacon-library第三方库
• 蓝牙beacon是低功耗蓝牙的一种，只能广播信息（发送信息），不能接收信息。 而且蓝牙beacon是成品。 蓝牙beacon，一般用于定位，广播信息等。 由蓝牙beacon发射信号，移动设备定位接收，反馈信号。 ...
蓝牙beacon是低功耗蓝牙的一种，只能广播信息（发送信息），不能接收信息。
而且蓝牙beacon是成品。
蓝牙beacon，一般用于定位，广播信息等。
由蓝牙beacon发射信号，移动设备定位接收，反馈信号。


展开全文
• The nRF Beacon application lets you explore the full range of possibilities for beacons using Bluetooth Smart technology. The application has been designed to demonstrate all features of the nRF8122 ...
• ## nRF Beacon Service

热门讨论 2014-11-17 21:13:49
nRF Beacon Service，nRF Beacon开发必备！
• 在Android平台上，基于库AltBeacon的Beacon开发demo
• 这是“购物”文件（IJCAI'19）中的Beacon复制项目。 输入格式：训练/验证/测试集具有相同的格式 对于每个购物篮序列，购物篮{b_i}以'|'分隔，例如b_1 | b_2 | b_3 | ... | b_n 对于每个购物篮b_i，项目{v_j}之间用...
• Minecraft mod“Beacon”的源代码。 什么是信标？ ： Beacon 是我制作的一个小型新模组。 它会自动下载您缺少的任何必需模组，以加入您保存在“服务器”列表中的模组服务器。 您可以下载加入您保存的每台服务器所...
• 1.什么是Beacon Apple在2013年9月发布移动设备时，宣布在自己的移动设备上配iBeacon的新功能，近期将推出自己的beacon硬件设备。 这种技术能够实现室内定位，让你的手机能够知道是否处于一个beacon的范围内。使用...
1.什么是Beacon
Apple在2013年9月发布移动设备时，宣布在自己的移动设备上配iBeacon的新功能，近期将推出自己的beacon硬件设备。这种技术能够实现室内定位，让你的手机能够知道是否处于一个beacon的范围内。使用这种技术能够产生很多应用程序：比如帮助你在停车场找到你的汽车，或者在零售店中根据所处位置提供优惠券或者其它一些位置相关的服务。还有很多我们现在无法想象得到的应用程序
2.Beacon数据格式
2.1 Eddystone Beacon

2.2 Apple Beacon
Apple修正iBeacon的数据格式

如下：苹果iBeacon

iBeacon prefix (fixed)： 02 01 06 1A FF 4C 00 02 15

proximity UUID:B9 40 7F 30 F5 F8 46 6E AF F9 25 55 6B 57 FE 6D

major:00 49

minor:00 0A

complement of measured TX power:C5

3.Beacon详解
proximity UUID

这是将你所有的beacon与其他人的beacon设备区别开的id！例如，目前在 商店里某个区域分布着多个beacon形成一条“链带”，用于为顾客提供特定 的服务，那么归属于同一条“链带”的beacon将分配到相同的proximity UUID。为这条“链带”设计的专用应用程序将会在后台使用这个UUID扫描 到这条“链带”中的beacon设备

major

用于将相关的beacon标识为一组。例如，一个商店中的所有beacon将会分 配到相同的major编号。通过这种方式，应用程序就能够知道顾客位于哪一 家商店

minor

用于标识特定的beacon设备。例如一个商店中的每一个beacon设备都拥有 唯一的minor编号，这样你才能够知道顾客位于商店中的哪个位置。

TxPower

用于确定你和beacon之间距离有多近。根据这个值不但可以获得粗略的信息

TxPower

用于确定你和beacon之间距离有多近。根据这个值不但可以获得粗略的信息 （比如靠近/远离/不在范围内等），也可以获取精确到米的距离

展开全文
• Beacon-Doc
• 只需单击一次即可从Beacon（digitalbeacon.co）生成报告 Digital Beacon是一种在线工具，可以计算网站对环境的影响。 查看其影响的细分，并了解可以采取哪些措施来改善它。 该扩展程序会自动运行您通过digitalbeacon...
• android下beacon 开发示例程序
• Random Beacon Chain Status: retired Authors: Raul Jordan, Terence Tsao, Yutaro Mori, Preston Van Loon, Nishant Das Prysmatic Labs Last Updated: July 10, 2018 OUTDATED: See v2.1 design Background ...
Random Beacon Chain
Status: retired
Authors: Raul Jordan, Terence Tsao, Yutaro Mori, Preston Van Loon, Nishant Das
Prysmatic Labs
Last Updated: July 10, 2018 OUTDATED: See v2.1 design
Background
This is a design doc for implementation of the most basic iteration of a random beacon chain with its relevant actors. This doc will also analyze options for developing this system as a fresh repository (no dependencies on geth) and the best way to do so with our current code.
Goals
The most important goal is to design and implement a minimal random beacon chain and merge aspects of our current work into a new, functioning system that we can use for demonstration purposes. The other goals of this design will be to:
● Figure out the responsibilities of actors in the Random Beacon Chain architecture
● Determine what basic components we need for an MVP and which ones we can push out until later

This write up documents the design of beacon chain API. We will place the API in beacon-chain repo to replace SMC in geth-sharding with no-ops corresponding to an interface for beacon chain. By following the latest beacon chain spec, the main differences are shuffling method, advancing block, transitioning state and configuration options will be different.

What is included in the Ruby Release
● Rewards and penalties
● Processing PoW chain transactions
● Dynasty transition
○ In the spec includes changing of the validator set
● Simple source of randomness in the Ruby release

What’s not included in Ruby release?
● Processing shard chain collations
○ Simply attesters, proposers, but no notaries signing off on cross-links
● Check signature with BLS
Design
Shuffling Validators (Note: Changed by Latest Research)
The following algorithm shuffles the active validator set. The proposer and attesters for each block are determined by shuffling the validator set with active_state.randao as the seed.

1. Loop through all the validator position
2. Get a random 32 bytes seed
3. For every 3 bytes in 32 bytes seed, convert 3 bytes to int
4. Replace the current validator index with the index using converted int

while not_all_validator_positions_shuffled: source = get_pseudorandom_32_bytes(source) for every_three_bytes in source: m = convert_three_bytes_to_int(current_three_bytes) remaining = the_number_of_validators_left_to_shuffle if none_remaining: break replacement_pos = get_replacement_position_for_i(m, i) swap(i, replacement_pos) go_to_next_position() # i += 1

For our first release, a simple source of randomness derived from blockhashes may be enough.
Shuffling Notaries
Note: May not be included in Ruby release, but included here for completeness

The shards to crosslink are determined by selecting the first N shards that have been crosslinked least recently, where N is based on how many validators are available.

def get_crosslink_shards(crystallized_state): start_from = crystallized_state.next_shard count = len(crystallized_state.active_validators) // NOTARIES_PER_CROSSLINK if start_from + count <= SHARD_COUNT: return list(range(start_from, start_from + count)) else: return list(range(start_from, SHARD_COUNT)) + list(range(start_from + count - SHARD_COUNT))
Notary assignment for each shard is shuffled every dynasty transition by resetting crystallized_state.crosslink_seed (see Advancing Beacon Chain Blocks).

State is split into active_state and crystallized_state. active_state transitions occur every block and records validator votes. crystallized_state transitions occur every 100 blocks and handles shard crosslinking, justified and finalized blocks (Casper FFG), and updates to the validator set. However, the validator set is updated only when all shards have been crosslinked (Dynasty Transition).
Per-block Transition
● Update active_state.randao with randao_reveal
● Update active_state.ffg_voter_bitfield with:
○ The proposer that signed the block
○ The attesters from attestation_bitfield
○ Notaries that voted in shard_aggregate_vote
● Update recent_attesters with the attesters that voted for this block ● Update active_state.partial_crosslinks (full spec)
● Update active_state.recent_proposers with the proposer’s randao_reveal
● Increment active_state.total_skip_count by skip_count
● Increment active_state.height by 1
Epoch Transition
Every 100 blocks do the following:
● If ⅔ of all validators voted, crystallized_state.justified_epoch = crystallized_state.current_epoch
● If two consecutive checkpoints are justified, crystallized_state.finalized_epoch = crystallized_state.current_epoch
● Increment crystallized_state.current_epoch by 1

Note: Deposit balance changes are out of scope because the rules are undefined and transactions aren’t processed in

Note: Crosslink seed-related calculations are out of scope because handling shards that are slow to crosslink is non-critical.
Dynasty Transition
Occurs during:
● An epoch transition (once every 100 blocks)
● When all shards have been crosslinked since the last dynasty transition

● crystallized_state.dynasty += 1
● Update the active, queued, and exited validators. Updating exited validator’s balance is out of this scope.
Fork Choice Rule for Beacon Chain
In addition to the Casper FFG fork choice rule to follow the chain containing the justified checkpoint of the great height, because the PoW chain is a side chain, an additional requirement is that main_chain_ref is inside the highest scoring PoW chain and that it is a descendent of the parent block’s main_chain_ref.

The head can be updated with the following algorithm:
def update_head(chain, old_head, new_head): a, b = old_head, new_head while a.height > b.height: a = get_parent(a) while b.height > a.height: b = get_parent(b) while a != b: a, b = get_parent(a), get_parent(b) b = new_head new_chain = [] while b.height > a.height: new_chain = [b] + new_chain b = get_parent(b) chain = chain[:a.height + 1] + new_chain
In the event of a reorg in the PoW chain, the beacon chain must be reorged with the following:
def reorg_beacon_chain(main_chain, beacon_chain): old_head = beacon_chain[-1]
while beacon_chain[-1].main_chain_ref not in main_chain: beacon_chain.pop() queue = [beacon_chain[-1]] new_head = beacon_chain[-1] while len(queue) > 0: b = queue.pop(0) for c in get_children(b): if c.main_chain_ref in main_chain: if get_score(c) > get_score(new_head): new_head = c queue.append(c) update_head(beacon_chain, old_head, new_head)
Beacon Chain P2P
Shard p2p has to accommodate quick reshuffling across shards that live in different networks and has to incorporate different subprotocols for sharding. We can treat the beacon chain nodes as their own network (perhaps shard -1) and use the same floodsub mechanism.

The steps required are the same as before for shardp2p:
● Use gossipsub for rapidly switching across shard networks
● Define shard subprotocols ● Torus-shaped shard discovery protocol: see ETHResearch
Beacon Node Sync
There are two steps required for beacon node sync
1. Initial chain sync via p2p which will fetch the latest block number from the network and connect to other beacon node peers that will provide the history of the beacon chain
2. After head is reached, the sync to listen for new blocks being posted from the network begins
Actors in the Random Beacon Chain
Beacon Chain Node
● A beacon chain node is responsible for running the entire beacon chain system, listening for main chain block checkpoints via an RPC connection to a running Geth node, downloading the beacon chain history, and advancing the canonical chain via Casper PoS.
● Key Functions
○ Initializing a node with service lifecycle management
○ Opening an RPC connection to a remote Geth node
○ Sync the entire beacon chain history
○ Store and maintain the set of active, queued and exited validators
○ Process its own block-by-block consensus, as well as the FFG finality gadget
■ “For a block on the beacon chain to be processed by a node, three conditions have to be met:
■ The parent pointed to by the parent_hash has already been processed and accepted
■ The main chain block pointed to by the main_chain_ref has already been processed and accepted
■ The node’s local clock time is greater than or equal to the minimum timestamp as computed by GENESIS_TIME + height * PER_HEIGHT_DELAY + total_skips * PER_SKIP_DELAY
■ If these three conditions are not met, the client should delay processing the block until the three conditions are all satisfied.”
Proposers
● Proposers are responsible for signing a block and broadcasting it for the attestation committee to validate.
● Blocks include a pre-image of the proposer’s randao commitment.
● Blocks include notary signatures for shards selected during that epoch.
● Blocks include a hash of the longest PoW chain in main_chain_ref
● If a proposer fails to produce a valid block within PER_HEIGHT_DELAY, the next proposer may produce a block instead.
● The next proposer is eligible if their local time is greater than minimum_timestamp(head) + PER_HEIGHT_DELAY + skip_count * PER_SKIP_DELAY where skip_count is the number of proposers that were skipped over.
● Proposers are shuffled every block.
Notaries - Phase 1
● If assigned to a shard, notaries sign a block hash for that shard.
● If ⅔ of notaries sign a block hash, that block gets crosslinked into the random beacon chain.
● Currently, notaries per crosslink is set to 1024.
● Only a subset of shards are selected for crosslink every epoch, depending on the number of available validators.
● Notaries are shuffled once every dynasty.
Attesters
● Attesters are responsible for validating and signing blocks signed by a producer
● Blocks are valid if N/(2 + skip_count) attesters sign a block, where N is the size of the attestation committee.
● Attesters are shuffled every block.
Potential Scope Changes for Ruby Release
The following are requirements that could be removed to adjust the scope:

● Left out shards, just focus on beacon chain, in that case there’s no notary, just proposer and attesters. Don’t have to worry about shard linking, shard fork choice rules.
● Shard linking can be left out entirely. In this scenario notaries aren’t selected and PartialCrossLinkRecord and CrossLinkRecord are always nil.
● If Shard linking is left out, dynasty transitions can also be removed. In this scenario the validator set never changes from the initial genesis block.
● BLS signature verification can be left out. In this scenario the aggregate signature verification functions for attesters and notaries are noops that always return true.
● We can remove PoW fork choice rules and assume that the main_chain_ref is always inside the highest scoring PoW chain. In this scenario the fork choice rule simply becomes the justified checkpoint of the greatest height. Removing this requirement also allows us to not worry about a RBC reorg in the event of a PoW chain reorg.
● We can replace active_state.randao with a pseudo-random hash. In this scenario we would be able to remove the construction of the hash onion and verification of the proposer’s randao commitment. We can just use blockhashes for this.
Project Structure

Yutaro: The RBC should be a data structure that can not actively modify its own state. For example, instead of actively updating the validator set by polling the PoW chain via a JSON RPC, the proposer should update the RBC’s validator set via its own JSON RPC. This also means that the RBC should avoid having its own external dependencies (JSON RPC, p2p networking logic). Instead, those responsibilities should be handled by other processes. The main reason I’m arguing for this approach is that I envision state management to be handled in multiple ways, and I’d like to be able to separate the data structure from those responsibilities. Here are different ways the RBC’s state can advance:

● Initial sync via p2p
● New block post-sync via p2p
● Client is a validator that produces a new block
● Test setup via a static file
● Upon each change, persist to disk

The best way to implement these different scenarios is to separate “chain management” from “chain state”. This approach introduces another actor, “p2pSync”, that is responsible for updating the state via our p2p protocol during initial and post-initial sync. The main downside of this approach is that it introduces concurrency issues where p2pSync may write at the same time that the client updates a new block. This could be handled fairly easily by locking the RBC when updating its state. Because chain state updates happen infrequently, lock contention should not be an issue.

Another benefit to having a simple RBC is that integrated tests will be easier to setup without any external dependencies to mock or any unexpected state management to stub out.
Work Estimates
Needs Design
● Fork Choice Rule, Reorg
● BLS Signature Inclusion
● P2P where a validator can have multiple responsibilities
● Block transitions
● Rewards/Penalties (Slashing Conditions)

The following structure could be a good path forward to begin on a minimal implementation
● Setup a service registry in a similar way as we did in geth-sharding for the beacon-chain repo
● Open a JSON-RPC connection to an endpoint and listen for the latest block number, blockhash
● Have the beacon chain node listen for this event happening on the main chain, trigger a queueValidator func once the tx is mined on the main chain (listen for logs from the validator registration contract)
● Pass in the address of the validator registration contract as an arg to the beacon chain
● Beacon chain to access the private key of the validator that registered the eth in the PoW chain
● The beacon chain becomes a data structure (state machine) that is updated by external services
● Node has to sync with the canonical beacon chain (sync from the last finalized epoch)
○ Node has to run the block processing service
● Beacon node needs to sample proposer/attester responsibilities using blockhash for randomness
● Proposer running the node has to begin producing blocks via PoS
Has to apply fork choice rule
○ Compute block and epoch state transitions
● Node has to participate in a global RANDAO mechanism to select committees at respective times (Mega Issue, will have to be split into many parts)
● Logic for randao reveal from validator hash preimage
● Logic for beacon chain fork choice - design this and also reorgs
● Some web3 methods to include get_score
A New System Without Geth Moved to another doc
References ● Casper + Sharding v2
展开全文
• @这是一个使用I-Beacon将室内位置数据发送到服务器的程序。 定期检查与信标的连接后，您可以通过最近的信标ID知道用户的室内位置。 Android设备ID一起传送到服务器，因此不会重复多个用户的位置数据。 还有一个添加...
• 本文将介绍如何用Beacon点亮创新应用
• redux-beacon-松弛 Slack传入Webhook目标。 这是一项针对某个特定项目的正在进行中的早期工作，但希望随着PR的发展，它会随着时间的推移而增长。 下面有一个待办事项清单。 ## Motivation Redux信标侦听Redux动作...
• 本文介绍的是如何用Beacon点亮创新应用
• beacon:学习笔记
• kontakt-beacon-admin-sample-app 演示kontakt.io的Android SDK功能的示例应用程序。 该应用程序包括： 信标范围广， 信标监控， 信标管理 kontakt.io的API客户端用法。 有关更多信息，请参见： : #beacon_...
• android-beacon-libary的使用android-beacon-libary的使用android-beacon-libary的使用android-beacon-libary的使用android-beacon-libary的使用android-beacon-libary的使用android-beacon-libary的使用android-...
• <div><p>Beacon's are a pretty simple API implementation designed by the Global Alliance 4 Genomics & Health. Basically you can ask for a given chromosome + position on whether a given ...
• ArduPilot中beacon ctime:2019-03-13 14:45:31 +0800|1552459531 标签（空格分隔）： 技术 飞控 初始化过程： 在主文件中的init_ardupilot函数中进行各种传感器、串口、外设的初始化。 init_beacon初始化beacon设备...
• Beacon moving location algorithm in WSN
• 一、Beacon简介　 　Beacon是基于BLE技术实现的物理设备。BLE（全称Bluetooth Low Energy）是蓝牙4.0技术规范的一部分。它起源于Nokia的Wibree技术，但最终被整合进了蓝牙。这是一组与传统蓝牙不同的协议，被称之为...

...