Skip to main content

RAK5814 WisBlock Crypto Module Quick Start Guide

Prerequisite

What Do You Need?

Before going through each and every step of using the RAK5814 WisBlock module, make sure to prepare the necessary items listed below:

Hardware

Software

  • Download and install ArduinoIDE.
  • To add the RAKwireless Core boards on your Arduino board, install the RAKwireless Arduino BSP. Follow the steps in the GitHub repo.

Product Configuration

Hardware Setup

RAK5814 is a secure element cryptography chip based on Microchip ATECC608A. It was designed to provide hardware-based key storage as well as encryption/decryption to various electronic products and devices.

For more information about RAK5814, refer to the Datasheet.

RAK5814 module can be connected to the sensor's slot of WisBlock Base to communicate with the WisBlock Core, as shown in the figure below. It will work on SLOT A to F. Also, always secure the connection of the WisBlock module by using compatible screws.

Figure 5295: RAK5814 connection to WisBlock Base

Assembling and Disassembling of WisBlock Modules

Assembling

As shown in Figure 2, the locations for Slots A, B, C, and D are properly marked by silkscreen. Slots C and D are located on the bottom of the WisBlock Base. Follow carefully the procedure defined in WisBlock Base board assembly/disassembly instructions to attach a WisBlock module. Once attached, carefully fix the module with an M1.2 x 3 mm screw.

Figure 5296: RAK5814 connection to WisBlock Base

When using the RAK4631 board, connect the LoRa and BLE antennas to avoid damage to the board.

Figure 5297: LoRa and BLE antennas of RAK4631
Disassembling

The procedure in disassembling any type of WisBlock module is the same.

  1. First, remove the screws.
Figure 5298: Removing screws from the WisBlock module
  1. Once the screws are removed, check the silkscreen of the module to find the correct location where force can be applied.
Figure 5299: Detaching silkscreen on the WisBlock module
  1. Apply force to the module at the position of the connector, as shown in Figure 6, to detach the module from the baseboard.
Figure 5300: Applying even forces on the proper location of a WisBlock module
NOTE

If you will connect other modules to the remaining WisBlock Base slots, check on the WisBlock Pin Mapper tool for possible conflicts. RAK5814 uses I2C communication lines, and it can cause possible conflict, especially with the other WisBlock Modules connected to Slots A to F of the WisBlock Base.

After all this setup, you can now connect the battery (optional) and USB cable to start programming your WisBlock Core.

warning
  • Batteries can cause harm if not handled properly.
  • Only 3.7-4.2 V Rechargeable LiPo batteries are supported. It is highly recommended not to use other types of batteries with the system unless you know what you are doing.
  • If a non-rechargeable battery is used, it has to be unplugged first before connecting the USB cable to the USB port of the board to configure the device. Not doing so might damage the battery or cause a fire.
  • Only 5 V solar panels are supported. Do not use 12 V solar panels. It will destroy the charging unit and eventually other electronic parts.
  • Make sure the battery wires match the polarity on the WisBlock Base board. Not all batteries have the same wiring.

Software Configuration and Example

The RAK5814 design is based on ATECC608A from Microchip. The RAK5814 is a crypto module, part of the WisBlock Module Series. It was designed to be secured with hardware-based key storage. For this example, you will be using the RAK4631 as your WisBlock Core.

Initial Test of the RAK5814 WisBlock Module

  1. Install the RAKwireless Arduino BSP for WisBlock by using the package_rakwireless_index.json board installation package. The WisBlock Core should now be available on the Arduino IDE.
Figure 5301: Arduino IDE
Figure 5302: WisBlock Cores inside the Arduino IDE
  1. Then install the library of RAK5814 into your Arduino IDE.
Figure 5303: Managing the libraries in Arduino IDE
Figure 5304: RAK5814 Library
  1. Then open the sample code for RAK5814.
Figure 5305: Selecting the sample code for RAK5814
Figure 5306: Sample code for RAK5814
  1. Then select the RAK4631 board and its serial port, as shown in Figure 13 and Figure 14.

    RAK4631 Board

Figure 5307: Selecting RAK4631 board as the WisBlock Core
Figure 5308: Selecting the serial port of RAK4631 WisBlock Core
  1. Then upload the code as shown in Figure 15 and Figure 16.
Figure 5309: Uploading the RAK5814 sample code
Figure 5310: Uploading the RAK5814 sample code
NOTE

If you experience any error in compiling the example sketch, check the updated code for the RAK5814 WisBlock Crypto Module that can be found on the RAK5814 WisBlock Example Code Repository.

  1. When you successfully uploaded the sample code, open the Serial Monitor of the Arduino IDE to check for the ECC608A's serial number and do the configuration here as well.
Figure 5311: Sample code successfully uploaded to RAK4631
Figure 5312: Readings from the Serial Monitor