Lab 18. raw OAP LED commands

Expected completion time of this lab: 20 min

When issuing a PUT HTTP request to{{mote}}/digital_out/INDICATOR_0, the JsonServer application formats the right OAP request which it sends to the mote. In this lab, you will issue this command "manually"

  • Create the following Node-RED flow:

  • configure the function and http request nodes such that when pressing the inject node, Node-RED issues:

    • an HTTP POST request
    • to URL
    • containing the payload:

          "manager": 0,
          "command": "sendData",
          "fields": {
          	"macAddress": "00-17-0d-00-00-38-06-45",
          	"priority": 0,
          	"srcPort": 0xf0b9,
          	"dstPort": 0xf0b9,
          	"options": 0,
          	"data":   [0x05,0x00,0x02,0xff,0x02,0x03,0x02,0x00,0x01,0x01]
  • Make sure the LED of your mote turns ON.

  • What do you need to change to turn the LED off?

    Answer 1: