This article shows a quick method of communicating through Vesta-300B gateway to a mobile device using the gateway's BMD-300.
The BMD-300 within the Vesta-300B IoT Gateway from Rigado is loaded from the factory with the standard firmware, version AD, which contains the following components:
- Nordic Semiconductor SoftDevice S132, v3.1.0 - Bluetooth low energy communications stack
- Rigado RigDFU, v3.3.1 - secure, encrypted bootloader
- Rigado BMDware, v3.2.0 - BLE-UART bridge & beacon
In addition to the Vesta-300B gateway, you'll also need:
- A mobile device with the Rigado Toolbox app loaded. Rigado Toolbox can be found on iTunes for iOS and Google Play for Android.
- For Windows systems, you'll need a SSH client - PuTTY is a common SSH terminal. Linux and macOS systems already have a ssh client available through the terminal app.
Prepare the BMD-300 settings:
- Enable the UART within Rigado Toolbox. BMDware advertises as "RigCom" by default. When scanning BLE devices with Rigado Toolbox, select RigCom:
- Select the UART settings and enable the UART. Leave the baud rate, flow control and parity at the default settings:
- (Optional) If you have multiple gateways or other BMD-300s with BMDware, you may want to uniquely identify the advertising name of this BMD-300. Go to the Config settings, then select Advertising Name. In the following screen, enter a new name. This one will be called "gw-bmd-1". Click "Send" at the upper right when done.
- In order to save these settings (UART parameters and advertising name if set), you need to terminate the BLE connection. Tap "Scan" at the upper left. You should now see RigCom again (or the new advertising name if set):
- You may want to lengthen the sleep timeout on your mobile device. Rigado Toolbox will disconnect from the BMD-300 when the mobile device enters sleep mode.
Now we're ready to establish communication from the Rigado Toolbox terminal to a SSH session. Within the session, we'll use an application that's part of the Yocto Linux distribution called "microcom". This application activates the serial UART path between the iMX6 and the BMD-300.
- Log into the gateway with SSH.
- Run "microcom". We need to tell microcom the baud rate and which port to use.
/usr/bin/microcom -s 57600 /dev/ttymxc2
- Connect to the BMD-300 with Rigado Toolbox. This example uses the new advertising name:
- Activate the terminal
- Now, any data typed within Rigado Toolbox terminal will appear in the SSH session and any data typed in the SSH session will appear in the Rigado Toolbox terminal. (Note: there is no local echo with microcom.)
- To terminate the serial connection, enter <Ctrl>+x in the SSH session and tap "Scan" in Rigado Toolbox.