Skip to content

This application demonstrates the RNBD451 remote command feature. This feature allows the control of an RNBD451 module without the use of a host microcontroller remotely from either another RNBD451 module or a mobile application. This example demonstrates on how to configure RNBD451 in Host-less mode and create a wireless alarm application.​

Notifications You must be signed in to change notification settings

MicrochipTech/RNBD451_REMOTE_COMMAND_MODE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RNBD451 REMOTE COMMAND MODE

"IoT Made Easy!"

Devices: | RNBD451 | SAMD21 |
Features: | BLE |

⚠ Disclaimer

THE SOFTWARE ARE PROVIDED "AS IS" AND GIVE A PATH FOR SELF-SUPPORT AND SELF-MAINTENANCE. This repository contains example code intended to help accelerate client product development.

For additional Microchip repos, see: https://github.com/Microchip-MPLAB-Harmony

Checkout the Technical support portal to access our knowledge base, community forums or submit support ticket requests.

Contents

  1. Introduction
  2. Bill of materials
  3. Software Setup
  4. Hardware Setup
  5. Harmony MCC Configuration
  6. Board Programming
  7. Run the demo

1. Introduction

This application demonstrates the RNBD451 remote command feature. This feature allows the control of an RNBD451 module without the use of a host microcontroller remotely from either another RNBD451 module or a mobile application. The remote command feature works by using a special BLE GATT service that emulates a wireless serial connection called transparent UART mode. This combined with a unique command set allows remote functionality of the module. Two RNBD451 modules will be used for implementing the Remote command feature. One will be called the controller device and the other will be Remote/Host-less Module. The controller Module is connected to a host MCU device and is in control of the Remote Module. The Remote Module is host-less configured to connect to the controller module.

This example demonstrates on how to configure RNBD451 in Host-less mode and create a wireless alarm application. This application uses SAMD21 Curiosity Nano board as the host for the controller Device. On initialization the controller will establish a connection with the remote module and will be in Remote Command mode of the RNBD451 Remote/host-less Module. Once there is Motion detected on Host MCU the LED connected to the remote module will be toggled.

2. Bill of materials

TOOLS QUANTITY
RNBD451 Add On Board 2
CURIOSITY NANO BASE FOR CLICK BOARDS 1
MOTION 4 Click Board 1
SAM D21 CURIOSITY NANO EVALUATION KIT 1
RGB LED 1

3. Software Setup

4. Hardware Setup

  • Connect the SAMD21 Curiosity Nano board to the Curiosity nano base board. In the Mikro bus click 1 Socket connect the RNBD451 Add on board. Make sure the Power select jumper is placed for Mikro bus.
  • In the RNBD451 Add on Board, the gpio pins are not brought out. For this application, the GPIO pin PA0 in the Remote module is connected to an NC pin on the Mikro Bus header.

5. Harmony MCC Configuration

Getting started with Proximity Reporter application in WBZ451 Curiosity board

Tip New users of MPLAB Code Configurator are recommended to go through the overview

Step 1 - Connect the SAMD21 Curiosity Nano board setup to the device/system using a micro-USB cable.

Step 2 - Create a new MCC Harmony project.

Step 3 - The "MCC - Harmony Project Graph" below depicts the harmony components utilized in this project.

  • From Device resources, go to Wireless->Drivers->BLE and select RNBD. Accept Dependencies or satisfiers, select "Yes". Right click on the "⬦" and add SERCOM5. The configuration is depicted as follows.

  • Select SERCOM5 and configure as depicted below.

  • From Device resources, go to Library->Harmony->Peripherals->SERCOM and selct SERCOM0. Right click on the "⬦" on UART and select STDIO. The configuration is depicted as follows.

  • From Device resources, go to Library->Harmony->Peripherals->EIC and selct EIC. The configuration is depicted as follows.

  • From project graph, go to Plugins->PIN configuration and configure as follows.

Step 4 - Generate the code.

Step 5 - Copy the mentioned files from this repository by navigating to the location mentioned below and paste it your project folder.

Note This application repository should be cloned/downloaded to perform the following steps.
Path firmware/src
  • Copy the "rnbd" folder, and "main.c" which can be found by navigating to the following path: "...\firmware\src"
  • Paste the folder under source files in your project folder (...\firmware\src).

Step 6 - Clean and build the project. To run the project, select "Make and program device" button.

6. Board Programming

Program the precompiled hex file using MPLAB X IPE

  • The application hex file can be found in the hex folder.

  • Follow the steps provided in the link to program the precompiled hex file using MPLABX IPE to program the pre-compiled hex image.

Build and program the application using MPLAB X IDE

Follow the steps provided in the link to Build and program the application.

7. Run the demo

To configure the RNBD Remote module

  • Power the RNBD451 Add-on board via external supply and place the Power select Jumper accordingly.
  • Connect RNBD Add-on board to your Mobile phone using a C type cable.
  • Follow the below steps to configure the remote module

Step 1 – Enter command mode

  • Input Command: $$$

  • Expected response:CMD>

Step 2 – Set to Factory defaults

  • Input Command:SF,1

  • Expected response: Reboot after Factory Reset

  • %REBOOT%

Step 3 – Enter command mode

  • Input Command: $$$

  • Expected response: CMD>

Step 4 – Set name of module to "Remote"

  • Input Command:SN,Remote

  • Expected response : AOK

  • CMD>

Step 5 – Enable device information and transparent and UART operation

  • Input Command: SS,C0

  • Expected response : AOK

  • CMD>

Step 6 – Enable authentication/security

  • Input Command:SA,2,

  • Expected response: AOK

  • CMD>

Step 7 – Set 4 digit PIN code

  • Input Command:SP,1234

  • Expected response: AOK

  • CMD>

Step 8 – Save and reboot

  • Input Command:R,1

  • Expected response: Rebooting

  • %REBOOT%

To configure the RNBD controller device

  • Once the Remote module is configured, Connect the SAMD21 Curiosity Nano setup.
  • Enter "D" command on the remote module to get the MAC ID of the Remote command.
  • Enter this Mac ID in "main.c" in line42 and program the SAMD21 Curiosity Nano setup. After it initialises and enters into RMT mode(Remote command Mode) and a motion is detected the LED connected to the Remote module is toggled.

About

This application demonstrates the RNBD451 remote command feature. This feature allows the control of an RNBD451 module without the use of a host microcontroller remotely from either another RNBD451 module or a mobile application. This example demonstrates on how to configure RNBD451 in Host-less mode and create a wireless alarm application.​

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published