Lab 11. OAP GPIO set [1/2]

Lab 11. OAP GPIO set [1/2]

Expected completion time of this lab: 

.

On-Chip Application Protocol (OAP)

The default application which runs on your SmartMesh IP Motes allows simple interactions with different peripherals on the mote, including the LED. The protocol you use to interact with this application is called the “On-Chip Application Protocol” (OAP). It is described in the SmartMesh IP Tools Guide (http://www.linear.com/docs/42453), Section 9 “On-Chip Application Protocol”.

Parsing OAP packets

  • Using a text editor, open the TempMonitor.log file right after having switched the LED on. This file logs all the frames between exchanged between the TempMonitor application and the manager over its serial port.

  • Make sure you find the following data in the logs: 5, 0, 2, 255, 2, 3, 2, 0, 1, 1. This corresponds to the OAP command to set the INDICATOR LED on. Use the OAP documentation to complete the following table:

    decimal value

    hexadecimal value

    meaning

    decimal value

    hexadecimal value

    meaning

    5

    05

    Control

    0

    00

    id

    2

    02

    command

    Answer 11.1:



    255

    ff

    Tag: address

    2

    02

    Length: 2 bytes

    3

    03

    address byte 1:

    Answer 11.2:



    2

    02

    address byte 2:

    Answer 11.3:



    0

    00

    value

    1

    01

    length

    1

    01

    set pin to 1