PreviousNext
Peripheral enumeration
Help > Basics > Device exploration > Peripheral enumeration

Request

 

NADR

PNUM

PCMD

HWPID

NADR

0xFF

0x3F

?

 

The HWPID value is ignored at this command.

 

Response

 

NADR

PNUM

PCMD

HWPID

ErrN

DpaValue

0…1

2

3…6

7…8

9…10

11

(12…23)

NADR

0xFF

0xBF

?

0

?

DpaVer

UserPerNr

EmbeddedPers

HWPID

HWPIDver

Flags

UserPer

 

DpaVer             DPA protocol version

         1st byte: bits 0-6 = minor version

         2nd byte: major version

                      BCD coding is used, e.g. version 12.34 is coded as 0x1234, i.e. 1st byte 0x34, 2nd byte 0x12

UserPerNr         Number of all non-embedded peripherals implemented by Custom DPA Handler. Implemented peripherals are flagged at the UserPer variable-size bitmap array. At the Enumerate Peripherals event, the field is prefilled by 0x00.

EmbeddedPers Bits array (starting from LSb of the 1st byte) specifying which of 32 embedded peripherals are enabled in the TR Configuration (it is a copy of the first 4 bytes of the configuration area). If a peripheral is enabled in the configuration although it is not supported by the device, then calling Get peripheral information or Get information for more peripherals will return PERIPHERAL_TYPE_DUMMY peripheral type for this peripheral thus indicating that the peripheral is not available.

                        Bit values for Coordinator (bit 0) and Node (bit 1) peripherals are set according to the device support of these peripherals regardless of actual bit values stored at TR Configuration. The bit for OS (bit 2) is always set. The bit for FRC (bit 5 at byte index 4) is always set at [C] device.

HWPID             Hardware profile ID, 0x0000 if default. At the Enumerate Peripherals event, the field is prefilled by 0x0000.

HWPIDver         Hardware profile version, 1st byte = minor version, 2nd byte = major version. At the Enumerate Peripherals event the field is prefilled by 0x0000.

Flags                Various flags:

         bit 0           Device works in STD-RX mode.

         bit 1           Device works in LP-RX mode.

                        Bits 0 and 1 are mutually exclusive.

         bit 2           STD+LP network is running, otherwise STD network.

                        The value is undefined in the case of unbonded [N].

         bit 3-7         Reserved

UserPer            Bits array (starting from LSb of the 1st byte) specifying which of the non-embedded peripherals are implemented. 1st bit corresponds to the peripheral 0x20 = PNUM_USER. The corresponding bits must be set at the Enumerate Peripherals event. The length of this array can be from 0 to 12 bytes depending on the last implemented user peripheral number. the number of bits set in the bitmap must equal the UserPerNr.

 

Example

 

         Request

NADR=0x0000, PNUM=0xFF, PCMD=0x3F, HWPID=0xFFFF

         Response

NADR=0x0000, PNUM=0xFF, PCMD=0xBF, HWPID=0xABCD, PData={0x00}(No error), {0x07}(DPA Value),{02,03}(DpaVer 3.02), {02}(UserPerNr), {E6,06,00,00}(StdPers), {CD,AB}(HWPID), {01,00}(HWPIDver), {41}(Flags), {02,01}(UserPer)

 

[C] (NADR=0x0000) having 2 user defined peripheral, Hardware profile ID of type 0xABCD (version 0x0001), DPA version 2.12.

The following embedded peripherals are enabled:

         0x01           NODE

         0x02           OS

         0x05           RAM

         0x06           LEDR

         0x07           LEDG

         0x09           IO

         0x0A          Thermometer
bit array (E6,06,00,00):
11100110.00000110.00000000.00000000

 

The following user peripherals are implemented:

         0x21

         0x28
bit array (02,01):
00000010.00000001