Hi, this is Simon with IQRF.
In this video I will introduce you the IQRF IoT Starter Kit
and show step-by-step how to build an IQRF network using this kit.
The purpose of the IoT Starter Kit is to enable you to build your complete IoT solution
from sensors and actuators, through a GW up to different clouds and mobile apps
just in a matter of couple of hours. Afterwards you will be able to extend your network
with ready IQRF interoperable devices and use your solution for proof-of-concept projects.
So, let's start.
In the IoT Starter Kit box you will find an UP-board with a power supply that will be used as an IQRF GW
and two small boxes containing IQRF technology components. The first step is to build your IQRF network
so we will put the UP-board aside for now.
Inside the IQRF boxes, you will find a CK-USB programmer - the gray box,
plus three evaluation kits for powering wireless transceivers.
Then there is a DDC-SE extension kit with three sensors - the Dallas thermometer,
the light sensor and the potentiometer. There are 4 IQRF transceivers for creating a basic IQRF network.
If you haven't done it yet, download the startup-package from iqrf.org and install the last version of the IQRF IDE.
In the startup package in the Examples / DPA / IoT-Starter-Kit-01 folder,
you will find the IoT-StarterKit-01-demo file. You click on it and the IQRF IDE with all necessary files will be launched.
Connect the CK-USB programmer to your computer and insert the first transceiver.
On the left hand side you click on the configuration. Don't change the selected channel 52,
because all devices you will connect to the network later on will have the default channel 52 as well.
On the DPA bookmark allow usage of a Custom DPA Handler
because you will upload one into the transceiver as one of the next steps.
On the Security bookmark, you can set your access password. Don't forget that the same access password
must be configured in all devices in your network including coordinator.
The user key is for optional payload data encryption, but this is something
we will not use now. Save the configuration and close it.
Next, select the Node plugin so the transceiver supports the DPA protocol and features.
Custom DPA Handler is used to customize behavior of a transceiver. In the DDC-SE-01 Custom DPA Handler c file
you will find the source code that is written according to the IQRF Interoperability standard.
To compile the source code, click on the Build button or push F10.
Make sure you have all three files selected - the HEX file of the DDC-SE-01 Custom DPA handler,
the Node hardware profile and the configuration. Upload the selected files using Upload button or by pushing F5.
Now remove the connected transceiver and place it next to the Sensor kit. For safe replacement of transceivers press
the Reset button on your programmer or on your evaluation board.
Insert second transceiver. Keep the same configuration and the same hardware profile. Compile the Binary
output Custom DPA Handler designed to control the relay kit and upload these three files to the second transceiver.
Then replace this second transceiver with the third one. This transceiver will work only
as a router so it won't contain any Custom DPA Handler. Uncheck the Custom DPA Handler
check box in the Configuration window. Don't change any other parameters here.
Upload the configuration and the Node hardware profile to the transceiver.
Do not upload any HEX file here. Now remove the third transceiver and insert
the last one which will work as a Coordinator.
In the configuration, enable the FRC - Fast response command used for fast data collection.
This is a periphery of the coordinator, so it didn't make sense to enable it in the Nodes.
We will not upload any Custom DPA Handler to the Coordinator, so there is no need to enable it.
Save the configuration and close it.
Select the coordinator hardware profile and the configuration, and upload them.
Now you have your coordinator ready so leave it connected to your computer through the programmer.
Put the prepared transceivers into the evaluation boards and switch them on with jumpers.
If the red LEDs on evaluation boards are flashing , it means they have no previous bond information stored.
If this is not the case, you have to unbond the node manually.
In our case, we can see that Node 3 has been already bonded.
You can unbond the node by following this procedure:
press both Reset and user buttons on the evaluation board,
release the Reset button, the green LED gets on for 1 second,
once it gets off you have a half a second to release the user button.
If the Red LED starts flashing, your node was successfully unbonded.
Once you have all three nodes ready, delete any residual bonding information from the coordinator.
To do so, on the Control bookmark in the IQMESH Network Manager, click on Clear all bonds.
Now build your wireless network. Click on the Bond node button to run listening on the Coordinator for a new Node request.
During this ten-second period, press the user's button on the evaluation board with the transceiver configured for the sensor kit.
Bond the transceiver with the relay custom DPA handler as a node number 2 following the same procedure.
The last transceiver will be bonded as number 3.
You can see the current network in the Map View.
Connect the node number 1 to the sensor kit and the node number 2 to the relay kit.
Connect the jumper on the sensor kit correctly to select the Dallas Temperature Sensor.
Now place the nodes on their final destination and run discovery.
Discovery will automatically set up routing topology of the network.
Check the Map view again. Discovered nodes have virtual routing addresses and are marked with blue color.
Go to the Terminal log located at the bottom of the IQRF IDE next to the IQMESH Network manager and clear the current log.
On the IoT Starter Kit macro bookmark, there are prepared macros containing commands for Custom DPA Handlers used in the Starter Kit.
Select the first macro that contains the command to read all sensory data from the sensor kit connected to the node number 1.
Note the individual parts of the DPA packet. The first part is the logical address of the node you want to communicate with.
Here we use the logical address #1 which corresponds to the node with the sensor kit.
5E is the hexadecimal representation of the Standard sensor periphery.
The number 01 in the peripheral command field corresponds to the command for collecting types of sensors and their values.
The FF.FF in the hardware profile ID field indicates that there is no hardware profile filtering.
In the PDATA field there is a bit map of maximum 32 sensors you want to communicate with on the specific node.
Here we want to read all sensors available.
Send the command and see the ongoing communication in Terminal Log.
Double-click on the response to see the details of the sensor data.
In the Packet Inspector, you can see values measured by the individual sensors and types of the sensors
according to the IQRF Interoperability Standard.
If you have more sensors of the same type in the network, you can collect measured values at once using the FRC.
In the macros, three FRC commands are prepared to collect temperature,
light intensity from photoresistors and potentiometer values.
The other macros prepared here are used to control the two relays on the relay kit.
You can test individual commands and inspect the ongoing records in the terminal log.
If everything works well, you should be able to hear clicks of your relays.
So, that's it.
You have your working IQRF network controlled from the IQRF IDE.
The next step is to make the UP board working as an IQRF GW.
The installation and configuration of the gateway is the subject of the next video.
No comments:
Post a Comment