The Marvin board provides a platform for IoT development. Take a first look at the development environment.
- [Instructor] The Marvin board is one of a number of development environments for IoT sensors and LoRa proximity network access. It consists of a processor board with micro USB and a serial port, as well as five sensor attachments and a LoRa modem. The LoRa antenna is built into the circuit board. Marvin's designed for R and D and workshop experimentation, as well as providing the LoRa connectivity for embedded solutions. It was created through a crowdfunding program, and the board can be purchased by following the links on this page.
The board is powered through the USB port when connected to the computer or can operate from a portable USB power pack. The Marvin is an Arduino Leonardo development and uses the Arduino Integrated Development Environment. This can be downloaded from the Arduino site shown here and is a standard Windows install. There's example code, as well as a substantial foundation of Arduino community software. The Marvin board sensor connectors are designed for the Grove range of sensors.
These are available at low cost from the Seeed Bazaar as shown here. There are sensors for light and temperature, motion and tilt, moisture and humidity, and many other purposes. The Marvin board has three analog connectors, one digital connector, and one I2C connector. Sensors will connect specifically to one of the types of connector ports. Let's look at how we interact with the Marvin from the Arduino IDE. There's a number of demonstration programs, which we can run through.
To use the Marvin, we connect it to the USB port. This presents on my system as COM3. I'll go to the Boards menu and select Arduino Leonardo as the board type. And I'll also set the port to COM3. The instructions for basic familiarization with Marvin are provided on the IoT Academy GitHub site. We'll work through these to exercise the board and get comfortable with its use. The first thing I'll do is open the Blinky.ino file, which I've downloaded from the IoT Academy site, and then use the Sketch menu in the Arduino IDE to upload it to Marvin.
I'll then go to the Serial Monitor where I can start to enter commands for the LoRa modem. Let's start by querying the firmware version of the LoRa chip. And we get RN2903 0.9.5 with a September 2015 build date. This indicates the Marvin is using the Microchip RN2903 Technology Module for LoRaWAN connectivity.
The RN2903 user reference manual can be downloaded from the Microchip site, as shown. All LoRaWAN devices have a 64-bit unique identifier, called the Extended Unique Identifier, or EUI, that is assigned to the device by the chip manufacturer. On the Marvin, we can issue the get hweui command to get the pre-programmed EUI placed in the chip by Microchip. The EUI value can be used to set the Device Extended Unique Identifier, which we can look at by the command mac get deveui.
As we can see, these are the same. However, all communication is done using the device address, which we can check using the command mac get devaddress. As you can see, this is not currently set. Setting this normally occurs during device activation onto a network. Another useful command when working programmatically with the Marvin is mac get status, which provides the status of the device.
Here bit five is set, which indicates that the adaptive rate mechanism is disabled. The full explanation of status bits is in the user manual. We can also query the radio frequency. And here we'll see the board will be signaling on 923.3 megahertz. That's the American and Australian LoRa frequency. Europe uses a LoRa chip operating around the 863 megahertz range. Let's now check out whether the device is transmitting properly.
I have a second Marvin board running on my computer, which I'll set up as a receiver. This Marvin is now in receive mode. On the original Marvin, I'll set the radio up as a transmitter and send a Hello Marvin message. Okay, back on the second Marvin, we can see that the transmission has been received and printed as the value 41424344 on the second Marvin comms panel.
The command expects data to be provided in hexadecimal format. So in character form, we sent a message that was ABCD. There's lots more we can do with this interface, but this will do for the moment as a basic introduction to the Marvin.
- Reviewing security issues and recent attacks
- Robot security concerns
- IoTSF Compliance Framework
- LoRa security
- Building security into IoT devices
- Moving to trusted execution environments
- Adding sensors and encryption to Marvin
- Generating packets with Paketeer
- The cURL tool
- Testing home IoT devices