Getting Started with ZentriOS BLE
ZentriOS-S provides a wireless link between your device(s) and/or a PC or mobile device.
ZentriOS-S connects to other ZentriOS-S modules and to the Zentri BLE mobile apps.
A Wahoo evaluation board boots up with advertising turned on, and is discoverable by another Wahoo board or by the Zentri BLE Commander App, available free from the Google Play Store or Apple store.
Opening a ZentriOS Terminal
You can connect a computer to your ZentriOS device via USB and issue commands via a serial terminal.
- If you are using a Wahoo board, ensure that the power and UART selection switches are configured correctly - power switch: REG; UART switch: USER.
- Connect the ZentriOS device to a USB port on your computer. The USB interface provides power and a serial UART connection to the ZentriOS.
- Open a communication terminal application e.g. Teraterm.
- Find the UART serial (COM) port associated with the board.
- Set the communication parameters to 115200 8N1 with NO hardware flow control. See Serial Interface, UART Protocol.
- Press
Enter
. The terminal window displays aReady
prompt.Ready
- You can now issue commands. For example, issue the ZentriOS-S command
ver
to see the loaded product and version. For example:> ver ZENTRI-AMS002-3.0.0.23, 2016-12-07T12:37:29Z, ZentriOS-S-3.0.0.23, Module:AMS002.5, Board:N/A >
Using Zentri BLE Commander and Zentri Streaming Service
With the Zentri BLE Commander you can connect to a device running any ZentriOS-S product supporting the Zentri Streaming Service.
Install Zentri BLE Commander on your mobile device.
Power up the ZentriOS-S device.
Follow the procedure Opening a ZentriOS Terminal for the ZentriOS-S device.
Run the Commander app on your mobile device. The Commander scans and detects available ZentriOS-S devices.
Select your ZentriOS-S device.
The Commander connects to the ZentriOS-S device.
The Commander defaults to stream mode.
Type characters into the Commander text entry box and press SEND
. The characters are streamed to the ZentriOS terminal window for your device.
Type characters into the ZentriOS terminal window for the device. The characters appear in the Commander text window.
Note that in the above ZentriOS terminal example, local echo is not turned on, so the text typed in the terminal, Sent from ZentriOS device
, does not appear on the terminal display.
Press the COMMAND
button to switch to command mode.
Enter a ZentriOS command (e.g ver
) in the Commander text box window and press SEND
. The Commander displays the response from the device in its text window.
Streaming Data Between Two Wahoo Boards
With the ZentriOS-S ZENTRI-DUAL product (or with the superseded ZENTRI-TRUCONNECT product), you can connect two Wahoo evaluation boards and stream data between them via Bluetooth Low Energy.
Let's get started! Work through the following sections in order.
Follow the procedure Opening a ZentriOS Terminal, above, for each board.
Switching to Command Mode
- The Wahoo boards boot up as BLE peripherals with advertising turned on, in Stream Mode.
- Note that after a few minutes advertising turns off. See the adv command to turn advertising on if necessary.
- See Serial Interface for a discussion of stream mode and command mode.
- We'll refer to the Wahoo boards as WahooA and WahooB:
- On WahooA, press Button 2 to switch to command mode. The terminal displays
COMMAND_MODE
. - On the WahooA terminal:
- Press the Enter key and wait for a command prompt
>
andReady
- Press the Enter key and wait for a command prompt
Scanning and Connecting
- Enter the command scan high. Within a few seconds, ZentriOS BLE displays a list of Zentri BLE devices discovered.
> scan high
! # RSSI BD_ADDR Device Name
# 1 -89 4C:55:CC:10:07:e1 AMS-07E1
- Enter the command con
, where <index>
is the#
number corresponding to the device in the devices listed by the scan results.
> con 1
Success
- On both boards, the tri-colour LED lights continuously green when the boards are connected.
Switching to Stream Mode and Sending and Receiving Data
- Now, on WahooA, either press Button 2 (or enter the
str
stream command into the Wahoo A terminal) to switch WahooA to Stream Mode. The terminal displaysSTREAM_MODE
. - With both Wahoo boards in Stream Mode, characters you type on one terminal appear on the other terminal, transmitted from one board to the other wirelessly via the BLE connection.