Name: ANT-Shared-Channel-Demo
Owner: Nordic Semiconductor Playground
Description: A demo of the ANT Shared Channel sample from SDK 7.2.
Created: 2015-01-29 11:20:45.0
Updated: 2017-02-17 12:12:40.0
Pushed: 2017-11-03 10:01:45.0
Homepage: null
Size: 1538
Language: Objective-C
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The ANT Shared Channel Demo application demonstrates the capabilities of the experimental ANT Auto Shared Channels example from Nordic Semiconductor's nRF51 SDK 7.2+.
The demo application is compatible with all iDevices with iOS 8.0+. Additionally, at least four boards are required to utilize all features of the reference design: two for hubs and two (or more) for nodes. See the SDK documentation at http://developer.nordicsemi.com/nRF51_SDK/doc/7.2.0/s310/html/a00042.html for more information about the firmware.
Users can send custom messages to the hub. The following tables show the syntax of the command packet.
Byte | Description —–|——————— 0 | Op Code (always 0) 1 | Command:
| 00 - Disable reporting
| 01 - Enable reporting
| 02 - Not supported
| 03 - Node ON
| 04 - Node OFF
| 05 - Assign to group
2 | Shared address of the peripheral to which the command is addressed (1-253) 3 | Group (0-15) 4-5 | Device number of the hub to which the command is sent (little endian) 6-7 | Not used, 0s
Byte | Description —–|——————– 0 | Op Code (always 0) 1 | Command:
| 06 - Group ON
| 07 - Group OFF
2 | Group (0-15) 3-4 | Device number of the hub to which the command is sent (little endian)* 5-7 | Not used, 0s * - 0 = all nodes or all hubs
For example:
When reports are enabled on a hub (default), the hub will periodically send update notifications to the connected Bluetooth Smart controller. Each notification contains the status of one of the nodes in the network, its shared channel address, and the ID of its master hub.
Byte | Description —–|——————— 0 | Op Code (always 3) 1 | Shared address of the node from which the update is coming 2 | Node state (0 - OFF, 1 - ON) 3-4 | Device number of the node's master hub (little endian)*
The controller sends update packets periodically, even when the node state has not changed. It takes several seconds until the updated state of a node is reported to the controller. Hubs do not send new report packets about nodes that have been disconnected, but it might happen that one or more packets have been queued on one of the hubs.
![Hub and two nodes connected](/img/1 hub.png) ![Two hubs connected](/img/2 hubs.png)